Skip to content

Commit 2e56e27

Browse files
authored
support customized labels (#157)
* support customized labels * clean up the change * Update deployment.yaml * updated per review
1 parent 6ed5407 commit 2e56e27

4 files changed

Lines changed: 36 additions & 2 deletions

File tree

charts/pulsar-resources-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type: application
3030
# This is the chart version. This version number should be incremented each time you make changes
3131
# to the chart and its templates, including the app version.
3232
# Versions are expected to follow Semantic Versioning (https://semver.org/)
33-
version: v0.4.3
33+
version: v0.4.4
3434

3535
# This is the version number of the application being deployed. This version number should be
3636
# incremented each time you make changes to the application. Versions are not expected to

charts/pulsar-resources-operator/templates/deployment.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ metadata:
2020
namespace: {{ include "pulsar-resources-operator.namespace" .}}
2121
labels:
2222
{{- include "pulsar-resources-operator.labels" . | nindent 4 }}
23+
{{- with .Values.labels }}
24+
{{- toYaml . | nindent 4 }}
25+
{{- end }}
2326
spec:
2427
replicas: {{ .Values.replicaCount }}
2528
selector:
@@ -31,6 +34,9 @@ spec:
3134
{{- toYaml .Values.podAnnotations | nindent 8 }}
3235
labels:
3336
{{- include "pulsar-resources-operator.selectorLabels" . | nindent 8 }}
37+
{{- with .Values.podLabels }}
38+
{{- toYaml . | nindent 8 }}
39+
{{- end }}
3440
spec:
3541
imagePullSecrets:
3642
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
@@ -81,4 +87,4 @@ spec:
8187
{{- toYaml .Values.affinity | nindent 8 }}
8288
tolerations:
8389
{{- toYaml .Values.tolerations | nindent 8 }}
84-
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
90+
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}

charts/pulsar-resources-operator/values.schema.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,17 @@
249249
},
250250
"additionalProperties": true
251251
},
252+
"labels": {
253+
"$id": "#/properties/labels",
254+
"type": "object",
255+
"title": "The labels schema",
256+
"description": "customized labels for deployment",
257+
"examples": [
258+
{}
259+
],
260+
"required": [],
261+
"additionalProperties": true
262+
},
252263
"podAnnotations": {
253264
"$id": "#/properties/podAnnotations",
254265
"type": "object",
@@ -260,6 +271,17 @@
260271
"required": [],
261272
"additionalProperties": true
262273
},
274+
"podLabels": {
275+
"$id": "#/properties/podLabels",
276+
"type": "object",
277+
"title": "The labels schema",
278+
"description": "customized labels for pod",
279+
"examples": [
280+
{}
281+
],
282+
"required": [],
283+
"additionalProperties": true
284+
},
263285
"podSecurityContext": {
264286
"$id": "#/properties/podSecurityContext",
265287
"type": "object",

charts/pulsar-resources-operator/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,15 @@ serviceAccount:
6565
# If not set and create is true, a name is generated using the fullname template
6666
name: ""
6767

68+
# -- Add labels for the deployment
69+
labels: {}
70+
6871
# -- Add annotations for the deployment pod
6972
podAnnotations: {}
7073

74+
# -- Add labels for the deployment pod
75+
podLabels: {}
76+
7177
# -- Add security context for pod
7278
podSecurityContext: {}
7379
# fsGroup: 2000

0 commit comments

Comments
 (0)