Skip to content

Commit

Permalink
feat(helm): support labels in values.yaml (#507)
Browse files Browse the repository at this point in the history
Co-authored-by: Techassi <[email protected]>
  • Loading branch information
razvan and Techassi authored Jan 29, 2024
1 parent ce8ab04 commit 2ce61a9
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,12 +7,14 @@ All notable changes to this project will be documented in this file.
### Added

- Add user-info-fetcher to fetch user metadata from directory services ([#433]).
- Helm: support labels in values.yaml ([#507]).

### Changed

- [BREAKING]: Remove legacy `nodeSelector` on rolegroups. Use the field `affinity.nodeAffinity` instead ([#433]).

[#433]: https://github.com/stackabletech/opa-operator/pull/433
[#507]: https://github.com/stackabletech/opa-operator/pull/507

## [23.11.0] - 2023-11-24

Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/opa-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/opa-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/opa-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 @@ -105,6 +107,8 @@ apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
name: opa-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 @@ -148,6 +152,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 @@ -174,4 +180,4 @@ rules:
- opa-scc
verbs:
- use
{{ end }}
{{ end }}
5 changes: 4 additions & 1 deletion deploy/helm/opa-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/opa-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 2ce61a9

Please sign in to comment.