File tree Expand file tree Collapse file tree 5 files changed +57
-33
lines changed
Expand file tree Collapse file tree 5 files changed +57
-33
lines changed Original file line number Diff line number Diff line change 11dependencies:
22- name: common
33 repository: oci://criprodprod.azurecr.io/helm
4- version: 0.2.2
5- digest: sha256:4acf4dc5eb4837691080a74c531fbd9799d460999ec61511d2675a2b961c88f4
6- generated: "2024-08-08T11:31:39.945125013+02 :00"
4+ version: 0.3.3
5+ digest: sha256:0ff29bcf57521c451eb9931a0bd014283f40c1c6dcbae6dec1e03d5ceb52778b
6+ generated: "2024-12-09T10:55:34.525875278+01 :00"
Original file line number Diff line number Diff line change @@ -25,4 +25,4 @@ appVersion: "1.16.0"
2525dependencies :
2626- name : common
2727 repository : oci://criprodprod.azurecr.io/helm
28- version : 0.2.2
28+ version : 0.3.3
Original file line number Diff line number Diff line change 1+ {{- if .Values.traefik }}
2+ apiVersion : networking.k8s.io/v1
3+ kind : Ingress
4+ metadata :
5+ name : {{ tpl .Values.fullName . }}
6+ labels :
7+ {{- (tpl ($.Values.backend.commonLabels | toYaml ) $) | nindent 4 }}
8+ annotations :
9+ cert-manager.io/cluster-issuer : letsencrypt-prod-traefik
10+ kubernetes.io/ingress.class : traefik
11+ spec :
12+ rules :
13+ - host : {{ .Values.hostname }}
14+ http :
15+ paths :
16+ - path : {{ .Values.ingressPath }}
17+ pathType : Prefix
18+ backend :
19+ service :
20+ name : {{ tpl .Values.fullName . }}
21+ port :
22+ name : http
23+ tls :
24+ - hosts :
25+ - {{ .Values.hostname }}
26+ secretName : {{ printf "%s-tls" .Values.hostname }}
27+ {{- else }}
128apiVersion : networking.k8s.io/v1
229kind : Ingress
330metadata :
2451 - hosts :
2552 - {{ .Values.hostname }}
2653 secretName : {{ printf "%s-tls" .Values.hostname }}
54+ {{- end }}
Original file line number Diff line number Diff line change 1- apiVersion : networking.k8s.io/v1
2- kind : NetworkPolicy
3- metadata :
4- name : {{ tpl $.Values.fullName $ }}
5- labels :
6- {{- (tpl ($.Values.backend.commonLabels | toYaml ) $) | nindent 4 }}
7- spec :
8- podSelector :
9- matchLabels :
10- {{- (tpl ($.Values.backend.commonLabels | toYaml ) $) | nindent 6 }}
11- policyTypes :
12- - Ingress
13- ingress :
14- - from :
15- # Incoming http traffic from nginx-ingress
16- - namespaceSelector :
17- matchLabels :
18- kubernetes.io/metadata.name : ingress-nginx
19- # Incoming traffic from projects namespace
20- - namespaceSelector :
21- matchLabels :
22- kubernetes.io/metadata.name : {{ .Values.namespace }}
23- # Incoming traffic from monitoring namespace
24- - namespaceSelector :
25- matchLabels :
26- kubernetes.io/metadata.name : {{ .Values.monitoringNamespace }}
27- ports :
28- - protocol : TCP
29- port : http
1+ {{ include "common.security.networkPolicy" (dict
2+ " name" (tpl .Values.fullName .)
3+ " podSelector" (dict "matchLabels" (tpl (.Values.backend.commonLabels | toJson) .| fromJson) )
4+ " allowFromReverseProxy" true
5+ " reverseProxyNamespace" (ternary "traefik" "ingress-nginx" .Values.traefik )
6+ " additionalIngresses" (get (tpl ((dict "root" .Values.backend.networkPolicyAdditionalIngresses) | toJson) . | fromJson) "root")
7+ " commonLabels" (tpl (.Values.backend.commonLabels | toJson) . | fromJson)
8+ " enableEgress" false
9+ ) }}
10+
3011---
3112apiVersion : networking.k8s.io/v1
3213kind : NetworkPolicy
Original file line number Diff line number Diff line change @@ -75,6 +75,19 @@ backend:
7575 minReplicas : 1
7676 maxReplicas : 4
7777 targetCPUUtilizationPercentage : 50
78+ networkPolicyAdditionalIngresses :
79+ - from :
80+ # Incoming traffic from projects namespace
81+ - namespaceSelector :
82+ matchLabels :
83+ kubernetes.io/metadata.name : " {{ .Values.namespace }}"
84+ # Incoming traffic from monitoring namespace
85+ - namespaceSelector :
86+ matchLabels :
87+ kubernetes.io/metadata.name : " {{ .Values.monitoringNamespace }}"
88+ ports :
89+ - protocol : TCP
90+ port : http
7891
7992celery :
8093 enabled : true
@@ -158,3 +171,5 @@ workflow:
158171 templateName : create-db
159172
160173runMigrations : true
174+
175+ traefik : false
You can’t perform that action at this time.
0 commit comments