Skip to content
Open
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
56 changes: 56 additions & 0 deletions deploy/handler/network_policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,25 @@ spec:
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-webhook-egress-dns
namespace: {{ .HandlerNamespace }}
spec:
podSelector:
matchLabels:
app: kubernetes-nmstate
component: kubernetes-nmstate-webhook
egress:
- ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53
policyTypes:
- Egress
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-metrics-egress-api-6443
namespace: {{ .HandlerNamespace }}
Expand All @@ -138,6 +157,43 @@ spec:
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-metrics-egress-dns
namespace: {{ .HandlerNamespace }}
spec:
podSelector:
matchLabels:
app: kubernetes-nmstate
component: kubernetes-nmstate-metrics
egress:
- ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53
policyTypes:
- Egress
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-operator-egress-dns
namespace: {{ .OperatorNamespace }}
spec:
podSelector:
matchLabels:
app: kubernetes-nmstate-operator
egress:
- ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53
policyTypes:
- Egress
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-labelled-operator
namespace: {{ .OperatorNamespace }}
Expand Down
16 changes: 12 additions & 4 deletions deploy/handler/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,19 @@ spec:
- containerPort: 8443
name: metrics
protocol: TCP
readinessProbe:
startupProbe:
tcpSocket:
port: metrics
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 18
readinessProbe:
tcpSocket:
port: metrics
periodSeconds: 10
livenessProbe:
tcpSocket:
port: metrics
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
Expand Down Expand Up @@ -184,6 +188,12 @@ spec:
- containerPort: 9443
name: webhook-server
protocol: TCP
startupProbe:
tcpSocket:
port: webhook-server
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 18
readinessProbe:
httpGet:
path: /readyz
Expand All @@ -192,7 +202,6 @@ spec:
httpHeaders:
- name: Content-Type
value: application/json
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
httpGet:
Expand All @@ -202,7 +211,6 @@ spec:
httpHeaders:
- name: Content-Type
value: application/json
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
Expand Down