Skip to content

Commit

Permalink
feat(helm): support labels in values.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
razvan committed Jan 26, 2024
1 parent 1d6cefb commit 2f4d4b0
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 @@ -7,13 +7,15 @@ All notable changes to this project will be documented in this file.
### Added

- Various documentation of the CRD ([#510]).
- Helm: support labels in values.yaml ([#528]).

### Fixed

- Add `core-site.xml` when configuring HDFS connection ([#526]).

[#510]: https://github.com/stackabletech/trino-operator/pull/510
[#526]: https://github.com/stackabletech/trino-operator/pull/526
[#528]: https://github.com/stackabletech/trino-operator/pull/528

## [23.11.0] - 2023-11-24

Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/trino-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/trino-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/trino-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:
# For OPA dependents. Note that OPA it's self is listed here because it's own resource name
# doesn't follow the *clusters convention
Expand Down Expand Up @@ -160,6 +162,8 @@ apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
name: trino-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 @@ -203,6 +207,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 @@ -227,4 +233,4 @@ rules:
- trino-scc
verbs:
- use
{{ end }}
{{ end }}
5 changes: 4 additions & 1 deletion deploy/helm/trino-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/trino-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 2f4d4b0

Please sign in to comment.