From 3567ec7ac71156324703f718a039a8181152cca6 Mon Sep 17 00:00:00 2001 From: James Rhoat Date: Fri, 1 Nov 2024 00:30:53 -0400 Subject: [PATCH 1/3] updating test --- .../templates/tests/test-connection.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/factorio-server-charts/templates/tests/test-connection.yaml b/charts/factorio-server-charts/templates/tests/test-connection.yaml index 869a3e8..2890d67 100644 --- a/charts/factorio-server-charts/templates/tests/test-connection.yaml +++ b/charts/factorio-server-charts/templates/tests/test-connection.yaml @@ -12,10 +12,19 @@ spec: image: outdead/rcon command: - /bin/sh - - -ec + - -xec - | + until nc -z {{ include "factorio-server-charts.fullname" . }}-rcon {{ .Values.rcon.port }}; do + echo "Waiting for main service to be ready..." >&2 + sleep 5 + done + echo "Main service is ready, proceeding with connection test." RCONPW="$(cat /rconpw/rconpw)" - ./rcon -a {{ include "factorio-server-charts.fullname" . }}-rcon:{{ .Values.rcon.port }} -p $RCONPW -t rcon -T 180s /s Test + if ./rcon -a {{ include "factorio-server-charts.fullname" . }}-rcon:{{ .Values.rcon.port }} -p $RCONPW -t rcon -T 180s /s Test; then + echo "RCON test command completed successfully." + else + echo "RCON test failed." >&2 + fi volumeMounts: - mountPath: /rconpw name: rconpw From 15e51f15f6f1ad7ca5d38b1b1669230f4e0075d3 Mon Sep 17 00:00:00 2001 From: James Rhoat Date: Fri, 1 Nov 2024 00:32:41 -0400 Subject: [PATCH 2/3] updating change log --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb7a253..07957bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## Changelog +### V2.0.3 + +#### Non-Breaking Changes + +- Updated Chart test to wait for the service to become available before testing rcon port + ### V2.0.2 #### Non-Breaking Changes From 11910054e90faf4cf663417189d1e452a94a6dca Mon Sep 17 00:00:00 2001 From: James Rhoat Date: Fri, 1 Nov 2024 00:32:50 -0400 Subject: [PATCH 3/3] bumping version --- charts/factorio-server-charts/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/factorio-server-charts/Chart.yaml b/charts/factorio-server-charts/Chart.yaml index 5905d9e..5a4e149 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.0.2 +version: 2.0.3 # 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