Skip to content
Snippets Groups Projects
Verified Commit c22ffdca authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

feat(metallb): Add policy to allow webhook access

This patch provides a new shared-config that can be used to allow access
from kube-system and uses this NetworkPolicy to allow access to the new
metallb AdmissionWebhook.
parent 73c31a4b
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ resources: ...@@ -7,6 +7,7 @@ resources:
- release.yaml - release.yaml
- ../../shared/networkpolicies/allow-from-same-namespace.yaml - ../../shared/networkpolicies/allow-from-same-namespace.yaml
- ../../shared/networkpolicies/allow-from-monitoring.yaml - ../../shared/networkpolicies/allow-from-monitoring.yaml
- ../../shared/networkpolicies/allow-from-kube-system.yaml
patchesStrategicMerge: patchesStrategicMerge:
- networkpolicy.yaml - networkpolicy.yaml
configMapGenerator: configMapGenerator:
......
...@@ -8,3 +8,14 @@ spec: ...@@ -8,3 +8,14 @@ spec:
matchLabels: matchLabels:
app.kubernetes.io/instance: metallb app.kubernetes.io/instance: metallb
app.kubernetes.io/name: metallb app.kubernetes.io/name: metallb
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-kube-system
spec:
podSelector:
matchLabels:
app.kubernetes.io/instance: metallb
app.kubernetes.io/name: metallb
app.kubernetes.io/component: controller
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-kube-system
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
- from:
- ipBlock:
cidr: 192.168.100.0/24 # Kubernetes hosts
- ipBlock:
cidr: 10.96.0.1/32 # KubeAPI
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment