| Giorgi Lekveishvili | d87487d | 2025-07-07 14:03:30 +0400 | [diff] [blame^] | 1 | {{- if .Values.networkPolicies.enabled }} |
| 2 | apiVersion: networking.k8s.io/v1 |
| 3 | kind: NetworkPolicy |
| 4 | metadata: |
| 5 | name: longhorn-manager |
| 6 | namespace: {{ include "release_namespace" . }} |
| 7 | spec: |
| 8 | podSelector: |
| 9 | matchLabels: |
| 10 | app: longhorn-manager |
| 11 | policyTypes: |
| 12 | - Ingress |
| 13 | ingress: |
| 14 | - from: |
| 15 | - podSelector: |
| 16 | matchLabels: |
| 17 | app: longhorn-manager |
| 18 | - podSelector: |
| 19 | matchLabels: |
| 20 | app: longhorn-ui |
| 21 | - podSelector: |
| 22 | matchLabels: |
| 23 | app: longhorn-csi-plugin |
| 24 | - podSelector: |
| 25 | matchLabels: |
| 26 | longhorn.io/managed-by: longhorn-manager |
| 27 | matchExpressions: |
| 28 | - { key: recurring-job.longhorn.io, operator: Exists } |
| 29 | - podSelector: |
| 30 | matchExpressions: |
| 31 | - { key: longhorn.io/job-task, operator: Exists } |
| 32 | - podSelector: |
| 33 | matchLabels: |
| 34 | app: longhorn-driver-deployer |
| 35 | {{- end }} |