From cf946dd8457238babb0979b0b5563fb9d7ec2337 Mon Sep 17 00:00:00 2001 From: LH Date: Tue, 7 Nov 2023 09:04:02 +0100 Subject: [PATCH] fix: nVidia plugin missing network policy --- .../templates/network-policy-plugin.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 apps/nvidia-device-plugin/templates/network-policy-plugin.yml diff --git a/apps/nvidia-device-plugin/templates/network-policy-plugin.yml b/apps/nvidia-device-plugin/templates/network-policy-plugin.yml new file mode 100644 index 000000000..0d7e6c066 --- /dev/null +++ b/apps/nvidia-device-plugin/templates/network-policy-plugin.yml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ $.Release.Namespace }}-plugin + namespace: {{ $.Release.Namespace }} + labels: + {{- include "common.resource-labels" . | indent 4 }} +spec: + podSelector: + matchLabels: + app.kubernetes.io/name: {{ $.Release.Name }} + ingress: + # Accept traffic from all pods within the namespace + - from: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: {{ $.Release.Namespace }} + podSelector: {} + egress: + {{- include "common.egress-kubeapi" . | nindent 4 }} + policyTypes: + - Ingress + - Egress \ No newline at end of file