Skip to content

Commit feb8efa

Browse files
authored
feat(helm): support labels in values.yaml (#509)
* feat(helm): support labels in values.yaml * fix: changelog typo * fix: pull policy and labels in values.yaml
1 parent 40c49ce commit feb8efa

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

CHANGELOG.md

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

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

1112
### Updated
1213

1314
- `operator-rs` `0.56.1` -> `0.57.0` ([#494]).
1415

1516
[#494]: https://github.com/stackabletech/druid-operator/pull/494
17+
[#509]: https://github.com/stackabletech/druid-operator/pull/509
1618

1719
## [23.11.0] - 2023-11-24
1820

deploy/helm/druid-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/druid-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/druid-operator/templates/roles.yaml

Lines changed: 7 additions & 1 deletion
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
- ""
@@ -135,6 +137,8 @@ apiVersion: security.openshift.io/v1
135137
kind: SecurityContextConstraints
136138
metadata:
137139
name: druid-scc
140+
labels:
141+
{{- include "operator.labels" . | nindent 4 }}
138142
annotations:
139143
kubernetes.io/description: |-
140144
This resource is derived from hostmount-anyuid. It provides all the features of the
@@ -178,6 +182,8 @@ apiVersion: rbac.authorization.k8s.io/v1
178182
kind: ClusterRole
179183
metadata:
180184
name: {{ include "operator.name" . }}-clusterrole
185+
labels:
186+
{{- include "operator.labels" . | nindent 4 }}
181187
rules:
182188
- apiGroups:
183189
- ""
@@ -202,4 +208,4 @@ rules:
202208
- druid-scc
203209
verbs:
204210
- use
205-
{{ end }}
211+
{{ end }}

deploy/helm/druid-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/druid-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)