Skip to content

Commit

Permalink
Improve pokertool chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortoaster committed Jan 30, 2025
1 parent 89b28e6 commit 4d9f99e
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 26 deletions.
2 changes: 1 addition & 1 deletion charts/pokertool/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: "v2"
name: "pokertool"
version: "0.1.0"
version: "0.2.0"
description: "A scrum poker tool made with Angular and Kotlin"
keywords:
- "angular"
Expand Down
10 changes: 6 additions & 4 deletions charts/pokertool/templates/backend/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@ kind: Deployment
metadata:
name: {{ template "common.names.fullname" . }}-backend
labels:
{{- include "common.labels.standard" . | indent 4 }}
{{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: backend
spec:
replicas: {{ .Values.backend.replicas }}
selector:
matchLabels:
{{- include "common.labels.standard" . | indent 6 }}
{{- include "common.labels.standard" . | nindent 6 }}
app.kubernetes.io/component: backend
template:
spec:
containers:
- image: "{{ .Values.backend.imageRegistry }}/{{ .Values.backend.imageName }}:{{ .Values.backend.imageTag }}"
{{- with .Values.backend.image}}
- image: "{{ .registry }}/{{ .name }}:{{ .tag }}"
{{- end }}
name: {{ template "common.names.fullname" . }}-backend
ports:
- containerPort: 8080
metadata:
labels:
{{- include "common.labels.standard" . | indent 8 }}
{{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: frontend
8 changes: 5 additions & 3 deletions charts/pokertool/templates/backend/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{{ if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "common.names.fullname" . }}-backend
labels:
{{- include "common.labels.standard" . | indent 4 }}
{{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: backend
spec:
rules:
- host: {{ .Values.domain }}
- host: {{ .Values.ingress.domain | required "ingress.domain required" }}
http:
paths:
- backend:
Expand All @@ -19,5 +20,6 @@ spec:
pathType: Prefix
tls:
- hosts:
- {{ .Values.domain }}
- {{ .Values.ingress.domain | required "ingress.domain required" }}
secretName: {{ template "common.names.fullname" . }}-backend-cert
{{- end }}
4 changes: 2 additions & 2 deletions charts/pokertool/templates/backend/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ kind: Service
metadata:
name: {{ template "common.names.fullname" . }}-backend
labels:
{{- include "common.labels.standard" . | indent 4 }}
{{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: backend
spec:
ports:
- port: 80
targetPort: 8080
selector:
{{- include "common.labels.standard" . | indent 4 }}
{{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: backend
10 changes: 6 additions & 4 deletions charts/pokertool/templates/frontend/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@ kind: Deployment
metadata:
name: {{ template "common.names.fullname" . }}-frontend
labels:
{{- include "common.labels.standard" . | indent 4 }}
{{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: frontend
spec:
replicas: {{ .Values.frontend.replicas }}
selector:
matchLabels:
{{- include "common.labels.standard" . | indent 6 }}
{{- include "common.labels.standard" . | nindent 6 }}
app.kubernetes.io/component: frontend
template:
spec:
containers:
- image: "{{ .Values.frontend.imageRegistry }}/{{ .Values.frontend.imageName }}:{{ .Values.frontend.imageTag }}"
{{- with .Values.frontend.image}}
- image: "{{ .registry }}/{{ .name }}:{{ .tag }}"
{{- end }}
name: {{ template "common.names.fullname" . }}-frontend
ports:
- containerPort: 80
metadata:
labels:
{{- include "common.labels.standard" . | indent 8 }}
{{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: frontend
8 changes: 5 additions & 3 deletions charts/pokertool/templates/frontend/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{{ if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "common.names.fullname" . }}-frontend
labels:
{{- include "common.labels.standard" . | indent 4 }}
{{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: frontend
spec:
rules:
- host: {{ .Values.domain }}
- host: {{ .Values.ingress.domain | required "ingress.domain required" }}
http:
paths:
- backend:
Expand All @@ -19,5 +20,6 @@ spec:
pathType: Prefix
tls:
- hosts:
- {{ .Values.domain }}
- {{ .Values.ingress.domain | required "ingress.domain required" }}
secretName: {{ template "common.names.fullname" . }}-frontend-cert
{{- end }}
4 changes: 2 additions & 2 deletions charts/pokertool/templates/frontend/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ kind: Service
metadata:
name: {{ template "common.names.fullname" . }}-frontend
labels:
{{- include "common.labels.standard" . | indent 4 }}
{{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: frontend
spec:
ports:
- port: 80
targetPort: 80
selector:
{{- include "common.labels.standard" . | indent 4 }}
{{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: frontend
18 changes: 11 additions & 7 deletions charts/pokertool/values.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
domain: ""
ingress:
enabled: true
domain: ""

frontend:
imageRegistry: "ghcr.io/alliander-opensource"
imageName: "pokertool-frontend"
imageTag: "v1.0.0"
image:
registry: "ghcr.io/alliander-opensource"
name: "pokertool-frontend"
tag: "v1.0.0"
replicas: 1

backend:
imageRegistry: "ghcr.io/alliander-opensource"
imageName: "pokertool-backend"
imageTag: "v1.0.0"
image:
registry: "ghcr.io/alliander-opensource"
name: "pokertool-backend"
tag: "v1.0.0"
replicas: 1

0 comments on commit 4d9f99e

Please sign in to comment.