Skip to content

Commit 23ac73c

Browse files
committed
Update: Configure Grafana and ExaMon API services to use NodePort in local, staging, and production environments.
1 parent 3998083 commit 23ac73c

19 files changed

Lines changed: 429 additions & 77 deletions
335 Bytes
Binary file not shown.
1 Byte
Binary file not shown.
27 Bytes
Binary file not shown.
3 Bytes
Binary file not shown.
2 Bytes
Binary file not shown.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{{- if .Values.ingress.enabled -}}
2+
apiVersion: networking.k8s.io/v1
3+
kind: Ingress
4+
metadata:
5+
name: {{ include "examon-server.fullname" . }}
6+
labels:
7+
{{- include "examon-server.labels" . | nindent 4 }}
8+
{{- with .Values.ingress.annotations }}
9+
annotations:
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
12+
spec:
13+
{{- if .Values.ingress.ingressClassName }}
14+
ingressClassName: {{ .Values.ingress.ingressClassName }}
15+
{{- end }}
16+
{{- if .Values.ingress.tls }}
17+
tls:
18+
{{- range .Values.ingress.tls }}
19+
- hosts:
20+
{{- range .hosts }}
21+
- {{ . | quote }}
22+
{{- end }}
23+
secretName: {{ .secretName }}
24+
{{- end }}
25+
{{- end }}
26+
rules:
27+
{{- range .Values.ingress.hosts }}
28+
- host: {{ .host | quote }}
29+
http:
30+
paths:
31+
{{- range .paths }}
32+
- path: {{ .path }}
33+
pathType: {{ .pathType | default "Prefix" }}
34+
backend:
35+
service:
36+
name: {{ include "examon-server.fullname" $ }}
37+
port:
38+
number: {{ $.Values.service.port }}
39+
{{- end }}
40+
{{- end }}
41+
{{- end }}

deploy/helm/examon/subcharts/examon-server/templates/service.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@ metadata:
44
name: {{ include "examon-server.fullname" . }}
55
labels:
66
{{- include "examon-server.labels" . | nindent 4 }}
7+
{{- with .Values.service.annotations }}
8+
annotations:
9+
{{- toYaml . | nindent 4 }}
10+
{{- end }}
711
spec:
812
type: {{ .Values.service.type }}
913
ports:
1014
- port: {{ .Values.service.port }}
1115
targetPort: http
1216
protocol: TCP
1317
name: http
18+
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePort }}
19+
nodePort: {{ .Values.service.nodePort }}
20+
{{- end }}
1421
selector:
1522
{{- include "examon-server.selectorLabels" . | nindent 4 }}

deploy/helm/examon/subcharts/examon-server/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ resources:
3030
memory: "1Gi"
3131
cpu: "2"
3232

33+
ingress:
34+
enabled: false
35+
ingressClassName: ""
36+
annotations: {}
37+
hosts: []
38+
tls: []
39+
3340
nodeSelector: {}
3441
tolerations: []
3542
affinity: {}

deploy/helm/examon/subcharts/mosquitto/templates/service.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ metadata:
44
name: {{ include "mosquitto.fullname" . }}
55
labels:
66
{{- include "mosquitto.labels" . | nindent 4 }}
7+
{{- with .Values.service.annotations }}
8+
annotations:
9+
{{- toYaml . | nindent 4 }}
10+
{{- end }}
711
spec:
812
type: {{ .Values.service.type }}
913
ports:

deploy/helm/examon/values-local.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ cassandra:
2929
grafana:
3030
enabled: true
3131
adminPassword: "admin" # dev-only default; override via --set for non-local envs
32+
service:
33+
type: NodePort
34+
nodePort: 3000
3235
persistence:
3336
enabled: false
3437
resources:
@@ -112,6 +115,9 @@ examon-server:
112115
image:
113116
repository: examon-registry:5111/examon/examon-server
114117
tag: "latest"
118+
service:
119+
type: NodePort
120+
nodePort: 5000
115121
config:
116122
authUrl: "http://examon-grafana/api/datasources/id/kairosdb"
117123
cassandraIp: "examon-cassandra-dc1-service"

0 commit comments

Comments
 (0)