File tree Expand file tree Collapse file tree 3 files changed +58
-0
lines changed
deployments/helm/nvidia-dra-driver-gpu Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ {{- if .Values.controller.networkPolicy.enabled -}}
2+ apiVersion : networking.k8s.io/v1
3+ kind : NetworkPolicy
4+ metadata :
5+ name : {{ include "nvidia-dra-driver-gpu.name" . }}-controller
6+ namespace : {{ include "nvidia-dra-driver-gpu.namespace" . }}
7+ labels :
8+ {{- include "nvidia-dra-driver-gpu.labels" . | nindent 4 }}
9+ spec :
10+ podSelector :
11+ matchLabels :
12+ {{- include "nvidia-dra-driver-gpu.selectorLabels" (dict "context" . "componentName" "controller") | nindent 6 }}
13+ policyTypes :
14+ - Egress
15+ egress :
16+ # Some CNIs are not capable of controlling access to host network resources nor plain IP addresses,
17+ # as they are identity based and these resources are not being covered this way.
18+ #
19+ # Therefore, we cannot filter egress traffic by destination using native network policies and pod selectors.
20+ - ports :
21+ - protocol : TCP
22+ port : 443
23+ - protocol : TCP
24+ port : 6443
25+ {{- end }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.kubeletPlugin.networkPolicy.enabled -}}
2+ apiVersion : networking.k8s.io/v1
3+ kind : NetworkPolicy
4+ metadata :
5+ name : {{ include "nvidia-dra-driver-gpu.name" . }}-kubelet-plugin
6+ namespace : {{ include "nvidia-dra-driver-gpu.namespace" . }}
7+ labels :
8+ {{- include "nvidia-dra-driver-gpu.labels" . | nindent 4 }}
9+ spec :
10+ podSelector :
11+ matchLabels :
12+ {{- include "nvidia-dra-driver-gpu.selectorLabels" (dict "context" . "componentName" "kubelet-plugin") | nindent 6 }}
13+ policyTypes :
14+ - Egress
15+ egress :
16+ # Some CNIs are not capable of controlling access to host network resources nor plain IP addresses,
17+ # as they are identity based and these resources are not being covered this way.
18+ #
19+ # Therefore, we cannot filter egress traffic by destination using native network policies and pod selectors.
20+ - ports :
21+ - protocol : TCP
22+ port : 443
23+ - protocol : TCP
24+ port : 6443
25+ {{- end }}
Original file line number Diff line number Diff line change @@ -190,6 +190,10 @@ controller:
190190 - matchExpressions :
191191 - key : " node-role.kubernetes.io/control-plane"
192192 operator : " Exists"
193+ # Network policy settings
194+ networkPolicy :
195+ # If the network policy is enabled or not
196+ enabled : false
193197
194198kubeletPlugin :
195199 priorityClassName : " system-node-critical"
@@ -245,3 +249,7 @@ kubeletPlugin:
245249 operator : In
246250 values :
247251 - " true"
252+ # Network policy settings
253+ networkPolicy :
254+ # If the network policy is enabled or not
255+ enabled : false
You can’t perform that action at this time.
0 commit comments