Skip to content

Commit 9c672d7

Browse files
razvanTechassi
andauthored
feat(helm): support labels in values.yaml (#142)
* feat(helm): support labels in values.yaml * Added newline --------- Co-authored-by: Techassi <sascha.lautenschlaeger@stackable.tech>
1 parent 9904131 commit 9c672d7

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Added
8+
9+
- Helm: support labels in values.yaml ([#142]).
10+
711
### Fixed
812

913
- Replace "Release.Name" with "operator.fullname" in Helm resource names ([#131])
1014

1115
[#131]: https://github.com/stackabletech/listener-operator/pull/131
16+
[#142]: https://github.com/stackabletech/listener-operator/pull/142
1217

1318
## [23.11.0] - 2023-11-24
1419

deploy/helm/listener-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/listener-operator/templates/node-daemonset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
app.kubernetes.io/role: node
2121
{{- include "operator.selectorLabels" . | nindent 8 }}
2222
spec:
23-
{{- with .Values.imagePullSecrets }}
23+
{{- with .Values.image.pullSecrets }}
2424
imagePullSecrets:
2525
{{- toYaml . | nindent 8 }}
2626
{{- end }}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apiVersion: security.openshift.io/v1
44
kind: SecurityContextConstraints
55
metadata:
66
name: listener-scc
7+
labels:
8+
{{- include "operator.labels" . | nindent 4 }}
79
annotations:
810
kubernetes.io/description:
911
listener-scc includes the minimum required privileges to run the listener-operator.
@@ -45,6 +47,8 @@ apiVersion: rbac.authorization.k8s.io/v1
4547
kind: ClusterRole
4648
metadata:
4749
name: {{ include "operator.fullname" . }}-clusterrole
50+
labels:
51+
{{- include "operator.labels" . | nindent 4 }}
4852
rules:
4953
- apiGroups:
5054
- ""

deploy/helm/listener-operator/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
image:
44
repository: docker.stackable.tech/stackable/listener-operator
55
pullPolicy: IfNotPresent
6+
pullSecrets: []
7+
68
csiProvisioner:
79
image:
810
repository: docker.stackable.tech/k8s/sig-storage/csi-provisioner
@@ -28,7 +30,6 @@ csiNodeDriverRegistrar:
2830
cpu: 100m
2931
memory: 128Mi
3032

31-
imagePullSecrets: []
3233
nameOverride: ""
3334
fullnameOverride: ""
3435

@@ -43,6 +44,9 @@ serviceAccount:
4344

4445
podAnnotations: {}
4546

47+
# Provide additional labels which get attached to all deployed resources
48+
labels: {}
49+
4650
podSecurityContext: {}
4751
# fsGroup: 2000
4852

0 commit comments

Comments
 (0)