Skip to content

Commit

Permalink
feat(helm): support labels in values.yaml (#406)
Browse files Browse the repository at this point in the history
Co-authored-by: Techassi <sascha.lautenschlaeger@stackable.tech>
  • Loading branch information
razvan and Techassi authored Jan 29, 2024
1 parent 73d3177 commit 4294045
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ All notable changes to this project will be documented in this file.

- Various documentation of the CRD ([#394]).
- Support user authentication using Kerberos ([#402]).
- Helm: support labels in values.yaml ([#406]).

[#394]: https://github.com/stackabletech/hive-operator/pull/394
[#402]: https://github.com/stackabletech/hive-operator/pull/402
[#406]: https://github.com/stackabletech/hive-operator/pull/406

## [23.11.0] - 2023-11-24

Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/hive-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ Selector labels
{{- define "operator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "operator.appname" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.labels }}
{{ toYaml . }}
{{- end }}
{{- end }}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/hive-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
labels:
{{- include "operator.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
8 changes: 7 additions & 1 deletion deploy/helm/hive-operator/templates/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "operator.fullname" . }}-clusterrole
labels:
{{- include "operator.labels" . | nindent 4 }}
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -126,6 +128,8 @@ apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
name: hive-scc
labels:
{{- include "operator.labels" . | nindent 4 }}
annotations:
kubernetes.io/description: |-
This resource is derived from hostmount-anyuid. It provides all the features of the
Expand Down Expand Up @@ -169,6 +173,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "operator.name" . }}-clusterrole
labels:
{{- include "operator.labels" . | nindent 4 }}
rules:
- apiGroups:
- ""
Expand All @@ -193,4 +199,4 @@ rules:
- hive-scc
verbs:
- use
{{ end }}
{{ end }}
5 changes: 4 additions & 1 deletion deploy/helm/hive-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
image:
repository: docker.stackable.tech/stackable/hive-operator
pullPolicy: IfNotPresent
pullSecrets: []

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

Expand All @@ -19,6 +19,9 @@ serviceAccount:

podAnnotations: {}

# Provide additional labels which get attached to all deployed resources
labels: {}

podSecurityContext: {}
# fsGroup: 2000

Expand Down

0 comments on commit 4294045

Please sign in to comment.