Skip to content

Commit 2f81554

Browse files
razvanTechassi
andauthored
feat(helm): support labels in values.yaml (#657)
Co-authored-by: Techassi <sascha.lautenschlaeger@stackable.tech>
1 parent 1505cc5 commit 2f81554

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ All notable changes to this project will be documented in this file.
77
### Added
88

99
- Various documentation of the CRD ([#645]).
10+
- Helm: support labels in values.yaml ([#657]).
1011

1112
[#645]: https://github.com/stackabletech/kafka-operator/pull/645
13+
[#657]: https://github.com/stackabletech/kafka-operator/pull/657
1214

1315
## [23.11.0] - 2023-11-24
1416

deploy/helm/kafka-operator/templates/_helpers.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ Selector labels
5555
{{- define "operator.selectorLabels" -}}
5656
app.kubernetes.io/name: {{ include "operator.appname" . }}
5757
app.kubernetes.io/instance: {{ .Release.Name }}
58+
{{- with .Values.labels }}
59+
{{ toYaml . }}
60+
{{- end }}
5861
{{- end }}
5962

6063
{{/*

deploy/helm/kafka-operator/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
labels:
2424
{{- include "operator.selectorLabels" . | nindent 8 }}
2525
spec:
26-
{{- with .Values.imagePullSecrets }}
26+
{{- with .Values.image.pullSecrets }}
2727
imagePullSecrets:
2828
{{- toYaml . | nindent 8 }}
2929
{{- end }}

deploy/helm/kafka-operator/templates/roles.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1
33
kind: ClusterRole
44
metadata:
55
name: {{ include "operator.fullname" . }}-clusterrole
6+
labels:
7+
{{- include "operator.labels" . | nindent 4 }}
68
rules:
79
- apiGroups:
810
- ""
@@ -126,6 +128,8 @@ apiVersion: security.openshift.io/v1
126128
kind: SecurityContextConstraints
127129
metadata:
128130
name: kafka-scc
131+
labels:
132+
{{- include "operator.labels" . | nindent 4 }}
129133
annotations:
130134
kubernetes.io/description: |-
131135
This resource is derived from hostmount-anyuid. It provides all the features of the
@@ -169,6 +173,8 @@ apiVersion: rbac.authorization.k8s.io/v1
169173
kind: ClusterRole
170174
metadata:
171175
name: {{ include "operator.name" . }}-clusterrole
176+
labels:
177+
{{- include "operator.labels" . | nindent 4 }}
172178
rules:
173179
- apiGroups:
174180
- ""

deploy/helm/kafka-operator/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
image:
44
repository: docker.stackable.tech/stackable/kafka-operator
55
pullPolicy: IfNotPresent
6+
pullSecrets: []
67

7-
imagePullSecrets: []
88
nameOverride: ""
99
fullnameOverride: ""
1010

@@ -19,6 +19,9 @@ serviceAccount:
1919

2020
podAnnotations: {}
2121

22+
# Provide additional labels which get attached to all deployed resources
23+
labels: {}
24+
2225
podSecurityContext: {}
2326
# fsGroup: 2000
2427

0 commit comments

Comments
 (0)