Skip to content

Commit 3a9f905

Browse files
razvanTechassi
andauthored
feat(helm): support labels in values.yaml (#344)
* feat(helm): support labels in values.yaml * fix(helm): add missing labels to roles --------- Co-authored-by: Techassi <[email protected]>
1 parent 54fa0f0 commit 3a9f905

File tree

5 files changed

+18
-1
lines changed

5 files changed

+18
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ 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 ([#344]).
10+
711
### Changed
812

913
- Various documentation of the CRD ([#319]).
@@ -17,6 +21,7 @@ All notable changes to this project will be documented in this file.
1721

1822
[#313]: https://github.com/stackabletech/spark-k8s-operator/pull/313
1923
[#319]: https://github.com/stackabletech/spark-k8s-operator/pull/319
24+
[#344]: https://github.com/stackabletech/spark-k8s-operator/pull/344
2025

2126
## [23.11.0] - 2023-11-24
2227

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

Lines changed: 2 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
- ""

deploy/helm/spark-k8s-operator/templates/spark-clusterrole.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: spark-k8s-scc
7+
labels:
8+
{{- include "operator.labels" . | nindent 4 }}
79
annotations:
810
kubernetes.io/description: |-
911
This resource is derived from hostmount-anyuid. It provides all the features of the
@@ -47,6 +49,8 @@ apiVersion: rbac.authorization.k8s.io/v1
4749
kind: ClusterRole
4850
metadata:
4951
name: {{ include "operator.name" . }}-clusterrole
52+
labels:
53+
{{- include "operator.labels" . | nindent 4 }}
5054
rules:
5155
- apiGroups:
5256
- ""

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