diff --git a/charts/onechart/charts/common-0.4.0.tgz b/charts/onechart/charts/common-0.4.0.tgz index a2ea195..c1a4d69 100644 Binary files a/charts/onechart/charts/common-0.4.0.tgz and b/charts/onechart/charts/common-0.4.0.tgz differ diff --git a/charts/onechart/helm-ui.json b/charts/onechart/helm-ui.json index 87216fe..3f3f2e9 100644 --- a/charts/onechart/helm-ui.json +++ b/charts/onechart/helm-ui.json @@ -143,7 +143,8 @@ "schemaIDs": [ "#/properties/podDisruptionBudgetEnabled", "#/properties/spreadAcrossNodes", - "#/properties/podAnnotations" + "#/properties/podAnnotations", + "#/properties/podLabels" ], "uiSchema": {}, "metaData": { diff --git a/charts/onechart/templates/deployment.yaml b/charts/onechart/templates/deployment.yaml index e9b1ae0..f4eca98 100644 --- a/charts/onechart/templates/deployment.yaml +++ b/charts/onechart/templates/deployment.yaml @@ -39,6 +39,9 @@ spec: gimlet.io/git-repository: {{ .Values.gitRepository }} {{- end }} labels: + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- include "helm-chart.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} diff --git a/charts/onechart/tests/deployment_podlabels_test.yaml b/charts/onechart/tests/deployment_podlabels_test.yaml new file mode 100644 index 0000000..43c7936 --- /dev/null +++ b/charts/onechart/tests/deployment_podlabels_test.yaml @@ -0,0 +1,17 @@ +suite: test deployment +templates: + - deployment.yaml + - configmap.yaml +tests: + - it: Should set custom labels + set: + podLabels: + label1: val1 + label2: val2 + asserts: + - equal: + path: spec.template.metadata.labels.label1 + value: val1 + - equal: + path: spec.template.metadata.labels.label2 + value: val2 diff --git a/charts/onechart/values.schema.json b/charts/onechart/values.schema.json index a911c05..be2af2f 100644 --- a/charts/onechart/values.schema.json +++ b/charts/onechart/values.schema.json @@ -15,6 +15,7 @@ "nameOverride": "", "fullnameOverride": "", "podAnnotations": {}, + "podLabels": {}, "podSecurityContext": { "fsGroup": 999 }, @@ -189,6 +190,18 @@ "required": [], "additionalProperties": true }, + "podLabels": { + "$id": "#/properties/podLabels", + "type": "object", + "title": "Pod labels", + "description": "Annotations to place on pods", + "default": {}, + "examples": [ + {} + ], + "required": [], + "additionalProperties": true + }, "name": { "$id": "#/properties/name", "type": "string", diff --git a/charts/onechart/values.yaml b/charts/onechart/values.yaml index 79b2e0e..f0db6be 100644 --- a/charts/onechart/values.yaml +++ b/charts/onechart/values.yaml @@ -20,6 +20,8 @@ fullnameOverride: "" podAnnotations: {} +podLabels: {} + podSecurityContext: fsGroup: 999 @@ -39,7 +41,6 @@ nodeSelector: {} tolerations: [] - probe: enabled: false path: "/"