goss.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright Broadcom, Inc. All Rights Reserved.
  2. # SPDX-License-Identifier: APACHE-2.0
  3. addr:
  4. tcp://rabbitmq:{{ .Vars.service.ports.amqp }}:
  5. reachable: true
  6. tcp://rabbitmq:{{ .Vars.service.ports.epmd }}:
  7. reachable: true
  8. tcp://rabbitmq:{{ .Vars.service.ports.dist }}:
  9. reachable: true
  10. file:
  11. {{ .Vars.persistence.mountPath }}:
  12. exists: true
  13. filetype: directory
  14. mode: "2775"
  15. owner: root
  16. /bitnami/rabbitmq/conf:
  17. exists: true
  18. filetype: directory
  19. mode: "3777"
  20. owner: root
  21. command:
  22. {{- $nodes := .Vars.replicaCount }}
  23. rabbitmqctl-cluster-status:
  24. exec: rabbitmqctl cluster_status
  25. exit-status: 0
  26. stdout:
  27. {{ range $e, $i := until $nodes }}
  28. - /rabbitmq-{{ $i }}.rabbitmq-headless/
  29. {{ end }}
  30. timeout: 30000
  31. rabbitmqctl-replication-check:
  32. {{- $vhost := printf "vhost_%s" (randAlpha 5) }}
  33. exec: rabbitmqctl add_vhost {{ $vhost }} && sleep 2 {{ range $e, $i := until $nodes }} && rabbitmqctl --node rabbit@rabbitmq-{{ $i }} list_vhosts | grep -q {{ $vhost }} {{ end }}
  34. exit-status: 0
  35. timeout: 60000
  36. rabbitmq-plugins-enabled:
  37. exec: rabbitmq-plugins list --enabled
  38. exit-status: 0
  39. stdout:
  40. {{ range $plugin := (split " " .Vars.extraPlugins) }}
  41. - "{{ $plugin }}"
  42. {{ end }}
  43. timeout: 30000
  44. {{- $uid := .Vars.containerSecurityContext.runAsUser }}
  45. {{- $gid := .Vars.podSecurityContext.fsGroup }}
  46. check-user-info:
  47. # The UID and GID should always be either the one specified as vars (always a bigger number that the default)
  48. # or the one randomly defined by openshift (larger values). Otherwise, the chart is still using the default value.
  49. exec: if [ $(id -u) -lt {{ $uid }} ] || [ $(id -G | awk '{print $2}') -lt {{ $gid }} ]; then exit 1; fi
  50. exit-status: 0
  51. timeout: 30000
  52. {{ if .Vars.serviceAccount.automountServiceAccountToken }}
  53. check-sa:
  54. 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
  55. exit-status: 0
  56. stdout:
  57. - /serviceaccount.*name.*{{.Env.BITNAMI_APP_NAME }}/
  58. timeout: 30000
  59. {{ end }}