Add podLabels to onechart (#83)
* Add podLabels to onechart * add unittest
This commit is contained in:
Binary file not shown.
@@ -143,7 +143,8 @@
|
|||||||
"schemaIDs": [
|
"schemaIDs": [
|
||||||
"#/properties/podDisruptionBudgetEnabled",
|
"#/properties/podDisruptionBudgetEnabled",
|
||||||
"#/properties/spreadAcrossNodes",
|
"#/properties/spreadAcrossNodes",
|
||||||
"#/properties/podAnnotations"
|
"#/properties/podAnnotations",
|
||||||
|
"#/properties/podLabels"
|
||||||
],
|
],
|
||||||
"uiSchema": {},
|
"uiSchema": {},
|
||||||
"metaData": {
|
"metaData": {
|
||||||
|
|||||||
@@ -39,6 +39,9 @@ spec:
|
|||||||
gimlet.io/git-repository: {{ .Values.gitRepository }}
|
gimlet.io/git-repository: {{ .Values.gitRepository }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
labels:
|
labels:
|
||||||
|
{{- with .Values.podLabels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- include "helm-chart.selectorLabels" . | nindent 8 }}
|
{{- include "helm-chart.selectorLabels" . | nindent 8 }}
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
"nameOverride": "",
|
"nameOverride": "",
|
||||||
"fullnameOverride": "",
|
"fullnameOverride": "",
|
||||||
"podAnnotations": {},
|
"podAnnotations": {},
|
||||||
|
"podLabels": {},
|
||||||
"podSecurityContext": {
|
"podSecurityContext": {
|
||||||
"fsGroup": 999
|
"fsGroup": 999
|
||||||
},
|
},
|
||||||
@@ -189,6 +190,18 @@
|
|||||||
"required": [],
|
"required": [],
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
|
"podLabels": {
|
||||||
|
"$id": "#/properties/podLabels",
|
||||||
|
"type": "object",
|
||||||
|
"title": "Pod labels",
|
||||||
|
"description": "Annotations to place on pods",
|
||||||
|
"default": {},
|
||||||
|
"examples": [
|
||||||
|
{}
|
||||||
|
],
|
||||||
|
"required": [],
|
||||||
|
"additionalProperties": true
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"$id": "#/properties/name",
|
"$id": "#/properties/name",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ fullnameOverride: ""
|
|||||||
|
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
|
|
||||||
|
podLabels: {}
|
||||||
|
|
||||||
podSecurityContext:
|
podSecurityContext:
|
||||||
fsGroup: 999
|
fsGroup: 999
|
||||||
|
|
||||||
@@ -39,7 +41,6 @@ nodeSelector: {}
|
|||||||
|
|
||||||
tolerations: []
|
tolerations: []
|
||||||
|
|
||||||
|
|
||||||
probe:
|
probe:
|
||||||
enabled: false
|
enabled: false
|
||||||
path: "/"
|
path: "/"
|
||||||
|
|||||||
Reference in New Issue
Block a user