Skip to content

Commit

Permalink
feat(helm): support labels in values.yaml (#460)
Browse files Browse the repository at this point in the history
* feat(helm): support labels in values.yaml

* Update CHANGELOG.md

---------

Co-authored-by: Techassi <[email protected]>
  • Loading branch information
razvan and Techassi authored Jan 29, 2024
1 parent 2279a62 commit f8cc03a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.

- More CRD documentation ([#433]).
- Support for exposing HDFS clusters to clients outside of Kubernetes ([#450]).
- Helm: support labels in values.yaml ([#460]).

### Changed

Expand All @@ -24,6 +25,7 @@ All notable changes to this project will be documented in this file.
[#450]: https://github.com/stackabletech/hdfs-operator/pull/450
[#451]: https://github.com/stackabletech/hdfs-operator/pull/451
[#458]: https://github.com/stackabletech/hdfs-operator/pull/458
[#460]: https://github.com/stackabletech/hdfs-operator/pull/460

## [23.11.0] - 2023-11-24

Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/hdfs-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/hdfs-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
6 changes: 6 additions & 0 deletions deploy/helm/hdfs-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 @@ -123,6 +125,8 @@ apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
name: hdfs-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 @@ -164,6 +168,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "operator.name" . }}-clusterrole
labels:
{{- include "operator.labels" . | nindent 4 }}
rules:
- apiGroups:
- ""
Expand Down
5 changes: 4 additions & 1 deletion deploy/helm/hdfs-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/hdfs-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 f8cc03a

Please sign in to comment.