Skip to content

Commit 8bf00af

Browse files
committed
refactor
Signed-off-by: Andrei Kvapil <[email protected]>
1 parent f8df224 commit 8bf00af

3 files changed

Lines changed: 36 additions & 36 deletions

File tree

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
2-
{{- $issuerType := (index $cozyConfig.data "clusterissuer") | default "http01" }}
1+
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
2+
{{- $issuerType := (index $cozyConfig.data "clusterissuer") | default "http01" }}
33

4-
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
5-
{{- $host := index $myNS.metadata.annotations "namespace.cozystack.io/host" }}
4+
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
5+
{{- $host := index $myNS.metadata.annotations "namespace.cozystack.io/host" }}
66

7-
{{- if .Values.dashboard }}
8-
apiVersion: networking.k8s.io/v1
9-
kind: Ingress
10-
metadata:
11-
annotations:
12-
cert-manager.io/cluster-issuer: letsencrypt-prod
7+
{{- if .Values.dashboard }}
8+
apiVersion: networking.k8s.io/v1
9+
kind: Ingress
10+
metadata:
11+
annotations:
12+
cert-manager.io/cluster-issuer: letsencrypt-prod
1313
{{- if eq $issuerType "cloudflare" }}
14-
{{- else }}
15-
acme.cert-manager.io/http01-ingress-class: {{ .Release.Namespace }}
16-
{{- end }}
17-
name: dashboard-{{ .Release.Namespace }}
18-
namespace: cozy-dashboard
19-
spec:
20-
ingressClassName: {{ .Release.Namespace }}
21-
rules:
22-
- host: dashboard.{{ $host }}
23-
http:
24-
paths:
25-
- backend:
26-
service:
27-
name: dashboard
28-
port:
29-
number: 80
30-
path: /
31-
pathType: Prefix
32-
tls:
33-
- hosts:
34-
- dashboard.{{ $host }}
35-
secretName: dashboard-{{ .Release.Namespace }}-tls
14+
{{- else }}
15+
acme.cert-manager.io/http01-ingress-class: {{ .Release.Namespace }}
16+
{{- end }}
17+
name: dashboard-{{ .Release.Namespace }}
18+
namespace: cozy-dashboard
19+
spec:
20+
ingressClassName: {{ .Release.Namespace }}
21+
rules:
22+
- host: dashboard.{{ $host }}
23+
http:
24+
paths:
25+
- backend:
26+
service:
27+
name: dashboard
28+
port:
29+
number: 80
30+
path: /
31+
pathType: Prefix
32+
tls:
33+
- hosts:
34+
- dashboard.{{ $host }}
35+
secretName: dashboard-{{ .Release.Namespace }}-tls
3636
{{- end }}

‎packages/extra/monitoring/templates/alerta/alerta.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
1+
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
22
{{- $issuerType := (index $cozyConfig.data "clusterissuer") | default "http01" }}
33

44
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
@@ -36,7 +36,7 @@ data:
3636
'endpoint' : "/api",
3737
'provider' : "basic"
3838
})
39-
.constant('colors', {});
39+
.constant('colors', {});
4040
---
4141
apiVersion: v1
4242
kind: Service

‎packages/extra/monitoring/templates/grafana/grafana.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
1+
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
22
{{- $issuerType := (index $cozyConfig.data "clusterissuer") | default "http01" }}
33

44
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
@@ -94,7 +94,7 @@ spec:
9494
metadata:
9595
annotations:
9696
{{- if ne $issuerType "cloudflare" }}
97-
acme.cert-manager.io/http01-ingress-class: "{{ $ingress }}"
97+
acme.cert-manager.io/http01-ingress-class: "{{ $ingress }}"
9898
{{- end }}
9999
cert-manager.io/cluster-issuer: letsencrypt-prod
100100
spec:

0 commit comments

Comments
 (0)