From 18744b06b7f5f52b293f20459a87bb2ac216f1db Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Fri, 24 Jul 2020 10:51:38 -0500 Subject: [PATCH 1/3] Set additional deployment labels --- README.md | 1 + templates/deployment.yaml | 3 +++ values.yaml | 3 +++ 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 348e48f80..0df561acb 100755 --- a/README.md +++ b/README.md @@ -104,6 +104,7 @@ The following tables lists the configurable parameters of the Ambassador chart a | `podAnnotations` | Additional annotations for ambassador pods | `{}` | | `deploymentAnnotations` | Additional annotations for ambassador DaemonSet/Deployment | `{}` | | `podLabels` | Additional labels for ambassador pods | | +| `deploymentLabels` | Additional labels for ambassador DaemonSet/Deployment | | | `affinity` | Affinity for ambassador pods | `{}` | | `nodeSelector` | NodeSelector for ambassador pods | `{}` | | `priorityClassName` | The name of the priorityClass for the ambassador DaemonSet/Deployment | `""` | diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 1c638fb2b..087afd1f5 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -18,6 +18,9 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end }} product: aes + {{- if .Values.deploymentLabels }} + {{- toYaml .Values.deploymentLabels | nindent 4 }} + {{- end }} {{- if .Values.deploymentAnnotations }} annotations: {{- toYaml .Values.deploymentAnnotations | nindent 4 }} diff --git a/values.yaml b/values.yaml index 9d971948f..5ba41e164 100644 --- a/values.yaml +++ b/values.yaml @@ -258,6 +258,9 @@ podAnnotations: # prometheus.io/scrape: "true" # prometheus.io/port: "9102" +deploymentLabels: + {} + deploymentAnnotations: {} # configmap.reloader.stakater.com/auto: "true" From f2a894e337e9461695a329d1904c2cd8994882cc Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Fri, 24 Jul 2020 12:04:03 -0500 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4982aa3bd..3f250b82c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ numbering uses [semantic versioning](http://semver.org). ## Next Release -(nothing yet) +- Feature: Add support for DaemonSet/Deployment labels: [ambassador-chart/#114](https://github.com/datawire/ambassador-chart/pull/114) ## v6.5.1 From 8ae870bdab8a1b37ec70d682f5b0e2dace74ce7f Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Fri, 24 Jul 2020 12:53:53 -0500 Subject: [PATCH 3/3] Test rendering of deploymentLabels --- ci/14-deployment-labels.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ci/14-deployment-labels.yaml diff --git a/ci/14-deployment-labels.yaml b/ci/14-deployment-labels.yaml new file mode 100644 index 000000000..33ebe5b74 --- /dev/null +++ b/ci/14-deployment-labels.yaml @@ -0,0 +1,3 @@ +deploymentLabels: + label: foo + label2: bar