Skip to content

Commit 375922a

Browse files
committed
Helm chart improvements
1 parent af7460a commit 375922a

File tree

7 files changed

+20
-2
lines changed

7 files changed

+20
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{- define "name-client" -}}
2-
{{ printf "%s-client-%s" $.Chart.Name $.Release.Name | replace "+" "_" | trunc 63 | trimSuffix "-" }}
2+
{{ printf "%s-client" $.Chart.Name | replace "+" "_" | trunc 63 | trimSuffix "-" }}
33
{{- end }}
44

55
{{- define "name-server" -}}
6-
{{ printf "%s-server-%s" $.Chart.Name $.Release.Name | replace "+" "_" | trunc 63 | trimSuffix "-" }}
6+
{{ printf "%s-server" $.Chart.Name | replace "+" "_" | trunc 63 | trimSuffix "-" }}
77
{{- end }}

kubernetes/helm/templates/client-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ apiVersion: v1
44
kind: ConfigMap
55
metadata:
66
name: {{ template "name-client" . }}-nginx
7+
namespace: {{ $.Release.Namespace }}
78
data:
89
nginx.conf: |
910
worker_processes auto;
@@ -24,6 +25,7 @@ apiVersion: v1
2425
kind: Secret
2526
metadata:
2627
name: {{ template "name-client" . }}-env
28+
namespace: {{ $.Release.Namespace }}
2729
stringData:
2830
INVITE_TOKEN: {{ quote .Values.peering.psk }}
2931

kubernetes/helm/templates/client-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ spec:
2121
labels:
2222
application: {{ template "name-client" . }}
2323
spec:
24+
{{- if .Values.docker.imagePullSecrets }}
25+
imagePullSecrets:
26+
{{- toYaml .Values.docker.imagePullSecrets | nindent 8 }}
27+
{{- end }}
2428
shareProcessNamespace: true
2529
{{- if .Values.client.priorityClassName }}
2630
priorityClassName: {{ .Values.client.priorityClassName }}

kubernetes/helm/templates/server-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ apiVersion: v1
44
kind: ConfigMap
55
metadata:
66
name: {{ template "name-server" . }}-nginx
7+
namespace: {{ $.Release.Namespace }}
78
data:
89
nginx.conf: |
910
worker_processes auto;
@@ -24,6 +25,7 @@ apiVersion: v1
2425
kind: Secret
2526
metadata:
2627
name: {{ template "name-server" . }}-env
28+
namespace: {{ $.Release.Namespace }}
2729
stringData:
2830
INVITE_TOKEN: {{ .Values.peering.psk | quote }}
2931

kubernetes/helm/templates/server-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ spec:
2222
labels:
2323
application: {{ template "name-server" . }}
2424
spec:
25+
{{- if .Values.docker.imagePullSecrets }}
26+
imagePullSecrets:
27+
{{- toYaml .Values.docker.imagePullSecrets | nindent 8 }}
28+
{{- end }}
2529
shareProcessNamespace: true
2630
{{- if .Values.server.priorityClassName }}
2731
priorityClassName: {{ .Values.server.priorityClassName }}

kubernetes/helm/templates/server-svc.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ metadata:
77
namespace: {{ $.Release.Namespace }}
88
labels:
99
application: {{ template "name-server" . }}
10+
{{- if .Values.server.service.annotations }}
11+
annotations:
12+
{{- toYaml .Values.server.service.annotations | nindent 4 }}
13+
{{- end }}
1014
spec:
1115
ports:
1216
- name: data

kubernetes/helm/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ server:
4343
name: server
4444

4545
service:
46+
annotations: null
4647
type: LoadBalancer
4748

4849
priorityClassName: ""
@@ -91,6 +92,7 @@ docker:
9192
wgVersion: latest # GHA
9293
nginxImage: glothriel/wormhole-nginx
9394
nginxVersion: latest # GHA
95+
pullSecrets: null
9496

9597
peering:
9698
psk: defaultPeeringKeyPleaseChangeMe

0 commit comments

Comments
 (0)