Skip to content

Commit 4d9f99e

Browse files
committed
Improve pokertool chart
1 parent 89b28e6 commit 4d9f99e

File tree

8 files changed

+38
-26
lines changed

8 files changed

+38
-26
lines changed

charts/pokertool/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: "v2"
22
name: "pokertool"
3-
version: "0.1.0"
3+
version: "0.2.0"
44
description: "A scrum poker tool made with Angular and Kotlin"
55
keywords:
66
- "angular"

charts/pokertool/templates/backend/deploy.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,24 @@ kind: Deployment
33
metadata:
44
name: {{ template "common.names.fullname" . }}-backend
55
labels:
6-
{{- include "common.labels.standard" . | indent 4 }}
6+
{{- include "common.labels.standard" . | nindent 4 }}
77
app.kubernetes.io/component: backend
88
spec:
99
replicas: {{ .Values.backend.replicas }}
1010
selector:
1111
matchLabels:
12-
{{- include "common.labels.standard" . | indent 6 }}
12+
{{- include "common.labels.standard" . | nindent 6 }}
1313
app.kubernetes.io/component: backend
1414
template:
1515
spec:
1616
containers:
17-
- image: "{{ .Values.backend.imageRegistry }}/{{ .Values.backend.imageName }}:{{ .Values.backend.imageTag }}"
17+
{{- with .Values.backend.image}}
18+
- image: "{{ .registry }}/{{ .name }}:{{ .tag }}"
19+
{{- end }}
1820
name: {{ template "common.names.fullname" . }}-backend
1921
ports:
2022
- containerPort: 8080
2123
metadata:
2224
labels:
23-
{{- include "common.labels.standard" . | indent 8 }}
25+
{{- include "common.labels.standard" . | nindent 8 }}
2426
app.kubernetes.io/component: frontend

charts/pokertool/templates/backend/ingress.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
{{ if .Values.ingress.enabled -}}
12
apiVersion: networking.k8s.io/v1
23
kind: Ingress
34
metadata:
45
name: {{ template "common.names.fullname" . }}-backend
56
labels:
6-
{{- include "common.labels.standard" . | indent 4 }}
7+
{{- include "common.labels.standard" . | nindent 4 }}
78
app.kubernetes.io/component: backend
89
spec:
910
rules:
10-
- host: {{ .Values.domain }}
11+
- host: {{ .Values.ingress.domain | required "ingress.domain required" }}
1112
http:
1213
paths:
1314
- backend:
@@ -19,5 +20,6 @@ spec:
1920
pathType: Prefix
2021
tls:
2122
- hosts:
22-
- {{ .Values.domain }}
23+
- {{ .Values.ingress.domain | required "ingress.domain required" }}
2324
secretName: {{ template "common.names.fullname" . }}-backend-cert
25+
{{- end }}

charts/pokertool/templates/backend/svc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ kind: Service
33
metadata:
44
name: {{ template "common.names.fullname" . }}-backend
55
labels:
6-
{{- include "common.labels.standard" . | indent 4 }}
6+
{{- include "common.labels.standard" . | nindent 4 }}
77
app.kubernetes.io/component: backend
88
spec:
99
ports:
1010
- port: 80
1111
targetPort: 8080
1212
selector:
13-
{{- include "common.labels.standard" . | indent 4 }}
13+
{{- include "common.labels.standard" . | nindent 4 }}
1414
app.kubernetes.io/component: backend

charts/pokertool/templates/frontend/deploy.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,24 @@ kind: Deployment
33
metadata:
44
name: {{ template "common.names.fullname" . }}-frontend
55
labels:
6-
{{- include "common.labels.standard" . | indent 4 }}
6+
{{- include "common.labels.standard" . | nindent 4 }}
77
app.kubernetes.io/component: frontend
88
spec:
99
replicas: {{ .Values.frontend.replicas }}
1010
selector:
1111
matchLabels:
12-
{{- include "common.labels.standard" . | indent 6 }}
12+
{{- include "common.labels.standard" . | nindent 6 }}
1313
app.kubernetes.io/component: frontend
1414
template:
1515
spec:
1616
containers:
17-
- image: "{{ .Values.frontend.imageRegistry }}/{{ .Values.frontend.imageName }}:{{ .Values.frontend.imageTag }}"
17+
{{- with .Values.frontend.image}}
18+
- image: "{{ .registry }}/{{ .name }}:{{ .tag }}"
19+
{{- end }}
1820
name: {{ template "common.names.fullname" . }}-frontend
1921
ports:
2022
- containerPort: 80
2123
metadata:
2224
labels:
23-
{{- include "common.labels.standard" . | indent 8 }}
25+
{{- include "common.labels.standard" . | nindent 8 }}
2426
app.kubernetes.io/component: frontend

charts/pokertool/templates/frontend/ingress.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
{{ if .Values.ingress.enabled -}}
12
apiVersion: networking.k8s.io/v1
23
kind: Ingress
34
metadata:
45
name: {{ template "common.names.fullname" . }}-frontend
56
labels:
6-
{{- include "common.labels.standard" . | indent 4 }}
7+
{{- include "common.labels.standard" . | nindent 4 }}
78
app.kubernetes.io/component: frontend
89
spec:
910
rules:
10-
- host: {{ .Values.domain }}
11+
- host: {{ .Values.ingress.domain | required "ingress.domain required" }}
1112
http:
1213
paths:
1314
- backend:
@@ -19,5 +20,6 @@ spec:
1920
pathType: Prefix
2021
tls:
2122
- hosts:
22-
- {{ .Values.domain }}
23+
- {{ .Values.ingress.domain | required "ingress.domain required" }}
2324
secretName: {{ template "common.names.fullname" . }}-frontend-cert
25+
{{- end }}

charts/pokertool/templates/frontend/svc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ kind: Service
33
metadata:
44
name: {{ template "common.names.fullname" . }}-frontend
55
labels:
6-
{{- include "common.labels.standard" . | indent 4 }}
6+
{{- include "common.labels.standard" . | nindent 4 }}
77
app.kubernetes.io/component: frontend
88
spec:
99
ports:
1010
- port: 80
1111
targetPort: 80
1212
selector:
13-
{{- include "common.labels.standard" . | indent 4 }}
13+
{{- include "common.labels.standard" . | nindent 4 }}
1414
app.kubernetes.io/component: frontend

charts/pokertool/values.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
domain: ""
1+
ingress:
2+
enabled: true
3+
domain: ""
24

35
frontend:
4-
imageRegistry: "ghcr.io/alliander-opensource"
5-
imageName: "pokertool-frontend"
6-
imageTag: "v1.0.0"
6+
image:
7+
registry: "ghcr.io/alliander-opensource"
8+
name: "pokertool-frontend"
9+
tag: "v1.0.0"
710
replicas: 1
811

912
backend:
10-
imageRegistry: "ghcr.io/alliander-opensource"
11-
imageName: "pokertool-backend"
12-
imageTag: "v1.0.0"
13+
image:
14+
registry: "ghcr.io/alliander-opensource"
15+
name: "pokertool-backend"
16+
tag: "v1.0.0"
1317
replicas: 1

0 commit comments

Comments
 (0)