From 75389c260f3fb9d64343a388e2fe7bf2958a24a7 Mon Sep 17 00:00:00 2001 From: Berk Dehrioglu Date: Mon, 12 Feb 2024 00:34:32 +0300 Subject: [PATCH] propagate additional tags from awsCluster to ebs-csi-driver (#509) --- CHANGELOG.md | 1 + helm/cluster-aws/templates/_helpers.tpl | 7 +++++++ .../templates/aws-ebs-csi-driver-helmrelease.yaml | 1 + 3 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe128299..d750ec9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Add propagating tags from `cluster-aws` to resources managed my `ebs-csi-driver`. - CI: trigger automated e2e tests on Renovate PRs. - Add new annotation for vintage irsa domain which is only used for migrating vintage clusters. - Use 443 as the default api-server Load Balancer port. diff --git a/helm/cluster-aws/templates/_helpers.tpl b/helm/cluster-aws/templates/_helpers.tpl index c81d6bd4..8853dd52 100644 --- a/helm/cluster-aws/templates/_helpers.tpl +++ b/helm/cluster-aws/templates/_helpers.tpl @@ -371,3 +371,10 @@ sts.amazonaws.com{{ if hasPrefix "cn-" (include "aws-region" .) }}.cn{{ end }} {{- define "awsNoProxyList" }} - {{ $.Values.global.connectivity.network.vpcCidr }} {{- end }} + +{{- define "resource.default.additionalTags" -}} +{{- if .Values.global.providerSpecific.additionalResourceTags }} +{{ toYaml .Values.global.providerSpecific.additionalResourceTags }} +{{- end }} +giantswarm.io/cluster: {{ include "resource.default.name" $ }} +{{- end -}} diff --git a/helm/cluster-aws/templates/aws-ebs-csi-driver-helmrelease.yaml b/helm/cluster-aws/templates/aws-ebs-csi-driver-helmrelease.yaml index 29948598..6530130f 100644 --- a/helm/cluster-aws/templates/aws-ebs-csi-driver-helmrelease.yaml +++ b/helm/cluster-aws/templates/aws-ebs-csi-driver-helmrelease.yaml @@ -1,6 +1,7 @@ {{/* Default Helm values for the app */}} {{/* See schema for the appropriate app version here https://github.com/giantswarm/aws-ebs-csi-driver-app/blob/master/helm/aws-ebs-csi-driver-app/values.schema.json */}} {{- define "defaultAwsEbsCsiDriverHelmValues" }} +extraVolumeTags: {{ include "resource.default.additionalTags" . | nindent 2 }} {{- if (.Values.global.connectivity.proxy).enabled }} proxy: noProxy: "{{ include "cluster.connectivity.proxy.noProxy" (dict "global" $.Values.global "providerIntegration" $.Values.cluster.providerIntegration) }}"