diff --git a/charts/swagger-ui/Chart.yaml b/charts/swagger-ui/Chart.yaml index e45f2b8b..04619885 100644 --- a/charts/swagger-ui/Chart.yaml +++ b/charts/swagger-ui/Chart.yaml @@ -3,7 +3,7 @@ name: swagger-ui description: A Helm chart for Swagger UI icon: https://avatars.githubusercontent.com/u/23452093?s=200&v=4 type: application -version: 0.1.0 +version: 0.1.1 appVersion: "v5.17.14" engine: gotpl maintainers: @@ -14,3 +14,9 @@ annotations: artifacthub.io/images: | - name: swagger-ui image: swaggerapi/swagger-ui + artifacthub.io/changes: | + - kind: fixed + description: Wait for server in fetch initContainers + links: + - name: GitHub PR + url: https://github.com/FRINXio/helm-charts/pull/381 diff --git a/charts/swagger-ui/templates/deployment.yaml b/charts/swagger-ui/templates/deployment.yaml index 69f3f702..6a0d95b2 100644 --- a/charts/swagger-ui/templates/deployment.yaml +++ b/charts/swagger-ui/templates/deployment.yaml @@ -43,7 +43,13 @@ spec: mountPath: "/tmp" readOnly: false command: ["/bin/sh","-c"] - args: ["wget --no-check-certificate {{ $value.fetch.url }} -O /tmp/{{ $value.fetch.file }}"] + args: + - | + until curl -s -o /dev/null -w "%{http_code}" {{ $value.fetch.url }} | grep -q "200"; do + echo "Waiting for server to be up..." + sleep 5 + done + wget --no-check-certificate {{ $value.fetch.url }} -O /tmp/{{ $value.fetch.file }} {{- if $value.formatConfigMap }} - name: "{{ $key }}-format" image: python:3.12-slim