Skip to content

Commit 26225c2

Browse files
committed
feat(monitor): add ingress for monitor
1 parent 01784e0 commit 26225c2

9 files changed

Lines changed: 150 additions & 15 deletions
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{ if .Values.cert_manager_enabled }}
2+
apiVersion: cert-manager.io/v1alpha2
3+
kind: Certificate
4+
metadata:
5+
name: drycc-monitor-grafana
6+
namespace: "{{ .Release.Namespace }}"
7+
spec:
8+
secretName: drycc-monitor-grafana-auto-tls
9+
issuerRef:
10+
name: drycc-cluster-issuer
11+
kind: ClusterIssuer
12+
dnsNames:
13+
- drycc.{{ .Values.platform_domain }}
14+
privateKey:
15+
rotationPolicy: Always
16+
{{- end }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: networking.k8s.io/v1beta1
2+
kind: Ingress
3+
metadata:
4+
namespace: "{{ .Release.Namespace }}"
5+
name: "drycc-monitor-grafana-ingress"
6+
labels:
7+
app: "drycc-monitor-grafana"
8+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
9+
release: "{{ .Release.Name }}"
10+
heritage: "{{ .Release.Service }}"
11+
annotations:
12+
kubernetes.io/tls-acme: "true"
13+
{{- if not (eq .Values.global.ingress_class "") }}
14+
kubernetes.io/ingress.class: "{{ .Values.global.ingress_class }}"
15+
{{ end }}
16+
spec:
17+
rules:
18+
- host: drycc.{{ .Values.platform_domain }}
19+
http:
20+
paths:
21+
{{- if eq .Values.global.ingress_class "gce" "alb" }}
22+
- path: /*
23+
{{- else }}{{/* Has annotations but ingress class is not "gce" nor "alb" */}}
24+
- path: /
25+
{{- end }}
26+
backend:
27+
serviceName: drycc-monitor-grafana
28+
servicePort: 80
29+
{{ if .Values.cert_manager_enabled }}
30+
tls:
31+
- secretName: drycc-monitor-grafana-auto-tls
32+
hosts:
33+
- drycc-monitor-grafana.{{ .Values.platform_domain }}
34+
{{- end }}

charts/monitor/charts/grafana/templates/monitor-grafana-svc.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ metadata:
66
labels:
77
heritage: drycc
88
app: drycc-monitor-grafana
9-
router.drycc.cc/routable: "true"
10-
annotations:
11-
router.drycc.cc/domains: grafana
12-
router.drycc.cc/connectTimeout: "10"
13-
router.drycc.cc/tcpTimeout: "1200"
149
spec:
1510
ports:
1611
- port: 80
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{ if .Values.cert_manager_enabled }}
2+
apiVersion: cert-manager.io/v1alpha2
3+
kind: Certificate
4+
metadata:
5+
name: drycc-monitor-influxapi
6+
namespace: "{{ .Release.Namespace }}"
7+
spec:
8+
secretName: drycc-monitor-influxapi-auto-tls
9+
issuerRef:
10+
name: drycc-cluster-issuer
11+
kind: ClusterIssuer
12+
dnsNames:
13+
- drycc.{{ .Values.platform_domain }}
14+
privateKey:
15+
rotationPolicy: Always
16+
{{- end }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: networking.k8s.io/v1beta1
2+
kind: Ingress
3+
metadata:
4+
namespace: "{{ .Release.Namespace }}"
5+
name: "drycc-monitor-influxapi-ingress"
6+
labels:
7+
app: "drycc-monitor-influxapi"
8+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
9+
release: "{{ .Release.Name }}"
10+
heritage: "{{ .Release.Service }}"
11+
annotations:
12+
kubernetes.io/tls-acme: "true"
13+
{{- if not (eq .Values.global.ingress_class "") }}
14+
kubernetes.io/ingress.class: "{{ .Values.global.ingress_class }}"
15+
{{ end }}
16+
spec:
17+
rules:
18+
- host: drycc.{{ .Values.platform_domain }}
19+
http:
20+
paths:
21+
{{- if eq .Values.global.ingress_class "gce" "alb" }}
22+
- path: /*
23+
{{- else }}{{/* Has annotations but ingress class is not "gce" nor "alb" */}}
24+
- path: /
25+
{{- end }}
26+
backend:
27+
serviceName: drycc-monitor-influxapi
28+
servicePort: 80
29+
{{ if .Values.cert_manager_enabled }}
30+
tls:
31+
- secretName: drycc-monitor-influxapi-auto-tls
32+
hosts:
33+
- drycc-monitor-influxapi.{{ .Values.platform_domain }}
34+
{{- end }}

charts/monitor/charts/influxdb/templates/monitor-influxdb-api-svc.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ metadata:
66
labels:
77
heritage: drycc
88
app: drycc-monitor-influxapi
9-
router.drycc.cc/routable: "true"
10-
annotations:
11-
router.drycc.cc/domains: influxapi
12-
router.drycc.cc/connectTimeout: "10"
13-
router.drycc.cc/tcpTimeout: "1200"
149
spec:
1510
ports:
1611
- port: 80
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{ if .Values.cert_manager_enabled }}
2+
apiVersion: cert-manager.io/v1alpha2
3+
kind: Certificate
4+
metadata:
5+
name: drycc-monitor-influxui
6+
namespace: "{{ .Release.Namespace }}"
7+
spec:
8+
secretName: drycc-monitor-influxui-auto-tls
9+
issuerRef:
10+
name: drycc-cluster-issuer
11+
kind: ClusterIssuer
12+
dnsNames:
13+
- drycc.{{ .Values.platform_domain }}
14+
privateKey:
15+
rotationPolicy: Always
16+
{{- end }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: networking.k8s.io/v1beta1
2+
kind: Ingress
3+
metadata:
4+
namespace: "{{ .Release.Namespace }}"
5+
name: "drycc-monitor-influxui-ingress"
6+
labels:
7+
app: "drycc-monitor-influxui"
8+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
9+
release: "{{ .Release.Name }}"
10+
heritage: "{{ .Release.Service }}"
11+
annotations:
12+
kubernetes.io/tls-acme: "true"
13+
{{- if not (eq .Values.global.ingress_class "") }}
14+
kubernetes.io/ingress.class: "{{ .Values.global.ingress_class }}"
15+
{{ end }}
16+
spec:
17+
rules:
18+
- host: drycc.{{ .Values.platform_domain }}
19+
http:
20+
paths:
21+
{{- if eq .Values.global.ingress_class "gce" "alb" }}
22+
- path: /*
23+
{{- else }}{{/* Has annotations but ingress class is not "gce" nor "alb" */}}
24+
- path: /
25+
{{- end }}
26+
backend:
27+
serviceName: drycc-monitor-influxui
28+
servicePort: 80
29+
{{ if .Values.cert_manager_enabled }}
30+
tls:
31+
- secretName: drycc-monitor-influxui-auto-tls
32+
hosts:
33+
- drycc-monitor-influxui.{{ .Values.platform_domain }}
34+
{{- end }}

charts/monitor/charts/influxdb/templates/monitor-influxdb-ui-svc.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ metadata:
66
labels:
77
heritage: drycc
88
app: drycc-monitor-influxui
9-
router.drycc.cc/routable: "true"
10-
annotations:
11-
router.drycc.cc/domains: influx
12-
router.drycc.cc/connectTimeout: "10"
13-
router.drycc.cc/tcpTimeout: "1200"
149
spec:
1510
ports:
1611
- port: 80

0 commit comments

Comments
 (0)