Skip to content

Commit c7a1e7d

Browse files
VolatusTimothy-Dougherty
authored andcommitted
helm: add field for webhook namespace selector (kubernetes-sigs#2724)
Signed-off-by: Ismayil Mirzali <[email protected]>
1 parent a6413b7 commit c7a1e7d

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

helm/aws-load-balancer-controller/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ The default values set by the application itself can be confirmed [here](https:/
208208
| `webhookTLS.caCert` | TLS CA certificate for webhook (auto-generated if not provided) | "" |
209209
| `webhookTLS.cert` | TLS certificate for webhook (auto-generated if not provided) | "" |
210210
| `webhookTLS.key` | TLS private key for webhook (auto-generated if not provided) | "" |
211+
| `webhookNamespaceSelectors` | Namespace selectors for the wekbook | None
211212
| `keepTLSSecret` | Reuse existing TLS Secret during chart upgrade | `true` |
212213
| `serviceAnnotations` | Annotations to be added to the provisioned webhook service resource | `{}` |
213214
| `serviceMaxConcurrentReconciles` | Maximum number of concurrently running reconcile loops for service | None |

helm/aws-load-balancer-controller/templates/webhook.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@ webhooks:
2525
- v1beta1
2626
namespaceSelector:
2727
matchExpressions:
28+
{{ if .Values.webhookNamespaceSelector }}
29+
{{ toYaml .Values.webhookNamespaceSelectors | nindent 4 }}
30+
{{ else }}
2831
- key: elbv2.k8s.aws/pod-readiness-gate-inject
2932
operator: In
3033
values:
3134
- enabled
35+
{{ end }}
3236
objectSelector:
3337
matchExpressions:
3438
- key: app.kubernetes.io/name

helm/aws-load-balancer-controller/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@ webhookTLS:
173173
cert:
174174
key:
175175

176+
# array of namespace selectors for the webhook
177+
webhookNamespaceSelector:
178+
# - key: elbv2.k8s.aws/pod-readiness-gate-inject
179+
# operator: In
180+
# values:
181+
# - enabled
182+
176183
# keepTLSSecret specifies whether to reuse existing TLS secret for chart upgrade
177184
keepTLSSecret: true
178185

0 commit comments

Comments
 (0)