Skip to content

Commit

Permalink
[swagger-ui] wait for server (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozefiel authored Jun 22, 2024
1 parent e57accb commit b38e9b3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion charts/swagger-ui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
8 changes: 7 additions & 1 deletion charts/swagger-ui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b38e9b3

Please sign in to comment.