github.com/replicatedcom/ship@v0.50.0/integration/init/istio/expected/.ship/upstream/templates/install-custom-resources.sh.tpl (about)

     1  {{ define "install-custom-resources.sh.tpl" }}
     2  #!/bin/sh
     3  
     4  set -x
     5  
     6  if [ "$#" -ne "1" ]; then
     7      echo "first argument should be path to custom resource yaml"
     8      exit 1
     9  fi
    10  
    11  pathToResourceYAML=${1}
    12  
    13  kubectl get validatingwebhookconfiguration istio-galley 2>/dev/null
    14  if [ "$?" -eq 0 ]; then
    15      echo "istio-galley validatingwebhookconfiguration found - waiting for istio-galley deployment to be ready"
    16      while true; do
    17          kubectl -n {{ .Release.Namespace }} get deployment istio-galley 2>/dev/null
    18          if [ "$?" -eq 0 ]; then
    19              break
    20          fi
    21          sleep 1
    22      done
    23      kubectl -n {{ .Release.Namespace }} rollout status deployment istio-galley
    24      if [ "$?" -ne 0 ]; then
    25          echo "istio-galley deployment rollout status check failed"
    26          exit 1
    27      fi
    28      echo "istio-galley deployment ready for configuration validation"
    29  fi
    30  sleep 5
    31  kubectl apply -f ${pathToResourceYAML}
    32  {{ end }}