Skip to content

Commit

Permalink
feat(hydra-maester): make hydra-maester pods labels customizable (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthieuFin committed Jan 8, 2021
1 parent c75113e commit 45fc1e7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/helm/hydra-maester.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Hydra Maester is a part of the Hydra chart and is installed together with it.
## Configuration

- `enabledNamespaces` defines the namespaces in which instances of `oauth2clients.hydra.ory.sh/v1alpha1` CR can be created. By default, users are allowed to create CR instances only in the controller's native namespace.
- `deployment.podLabels` permit to set custom additional labels on hydra-maester controller pod.
- `job.podLabels` permit to set custom additional labels on hydra-maester job init-crd pod (which setup crd on cluster).

You can set the values in the `values.yaml` file or using the `--set` syntax of Helm during chart installation.

Expand Down
2 changes: 1 addition & 1 deletion helm/charts/hydra-maester/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
appVersion: "v0.0.19"
description: A Helm chart for Kubernetes
name: hydra-maester
version: 0.5.0
version: 0.5.1
type: application
4 changes: 4 additions & 0 deletions helm/charts/hydra-maester/templates/crd-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ metadata:
spec:
template:
metadata:
{{- with .Values.job.podLabels }}
labels:
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
sidecar.istio.io/inject: "false"
spec:
Expand Down
3 changes: 3 additions & 0 deletions helm/charts/hydra-maester/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ spec:
control-plane: controller-manager
app.kubernetes.io/name: {{ include "hydra-maester.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.deployment.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
Expand Down
4 changes: 4 additions & 0 deletions helm/charts/hydra-maester/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ deployment:
# Configure node tolerations.
tolerations: []
annotations: {}
podLabels: {}

job:
podLabels: {}

# Configure node affinity
affinity: {}

0 comments on commit 45fc1e7

Please sign in to comment.