Skip to content

Commit 2e95f8d

Browse files
committed
fix(helm-chart): add a network policy allowing egress to ibm cis
1 parent 1ca1754 commit 2e95f8d

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

deploy/cert-manager-ibm-cis-webhook/templates/networkpolicies.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ metadata:
2727
spec:
2828
podSelector:
2929
matchLabels:
30-
app: {{ include "cert-manager-ibm-cis-webhook.name" . }}
30+
app.kubernetes.io/name: {{ include "cert-manager-ibm-cis-webhook.name" . }}
3131
policyTypes:
3232
- Ingress
3333
ingress:
3434
- from:
3535
- podSelector: {}
36+
- namespaceSelector: {}
3637
ports:
3738
- protocol: TCP
3839
port: {{ .Values.containerPort }}
@@ -44,9 +45,23 @@ metadata:
4445
spec:
4546
podSelector:
4647
matchLabels:
47-
app: {{ include "cert-manager-ibm-cis-webhook.name" . }}
48+
app.kubernetes.io/name: {{ include "cert-manager-ibm-cis-webhook.name" . }}
4849
policyTypes:
4950
- Egress
5051
egress:
5152
- {}
53+
---
54+
apiVersion: networking.k8s.io/v1
55+
kind: NetworkPolicy
56+
metadata:
57+
name: allow-egress-to-cis
58+
spec:
59+
podSelector:
60+
matchLabels:
61+
app.kubernetes.io/name: {{ include "cert-manager-ibm-cis-webhook.name" . }}
62+
policyTypes:
63+
- Egress
64+
egress:
65+
- ports:
66+
- port: 443
5267
{{- end }}

0 commit comments

Comments
 (0)