Skip to content

Commit f75dd52

Browse files
committed
add NetworkPolicy objects for catalogd and operator-controller
Signed-off-by: Joe Lanford <[email protected]>
1 parent 1171691 commit f75dd52

File tree

5 files changed

+43
-1
lines changed

5 files changed

+43
-1
lines changed

config/base/catalogd/manager/kustomization.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
resources:
22
- manager.yaml
3-
- catalogd_service.yaml
3+
- service.yaml
4+
- network_policy.yaml
45
- webhook/manifests.yaml
56
apiVersion: kustomize.config.k8s.io/v1beta1
67
kind: Kustomization
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: NetworkPolicy
3+
metadata:
4+
name: controller-manager
5+
namespace: system
6+
spec:
7+
podSelector:
8+
matchLabels:
9+
control-plane: catalogd-controller-manager
10+
policyTypes:
11+
- Ingress
12+
- Egress
13+
ingress:
14+
- ports:
15+
- protocol: TCP
16+
port: 7443 # metrics
17+
- protocol: TCP
18+
port: 8443 # catalogd http server
19+
- protocol: TCP
20+
port: 9443 # webhook
21+
egress:
22+
- {} # Allows all egress traffic (needed to pull catalog images from arbitrary image registries)

config/base/operator-controller/manager/kustomization.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ kind: Kustomization
44
resources:
55
- manager.yaml
66
- service.yaml
7+
- network_policy.yaml
78

89
images:
910
- name: controller
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: NetworkPolicy
3+
metadata:
4+
name: controller-manager
5+
namespace: system
6+
spec:
7+
podSelector:
8+
matchLabels:
9+
control-plane: operator-controller-controller-manager
10+
policyTypes:
11+
- Ingress
12+
- Egress
13+
ingress:
14+
- ports:
15+
- protocol: TCP
16+
port: 8443 # metrics
17+
egress:
18+
- {} # Allows all egress traffic (needed to pull bundle images from arbitrary image registries)

0 commit comments

Comments
 (0)