diff --git a/charts/palworld/Chart.yaml b/charts/palworld/Chart.yaml index 75816b0..a53415f 100644 --- a/charts/palworld/Chart.yaml +++ b/charts/palworld/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: palworld -version: 0.26.2 +version: 0.26.3 description: Official helm chart for the palworld-server-docker docker image, deploys a dedicated PalWorld server to your Kubernetes cluster! type: application keywords: diff --git a/charts/palworld/templates/deployments.yaml b/charts/palworld/templates/deployments.yaml index 6fc3202..1c21f90 100644 --- a/charts/palworld/templates/deployments.yaml +++ b/charts/palworld/templates/deployments.yaml @@ -60,14 +60,24 @@ spec: - name: ADMIN_PASSWORD valueFrom: secretKeyRef: + {{- if not .Values.server.config.rcon.externalPassword }} name: "{{ .Release.Name }}-rcon-password" key: "rconPassword" + {{- else }} + name: "{{ .Values.server.config.rcon.externalPassword.name }}" + key: "{{ .Values.server.config.rcon.externalPassword.key }}" + {{- end }} {{- if .Values.server.config.community.enable }} - name: SERVER_PASSWORD valueFrom: secretKeyRef: + {{- if not .Values.server.config.community.externalPassword }} name: "{{ .Release.Name }}-community-password" key: "communityPassword" + {{- else }} + name: "{{ .Values.server.config.community.externalPassword.name }}" + key: "{{ .Values.server.config.community.externalPassword.key }}" + {{- end }} {{- end }} envFrom: - configMapRef: diff --git a/charts/palworld/templates/secrets.yaml b/charts/palworld/templates/secrets.yaml index 8ea2328..00cfb81 100644 --- a/charts/palworld/templates/secrets.yaml +++ b/charts/palworld/templates/secrets.yaml @@ -4,6 +4,7 @@ {{- define "server.community.password" -}} {{- randAlphaNum 24 | nospace -}} {{- end -}} +{{- if not .Values.server.config.rcon.externalPassword }} apiVersion: v1 kind: Secret metadata: @@ -26,8 +27,9 @@ metadata: type: Opaque stringData: rconPassword: {{- if .Values.server.config.rcon.password }} "{{ .Values.server.config.rcon.password }}" {{ else }} "{{ include "server.rcon.password" .}}" {{ end }} +{{- end }} --- -{{- if .Values.server.config.community.enable }} +{{- if and .Values.server.config.community.enable (not .Values.server.config.community.externalPassword) }} apiVersion: v1 kind: Secret metadata: diff --git a/charts/palworld/values.yaml b/charts/palworld/values.yaml index 814031f..38e12a0 100644 --- a/charts/palworld/values.yaml +++ b/charts/palworld/values.yaml @@ -111,11 +111,21 @@ server: # password: "" + # If provided, the password will be loaded from an existing secret + externalPassword: {} + # The name of the secret containing the rcon password + # name: "" + # The key in the secret containing the rcon password + # key: "" + # Community server settings # community: enable: true password: "" + externalPassword: {} + # name: "" + # key: "" # General server settings server_name: ""