Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions config/network-policy/allow-network-traffic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-egress-api
namespace: system
spec:
podSelector:
matchLabels:
app: external-secrets-operator
policyTypes:
- Ingress
- Egress
egress:
- ports:
- protocol: TCP
port: 6443 # Required: Kubernetes API server
ingress:
# Optional: expose metrics (8443 and 8080 based on user configuration)
- ports:
- protocol: TCP
port: 8443
- ports:
- protocol: TCP
port: 8080
16 changes: 16 additions & 0 deletions config/network-policy/deny-all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
labels:
app: external-secrets-operator
app.kubernetes.io/name: external-secrets-operator
app.kubernetes.io/managed-by: kustomize
name: deny-all-traffic
namespace: system
spec:
podSelector:
matchLabels:
app: external-secrets-operator
policyTypes:
- Ingress
- Egress
2 changes: 2 additions & 0 deletions config/network-policy/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
resources:
- allow-metrics-traffic.yaml
- allow-network-traffic.yaml
- deny-all.yaml