Skip to content

Commit

Permalink
k8s terraform helm example
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Sobczak authored and Dennis Sobczak committed Feb 23, 2023
1 parent 4502e84 commit 102c9e0
Show file tree
Hide file tree
Showing 6 changed files with 996 additions and 0 deletions.
3 changes: 3 additions & 0 deletions terraform_infra/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.terraform*
terraform.tfstate*
kubeconfig
4 changes: 4 additions & 0 deletions terraform_infra/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

module "helm_release_jenkins" {
source = "./modules/helm_release/jenkins"
}
45 changes: 45 additions & 0 deletions terraform_infra/modules/helm_release/jenkins/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
resource "kubernetes_namespace" "dev_tools_ns" {
metadata {
name = "dev-tools-ns"
}
}

resource "helm_release" "jenkins" {
name = "jenkins"
repository = "https://charts.jenkins.io/"
chart = "jenkins"
namespace = "dev-tools-ns"
version = "4.3.1"

/*
values = [
file("${path.module}/values.yaml")
]
*/

set {
name = "controller.jenkinsUrlProtocol"
value = "https"
}
set {
name = "controller.jenkinsUrl"
value = "https://localhost"
}

set {
name = "controller.sidecars.configAutoReload.enabled"
value = true
}
set {
name = "agent.enabled"
value = false
}
# set {
# name = "controller.installPlugins"
# value = "{kubernetes:3600.v144b_cd192ca_a_,workflow-aggregator:581.v0c46fa_697ffd, git:4.11.5, configuration-as-code:1429.v09b_044a_c93de}"
# }
# set {
# name = "controller.additionalPlugins"
# value = "{blueocean:1.25.6}"
# }
}
Loading

0 comments on commit 102c9e0

Please sign in to comment.