goss.yaml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. file:
  2. {{ .Vars.loki.dataDir }}/conf/loki.yaml:
  3. mode: "0644"
  4. filetype: file
  5. exists: true
  6. owner: root
  7. contains:
  8. - "memcachedchunks:{{ .Vars.memcachedchunks.service.ports.memcached }}"
  9. - "memcachedfrontend:{{ .Vars.memcachedfrontend.service.ports.memcached }}"
  10. - "memcachedindexqueries:{{ .Vars.memcachedindexqueries.service.ports.memcached }}"
  11. - /http_listen_port.*{{ .Vars.loki.containerPorts.http }}/
  12. http:
  13. # As we need to make several API requests, we'll use different services (and pods)
  14. # to at the same time test most of them are working properly. For those services not used here,
  15. # we suppose they are running as expected given that all follow the same arch
  16. http://grafana-loki-distributor:{{ .Vars.distributor.service.ports.http }}/services:
  17. status: 200
  18. body:
  19. - "!Stopping"
  20. - "!Terminated"
  21. - "!Failed"
  22. http://grafana-loki-ingester:{{ .Vars.ingester.service.ports.http }}/config:
  23. status: 200
  24. body:
  25. - /advertise_port.*{{ .Vars.loki.containerPorts.gossipRing }}/
  26. http://grafana-loki-compactor:{{ .Vars.compactor.service.ports.http }}/compactor/ring:
  27. status: 200
  28. body:
  29. - ACTIVE
  30. addr:
  31. tcp://grafana-loki-gossip-ring:{{ .Vars.loki.gossipRing.service.ports.http }}:
  32. reachable: true
  33. command:
  34. check-logcli:
  35. exec: logcli instant-query --addr=http://grafana-loki-querier:{{ .Vars.querier.service.ports.http }} '{app="grafana-loki"}'
  36. exit-status: 0
  37. {{- $uid := .Vars.querier.containerSecurityContext.runAsUser }}
  38. {{- $gid := .Vars.querier.podSecurityContext.fsGroup }}
  39. check-user-info:
  40. # The UID and GID should always be either the one specified as vars (always a bigger number that the default)
  41. # or the one randomly defined by openshift (larger values). Otherwise, the chart is still using the default value.
  42. exec: if [ $(id -u) -lt {{ $uid }} ] || [ $(id -G | awk '{print $2}') -lt {{ $gid }} ]; then exit 1; fi
  43. exit-status: 0