Skip to content

Commit 377d3fd

Browse files
committed
feat: use traefik
1 parent b1b5208 commit 377d3fd

File tree

4 files changed

+34
-5
lines changed

4 files changed

+34
-5
lines changed

k8s/projects-backend/Chart.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies:
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"

k8s/projects-backend/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ appVersion: "1.16.0"
2525
dependencies:
2626
- name: common
2727
repository: oci://criprodprod.azurecr.io/helm
28-
version: 0.2.2
28+
version: 0.3.3

k8s/projects-backend/templates/ingress.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
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 }}
128
apiVersion: networking.k8s.io/v1
229
kind: Ingress
330
metadata:
@@ -24,3 +51,4 @@ spec:
2451
- hosts:
2552
- {{ .Values.hostname }}
2653
secretName: {{ printf "%s-tls" .Values.hostname }}
54+
{{- end }}

k8s/projects-backend/templates/network-policy.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"podSelector" (dict "matchLabels" (tpl (.Values.backend.commonLabels | toJson) .| fromJson) )
44
"allowFromReverseProxy" true
55
"reverseProxyNamespace" (ternary "traefik" "ingress-nginx" .Values.traefik )
6-
"additionalIngresses":
6+
"additionalIngresses" .Values.backend.networkPolicyAdditionalIngresses
77
"commonLabels" (tpl (.Values.backend.commonLabels | toJson) . | fromJson)
8+
"enableEgress" false
89
) }}
910

1011
---

0 commit comments

Comments
 (0)