_es.tpl 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {{- define "es.workload" -}}
  2. workload:
  3. elasticsearch:
  4. enabled: true
  5. type: Deployment
  6. podSpec:
  7. hostNetwork: false
  8. containers:
  9. elasticsearch:
  10. enabled: true
  11. primary: true
  12. imageSelector: elasticSearchImage
  13. securityContext:
  14. runAsUser: 1000
  15. runAsGroup: 1000
  16. readOnlyRootFilesystem: false
  17. env:
  18. ELASTIC_PASSWORD:
  19. secretKeyRef:
  20. name: diskover-secret
  21. key: es-password
  22. http.port: 9200
  23. discovery.type: single-node
  24. node.name: diskoverdata
  25. probes:
  26. liveness:
  27. enabled: true
  28. type: exec
  29. command:
  30. - /bin/bash
  31. - -c
  32. - |
  33. curl -s -H "Authorization: Basic $(base64 <<< "elastic:$ELASTIC_PASSWORD")" \
  34. http://localhost:9200/_cluster/health?local=true
  35. readiness:
  36. enabled: true
  37. type: exec
  38. command:
  39. - /bin/bash
  40. - -c
  41. - |
  42. curl -s -H "Authorization: Basic $(base64 <<< "elastic:$ELASTIC_PASSWORD")" \
  43. http://localhost:9200/_cluster/health?local=true
  44. startup:
  45. enabled: true
  46. type: exec
  47. command:
  48. - /bin/bash
  49. - -c
  50. - |
  51. curl -s -H "Authorization: Basic $(base64 <<< "elastic:$ELASTIC_PASSWORD")" \
  52. http://localhost:9200/_cluster/health?local=true
  53. initContainers:
  54. {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
  55. "UID" 1000
  56. "GID" 1000
  57. "mode" "check"
  58. "type" "install") | nindent 8 }}
  59. {{- end -}}