goss.yaml 1.1 KB

12345678910111213141516171819202122232425262728
  1. # Copyright Broadcom, Inc. All Rights Reserved.
  2. # SPDX-License-Identifier: APACHE-2.0
  3. http:
  4. https://127.0.0.1:{{ .Vars.containerPorts.https }}/metrics:
  5. status: 200
  6. allow-insecure: true
  7. body:
  8. - metrics_server_storage_points
  9. https://metrics-server:{{ .Vars.service.ports.https }}/metrics:
  10. status: 200
  11. allow-insecure: true
  12. body:
  13. - metrics_server_storage_points
  14. command:
  15. {{- $uid := .Vars.containerSecurityContext.runAsUser }}
  16. check-user-info:
  17. # The UID and GID should always be either the one specified as vars (always a bigger number that the default)
  18. # or the one randomly defined by openshift (larger values). Otherwise, the chart is still using the default value.
  19. exec: if [ $(id -u) -lt {{ $uid }} ]; then exit 1; fi
  20. exit-status: 0
  21. {{ if .Vars.automountServiceAccountToken }}
  22. check-sa:
  23. 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
  24. exit-status: 0
  25. stdout:
  26. - /serviceaccount.*name.*{{.Env.BITNAMI_APP_NAME }}/
  27. {{ end }}