Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(eks/ci.jio-agents-2) add the admin SVC account used by kubernetes-management #62

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions eks-cijenkinsio-agents-2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,19 @@ module "cijenkinsio-agents-2" {
},
}
}

# Configure the jenkins-infra/kubernetes-management admin service account
module "cijenkinsio-agents-2_admin_sa" {
providers = {
kubernetes = kubernetes.cijenkinsio-agents-2
}
source = "./.shared-tools/terraform/modules/kubernetes-admin-sa"
cluster_name = module.cijenkinsio-agents-2.cluster_name
cluster_hostname = module.cijenkinsio-agents-2.cluster_endpoint
cluster_ca_certificate_b64 = module.cijenkinsio-agents-2.cluster_certificate_authority_data
}

output "kubeconfig_cijenkinsio-agents-2" {
sensitive = true
value = module.cijenkinsio-agents-2_admin_sa.kubeconfig
}
6 changes: 6 additions & 0 deletions providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ provider "time" {
provider "tls" {
# Required by the EKS module
}

provider "kubernetes" {
alias = "cijenkinsio-agents-2"
host = module.cijenkinsio-agents-2.cluster_endpoint
cluster_ca_certificate = base64decode(module.cijenkinsio-agents-2.cluster_certificate_authority_data)
}