Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

network-policy.yaml 909 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  1. {{- if $.Values.networkPolicy.enabled }}
  2. apiVersion: networking.k8s.io/v1
  3. kind: NetworkPolicy
  4. metadata:
  5. name: {{ include "name" . }}
  6. namespace: {{ .Release.Namespace }}
  7. spec:
  8. egress:
  9. - ports:
  10. - port: 53
  11. protocol: UDP
  12. to:
  13. - namespaceSelector:
  14. matchLabels:
  15. kubernetes.io/metadata.name: kube-system
  16. podSelector:
  17. matchLabels:
  18. k8s-app: kube-dns
  19. - to:
  20. {{- range $ip := .Values.networkPolicy.allowedBlocks }}
  21. - ipBlock:
  22. cidr: {{ $ip | quote }}
  23. {{- end }}
  24. - to:
  25. - ipBlock:
  26. cidr: 0.0.0.0/0
  27. except:
  28. - 10.0.0.0/8
  29. - 172.16.0.0/12
  30. - 192.168.0.0/16
  31. - 169.254.169.254/32
  32. podSelector:
  33. matchLabels: {{ include "labels.standard" . | nindent 6 }}
  34. policyTypes:
  35. - Egress
  36. {{- end }}
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...