Build playable Aeternalis foundation and GitOps deployment pipeline
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{{- if .Values.networkPolicy.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-worlds
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels: { app.kubernetes.io/name: aeternalis, app.kubernetes.io/instance: {{ .Release.Name | quote }} }
|
||||
policyTypes: [Ingress, Egress]
|
||||
ingress:
|
||||
- from:
|
||||
- namespaceSelector:
|
||||
matchLabels: { kubernetes.io/metadata.name: {{ .Values.networkPolicy.ingressNamespace | quote }} }
|
||||
ports: [{ protocol: TCP, port: 8080 }]
|
||||
egress:
|
||||
- to:
|
||||
- namespaceSelector:
|
||||
matchLabels: { kubernetes.io/metadata.name: {{ .Values.networkPolicy.dnsNamespace | quote }} }
|
||||
ports: [{ protocol: UDP, port: 53 }, { protocol: TCP, port: 53 }]
|
||||
{{- range .Values.networkPolicy.databaseCIDRs }}
|
||||
- to: [{ ipBlock: { cidr: {{ . | quote }} } }]
|
||||
ports: [{ protocol: TCP, port: 5432 }]
|
||||
{{- end }}
|
||||
{{- range .Values.networkPolicy.identityCIDRs }}
|
||||
- to: [{ ipBlock: { cidr: {{ . | quote }} } }]
|
||||
ports: [{ protocol: TCP, port: 443 }]
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user