http:
  http://spring-cloud-dataflow-skipper:{{ .Vars.skipper.service.port }}:
    status: 200
file:
  /opt/bitnami/spring-cloud-dataflow/conf/application.yml:
    exists: true
    filetype: symlink
    mode: "0777"
    owner: root
    contains:
    - {{ .Vars.server.configuration.accountName }}
    - /runAsUser.*{{ .Vars.deployer.podSecurityContext.runAsUser }}/
    - /url.*jdbc:mariadb.*{{ .Vars.mariadb.auth.database }}/
    - /username.*{{ .Vars.mariadb.auth.username }}/
  /etc/secrets/database:
    exists: true
    filetype: directory
    mode: "3777"
    owner: root
command:
  {{- $uid := .Vars.server.containerSecurityContext.runAsUser }}
  {{- $gid := .Vars.server.podSecurityContext.fsGroup }}
  check-user-info:
    # The UID and GID should always be either the one specified as vars (always a bigger number that the default)
    # or the one randomly defined by openshift (larger values). Otherwise, the chart is still using the default value.
    exec: if [ $(id -u) -lt {{ $uid }} ] || [ $(id -G | awk '{print $2}') -lt {{ $gid }} ]; then exit 1; fi
    exit-status: 0
  {{ if .Vars.serviceAccount.automountServiceAccountToken }}
  check-sa:
    exec: cat /var/run/secrets/kubernetes.io/serviceaccount/token | cut -d '.' -f 2 | xargs -I '{}' echo '{}====' | fold -w 4 | sed '$ d' | tr -d '\n' | base64 -d
    exit-status: 0
    stdout:
    - /serviceaccount.*name.*{{.Env.BITNAMI_APP_NAME }}/
  {{ end }}
