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(gcp): let helm manage certmanager SA instead of terraform #882

Merged
merged 2 commits into from
Nov 10, 2023
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
2 changes: 1 addition & 1 deletion bootstrap/helm/bootstrap/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ maintainers:
email: [email protected]
- name: David van der Spek
email: [email protected]
version: 0.8.77
version: 0.8.78
dependencies:
- name: external-dns
version: 6.14.1
Expand Down
6 changes: 5 additions & 1 deletion bootstrap/helm/bootstrap/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,13 @@ dnsSolver:

{{ if $isGcp }}
cert-manager:
podAnnotations:
checksum/sa: {{ importValue "Terraform" "certmanager_sa_workload_identity_email" | sha256sum }}
serviceAccount:
create: false
create: true
name: certmanager
annotations:
iam.gke.io/gcp-service-account: {{ importValue "Terraform" "certmanager_sa_workload_identity_email" }}

{{ if not $pluraldns }}
dnsSolver:
Expand Down
1 change: 1 addition & 0 deletions bootstrap/terraform/gcp-bootstrap/deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ spec:
cluster: cluster
vpc_network: vpc_network
capi_sa_workload_identity_email: capi_sa_workload_identity_email
certmanager_sa_workload_identity_email: certmanager_sa_workload_identity_email
provider_wirings:
cluster: module.gcp-bootstrap.cluster
2 changes: 1 addition & 1 deletion bootstrap/terraform/gcp-bootstrap/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ resource "kubernetes_namespace" "bootstrap" {
}

resource "kubernetes_service_account" "certmanager" {
count = var.cluster_api ? 0 : 1
count = var.cluster_api ? 0 : 0
metadata {
name = "certmanager"
namespace = var.namespace
Expand Down
4 changes: 4 additions & 0 deletions bootstrap/terraform/gcp-bootstrap/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ output "vpc_network" {
output "capi_sa_workload_identity_email" {
value = module.capi-workload-identity.gcp_service_account_email
}

output "certmanager_sa_workload_identity_email" {
value = module.certmanager-workload-identity.gcp_service_account_email
}
2 changes: 1 addition & 1 deletion bootstrap/terraform/gcp-bootstrap/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ variable "num_static_ips" {

variable "kubernetes_version" {
type = string
default = "1.24.17-gke.200"
default = "1.24.17-gke.2211000"
}

variable "vpc_subnetwork_cidr_range" {
Expand Down