Skip to content

Commit 697230c

Browse files
Merge pull request #67 from siddhibhor-56/network-policy-new
ESO-222: Implementation of Network Policy for external secrets Operator
2 parents e3fe1cf + c393ba1 commit 697230c

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: NetworkPolicy
3+
metadata:
4+
name: allow-egress-api
5+
namespace: system
6+
spec:
7+
podSelector:
8+
matchLabels:
9+
app: external-secrets-operator
10+
policyTypes:
11+
- Ingress
12+
- Egress
13+
egress:
14+
- ports:
15+
- protocol: TCP
16+
port: 6443 # Required: Kubernetes API server
17+
ingress:
18+
# Optional: expose metrics (8443 and 8080 based on user configuration)
19+
- ports:
20+
- protocol: TCP
21+
port: 8443
22+
- ports:
23+
- protocol: TCP
24+
port: 8080
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: NetworkPolicy
3+
metadata:
4+
labels:
5+
app: external-secrets-operator
6+
app.kubernetes.io/name: external-secrets-operator
7+
app.kubernetes.io/managed-by: kustomize
8+
name: deny-all-traffic
9+
namespace: system
10+
spec:
11+
podSelector:
12+
matchLabels:
13+
app: external-secrets-operator
14+
policyTypes:
15+
- Ingress
16+
- Egress
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
resources:
22
- allow-metrics-traffic.yaml
3+
- allow-network-traffic.yaml
4+
- deny-all.yaml

0 commit comments

Comments
 (0)