Skip to content

Commit 894fb5f

Browse files
authored
Merge pull request #4129 from HujinoKun/chore/rollout-configure-namespaceselector-option
[rollout-operator] Being able to configure the option namespaceSelector.matchExpressions
2 parents b3e2e04 + e9d7634 commit 894fb5f

File tree

7 files changed

+30
-2
lines changed

7 files changed

+30
-2
lines changed

charts/rollout-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: rollout-operator
33
description: "Grafana rollout-operator"
44
type: application
5-
version: 0.41.0
5+
version: 0.42.0
66
appVersion: v0.34.0
77
home: https://github.com/grafana/rollout-operator
88
kubeVersion: ^1.10.0-0

charts/rollout-operator/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Helm chart for deploying [Grafana rollout-operator](https://github.com/grafana/r
44

55
# rollout-operator
66

7-
![Version: 0.41.0](https://img.shields.io/badge/Version-0.41.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.34.0](https://img.shields.io/badge/AppVersion-v0.34.0-informational?style=flat-square)
7+
![Version: 0.42.0](https://img.shields.io/badge/Version-0.42.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.34.0](https://img.shields.io/badge/AppVersion-v0.34.0-informational?style=flat-square)
88

99
Grafana rollout-operator
1010

@@ -62,6 +62,7 @@ Manually applying these CRDs is only required if upgrading from a chart <= v0.32
6262
| imagePullSecrets | list | `[]` | |
6363
| minReadySeconds | int | `10` | |
6464
| nameOverride | string | `""` | |
65+
| namespaceSelector.matchExpressions | list | `[]` | Namespace selector to filter which namespaces the webhooks apply to. See https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector Example: matchExpressions: - key: team operator: NotIn values: - team-a |
6566
| nodeSelector | object | `{}` | |
6667
| podAnnotations | object | `{}` | Pod Annotations |
6768
| podLabels | object | `{}` | Pod (extra) Labels |

charts/rollout-operator/templates/no-downscale-webhook.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ webhooks:
3131
namespaceSelector:
3232
matchLabels:
3333
kubernetes.io/metadata.name: {{ .Release.Namespace | quote }}
34+
{{- with .Values.namespaceSelector.matchExpressions }}
35+
matchExpressions:
36+
{{- toYaml . | nindent 8 }}
37+
{{- end }}
3438
{{- with .Values.webhooks.objectSelector }}
3539
objectSelector:
3640
{{- toYaml . | nindent 6 }}

charts/rollout-operator/templates/pod-eviction-webhook.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ webhooks:
3030
namespaceSelector:
3131
matchLabels:
3232
kubernetes.io/metadata.name: {{ .Release.Namespace | quote }}
33+
{{- with .Values.namespaceSelector.matchExpressions }}
34+
matchExpressions:
35+
{{- toYaml . | nindent 8 }}
36+
{{- end }}
3337
{{- with .Values.webhooks.objectSelector }}
3438
objectSelector:
3539
{{- toYaml . | nindent 6 }}

charts/rollout-operator/templates/prepare-downscale-webhook.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ webhooks:
3131
namespaceSelector:
3232
matchLabels:
3333
kubernetes.io/metadata.name: {{ .Release.Namespace | quote }}
34+
{{- with .Values.namespaceSelector.matchExpressions }}
35+
matchExpressions:
36+
{{- toYaml . | nindent 8 }}
37+
{{- end }}
3438
{{- with .Values.webhooks.objectSelector }}
3539
objectSelector:
3640
{{- toYaml . | nindent 6 }}

charts/rollout-operator/templates/zone-aware-pod-disruption-budget-validating-webhook.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ webhooks:
3030
namespaceSelector:
3131
matchLabels:
3232
kubernetes.io/metadata.name: {{ .Release.Namespace | quote }}
33+
{{- with .Values.namespaceSelector.matchExpressions }}
34+
matchExpressions:
35+
{{- toYaml . | nindent 8 }}
36+
{{- end }}
3337
{{- with .Values.webhooks.objectSelector }}
3438
objectSelector:
3539
{{- toYaml . | nindent 6 }}

charts/rollout-operator/values.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,14 @@ webhooks:
124124
# operator: In
125125
# values:
126126
# - production
127+
128+
namespaceSelector:
129+
# -- Namespace selector to filter which namespaces the webhooks apply to.
130+
# See https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector
131+
# Example:
132+
# matchExpressions:
133+
# - key: team
134+
# operator: NotIn
135+
# values:
136+
# - team-a
137+
matchExpressions: []

0 commit comments

Comments
 (0)