Add NetworkPolicy support (#8928)
* Add NetworkPolicy support * add doc for np
This commit is contained in:
parent
730174f73d
commit
1791b62e45
3 changed files with 21 additions and 0 deletions
|
@ -249,6 +249,7 @@ Kubernetes: `>=1.20.0-0`
|
||||||
| controller.admissionWebhooks.key | string | `"/usr/local/certificates/key"` | |
|
| controller.admissionWebhooks.key | string | `"/usr/local/certificates/key"` | |
|
||||||
| controller.admissionWebhooks.labels | object | `{}` | Labels to be added to admission webhooks |
|
| controller.admissionWebhooks.labels | object | `{}` | Labels to be added to admission webhooks |
|
||||||
| controller.admissionWebhooks.namespaceSelector | object | `{}` | |
|
| controller.admissionWebhooks.namespaceSelector | object | `{}` | |
|
||||||
|
| controller.admissionWebhooks.networkPolicyEnabled | bool | `false` | |
|
||||||
| controller.admissionWebhooks.objectSelector | object | `{}` | |
|
| controller.admissionWebhooks.objectSelector | object | `{}` | |
|
||||||
| controller.admissionWebhooks.patch.enabled | bool | `true` | |
|
| controller.admissionWebhooks.patch.enabled | bool | `true` | |
|
||||||
| controller.admissionWebhooks.patch.fsGroup | int | `2000` | |
|
| controller.admissionWebhooks.patch.fsGroup | int | `2000` | |
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
{{- if .Values.controller.admissionWebhooks.enabled }}
|
||||||
|
{{- if .Values.controller.admissionWebhooks.networkPolicyEnabled }}
|
||||||
|
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: {{ include "ingress-nginx.fullname" . }}-webhooks-allow
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
spec:
|
||||||
|
ingress:
|
||||||
|
- {}
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: {{ include "ingress-nginx.name" . }}
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -615,6 +615,7 @@ controller:
|
||||||
|
|
||||||
# -- Use an existing PSP instead of creating one
|
# -- Use an existing PSP instead of creating one
|
||||||
existingPsp: ""
|
existingPsp: ""
|
||||||
|
networkPolicyEnabled: false
|
||||||
|
|
||||||
service:
|
service:
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
|
Loading…
Reference in a new issue