Skip to content

Commit c6558ef

Browse files
authored
feat(gcp): let helm manage certmanager SA instead of terraform (#882)
* gcp: let helm manage certmanager SA instead of terraform * bump gke version
1 parent 581a1d2 commit c6558ef

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

bootstrap/helm/bootstrap/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ maintainers:
1010
1111
- name: David van der Spek
1212
13-
version: 0.8.77
13+
version: 0.8.78
1414
dependencies:
1515
- name: external-dns
1616
version: 6.14.1

bootstrap/helm/bootstrap/values.yaml.tpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,13 @@ dnsSolver:
183183

184184
{{ if $isGcp }}
185185
cert-manager:
186+
podAnnotations:
187+
checksum/sa: {{ importValue "Terraform" "certmanager_sa_workload_identity_email" | sha256sum }}
186188
serviceAccount:
187-
create: false
189+
create: true
188190
name: certmanager
191+
annotations:
192+
iam.gke.io/gcp-service-account: {{ importValue "Terraform" "certmanager_sa_workload_identity_email" }}
189193

190194
{{ if not $pluraldns }}
191195
dnsSolver:

bootstrap/terraform/gcp-bootstrap/deps.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ spec:
1111
cluster: cluster
1212
vpc_network: vpc_network
1313
capi_sa_workload_identity_email: capi_sa_workload_identity_email
14+
certmanager_sa_workload_identity_email: certmanager_sa_workload_identity_email
1415
provider_wirings:
1516
cluster: module.gcp-bootstrap.cluster

bootstrap/terraform/gcp-bootstrap/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ resource "kubernetes_namespace" "bootstrap" {
104104
}
105105

106106
resource "kubernetes_service_account" "certmanager" {
107-
count = var.cluster_api ? 0 : 1
107+
count = var.cluster_api ? 0 : 0
108108
metadata {
109109
name = "certmanager"
110110
namespace = var.namespace

bootstrap/terraform/gcp-bootstrap/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ output "vpc_network" {
1010
output "capi_sa_workload_identity_email" {
1111
value = module.capi-workload-identity.gcp_service_account_email
1212
}
13+
14+
output "certmanager_sa_workload_identity_email" {
15+
value = module.certmanager-workload-identity.gcp_service_account_email
16+
}

bootstrap/terraform/gcp-bootstrap/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ variable "num_static_ips" {
253253

254254
variable "kubernetes_version" {
255255
type = string
256-
default = "1.24.17-gke.200"
256+
default = "1.24.17-gke.2211000"
257257
}
258258

259259
variable "vpc_subnetwork_cidr_range" {

0 commit comments

Comments
 (0)