From f5dd1de9bbe4792523a210dad331c4d7bae37e2d Mon Sep 17 00:00:00 2001 From: Kariton <67470612+Kariton@users.noreply.github.com> Date: Sun, 3 Nov 2024 23:01:47 +0100 Subject: [PATCH] fix hostAliases; lost 'ports' key --- CHANGELOG.md | 7 +++ charts/factorio-server-charts/Chart.yaml | 2 +- .../templates/deployment.yaml | 57 ++++++++++--------- 3 files changed, 37 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dbc24a..3fac158 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ ## Changelog +### V2.2.1 + +#### Non-Breaking Changes + +- Correct issues in deployment when `rconAPI` and `port_fixer` are used simultaniously. +- Add missing `ports` key to rconAPI container + ### V2.2.0 #### Non-Breaking Changes diff --git a/charts/factorio-server-charts/Chart.yaml b/charts/factorio-server-charts/Chart.yaml index 057c278..34f1543 100644 --- a/charts/factorio-server-charts/Chart.yaml +++ b/charts/factorio-server-charts/Chart.yaml @@ -20,7 +20,7 @@ sources: # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.2.0 +version: 2.2.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/factorio-server-charts/templates/deployment.yaml b/charts/factorio-server-charts/templates/deployment.yaml index 8532aa6..3f9b05e 100644 --- a/charts/factorio-server-charts/templates/deployment.yaml +++ b/charts/factorio-server-charts/templates/deployment.yaml @@ -175,6 +175,35 @@ spec: value: {{ .Values.factorioServer.port | quote }} - name: RCON_PORT value: {{ .Values.factorioServer.rcon_port | quote }} +{{- if .Values.rconAPI.enabled }} + - name: {{ template "factorio-server-charts.fullname" . }}-rcon-api + image: "{{ .Values.rconAPI.image.repository }}:{{ .Values.rconAPI.image.tag }}" + imagePullPolicy: {{ .Values.rconAPI.image.pullPolicy }} + livenessProbe: + httpGet: + path: /healthz + port: rcon-api + ports: + - name: rcon-api + containerPort: 24180 + protocol: TCP + - containerPort: 24181 + protocol: TCP + env: + - name: FACTORIO_RCON_HOST + value: "localhost" + - name: FACTORIO_RCON_PORT + value: {{ .Values.factorioServer.rcon_port | quote }} + - name: FACTORIO_RCON_PASSWORD + {{- if .Values.rcon.passwordSecret }} + valueFrom: + secretKeyRef: + name: {{ .Values.rcon.passwordSecret }} + key: rconpw + {{- else }} + value: {{ .Values.rcon.password | quote }} + {{- end }} +{{- end }} {{- if .Values.port_fixer.enabled }} - name: {{ template "factorio-server-charts.fullname" . }}-port-fixer image: "{{ .Values.port_fixer.image.repository }}:{{ .Values.port_fixer.image.tag }}" @@ -208,34 +237,6 @@ spec: - pingpong3.factorio.com - pingpong4.factorio.com {{- end }} -{{- if .Values.rconAPI.enabled }} - - name: {{ template "factorio-server-charts.fullname" . }}-rcon-api - image: "{{ .Values.rconAPI.image.repository }}:{{ .Values.rconAPI.image.tag }}" - imagePullPolicy: {{ .Values.rconAPI.image.pullPolicy }} - livenessProbe: - httpGet: - path: /healthz - port: rcon-api - - name: rcon-api - containerPort: 24180 - protocol: TCP - - containerPort: 24181 - protocol: TCP - env: - - name: FACTORIO_RCON_HOST - value: "localhost" - - name: FACTORIO_RCON_PORT - value: {{ .Values.factorioServer.rcon_port | quote }} - - name: FACTORIO_RCON_PASSWORD - {{- if .Values.rcon.passwordSecret }} - valueFrom: - secretKeyRef: - name: {{ .Values.rcon.passwordSecret }} - key: rconpw - {{- else }} - value: {{ .Values.rcon.password | quote }} - {{- end }} -{{- end }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }}