goss.yaml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Copyright Broadcom, Inc. All Rights Reserved.
  2. # SPDX-License-Identifier: APACHE-2.0
  3. http:
  4. http://127.0.0.1:{{ .Vars.alloy.containerPorts.http }}/-/healthy:
  5. status: 200
  6. body:
  7. - /All Alloy components are healthy./
  8. http://grafana-alloy:{{ .Vars.service.ports.http }}/-/healthy:
  9. status: 200
  10. body:
  11. - /All Alloy components are healthy./
  12. http://127.0.0.1:{{ .Vars.alloy.containerPorts.http }}/metrics:
  13. status: 200
  14. body:
  15. - /alloy_build_info/
  16. http://grafana-alloy:{{ .Vars.service.ports.http }}/metrics:
  17. status: 200
  18. body:
  19. - /alloy_build_info/
  20. file:
  21. /opt/bitnami/grafana-alloy/config/config.alloy:
  22. exists: true
  23. filetype: symlink
  24. {{ if .Vars.alloy.mounts.varlog }}
  25. /var/log:
  26. exists: true
  27. filetype: directory
  28. {{ end }}
  29. command:
  30. {{- $uid := .Vars.alloy.containerSecurityContext.runAsUser }}
  31. {{- $gid := .Vars.podSecurityContext.fsGroup }}
  32. check-user-info:
  33. # The UID and GID should always be either the one specified as vars (always a bigger number that the default)
  34. # or the one randomly defined by openshift (larger values). Otherwise, the chart is still using the default value.
  35. exec: if [ $(id -u) -lt {{ $uid }} ] || [ $(id -G | awk '{print $2}') -lt {{ $gid }} ]; then exit 1; fi
  36. exit-status: 0
  37. {{ if .Vars.automountServiceAccountToken }}
  38. check-sa:
  39. 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
  40. exit-status: 0
  41. stdout:
  42. - /serviceaccount.*name.*{{.Env.BITNAMI_APP_NAME }}/
  43. {{ end }}