elastic_search_deployment.yaml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {{ $values := (. | mustDeepCopy) }}
  2. {{ $_ := set $values "common" (dict "nameSuffix" "elasticsearch") }}
  3. {{ include "common.deployment.common_config" $values | nindent 0 }}
  4. spec: {{ include "common.deployment.common_spec" $values | nindent 2 }}
  5. template: {{ include "common.deployment.pod.metadata" $values | nindent 4 }}
  6. spec:
  7. containers:
  8. - name: {{ .Chart.Name }}
  9. {{ include "common.containers.imageConfig" .Values.elasticsearch.image | nindent 10 }}
  10. volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" (dict "appVolumeMounts" .Values.elasticSearchAppVolumeMounts ) | nindent 12 }}
  11. ports:
  12. - name: es-port
  13. containerPort: 9200
  14. env:
  15. {{ $envList := (default list .Values.environmentVariables) }}
  16. {{ $envList = mustAppend $envList (dict "name" "discovery.type" "value" "single-node") }}
  17. {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
  18. livenessProbe:
  19. httpGet:
  20. path: /
  21. port: 9200
  22. initialDelaySeconds: 10
  23. periodSeconds: 10
  24. timeoutSeconds: 5
  25. failureThreshold: 5
  26. successThreshold: 1
  27. readinessProbe:
  28. httpGet:
  29. path: /
  30. port: 9200
  31. initialDelaySeconds: 10
  32. periodSeconds: 10
  33. timeoutSeconds: 5
  34. failureThreshold: 5
  35. successThreshold: 2
  36. startupProbe:
  37. httpGet:
  38. path: /
  39. port: 9200
  40. initialDelaySeconds: 10
  41. periodSeconds: 5
  42. timeoutSeconds: 2
  43. failureThreshold: 60
  44. successThreshold: 1
  45. {{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
  46. volumes: {{ include "common.storage.configureAppVolumes" (dict "appVolumeMounts" .Values.elasticSearchAppVolumeMounts "emptyDirVolumes" .Values.emptyDirVolumes "ixVolumes" .Values.ixVolumes) | nindent 8 }}