_helpers.tpl 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {{/* vim: set filetype=mustache: */}}
  2. {{/*
  3. Return the proper Zookeeper image name
  4. */}}
  5. {{- define "zookeeper.image" -}}
  6. {{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
  7. {{- end -}}
  8. {{/*
  9. Return the proper image name (for the init container volume-permissions image)
  10. */}}
  11. {{- define "zookeeper.volumePermissions.image" -}}
  12. {{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions.image "global" .Values.global) }}
  13. {{- end -}}
  14. {{/*
  15. Return the proper Docker Image Registry Secret Names
  16. */}}
  17. {{- define "zookeeper.imagePullSecrets" -}}
  18. {{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.volumePermissions.image) "global" .Values.global) -}}
  19. {{- end -}}
  20. {{/*
  21. Check if there are rolling tags in the images
  22. */}}
  23. {{- define "zookeeper.checkRollingTags" -}}
  24. {{- include "common.warnings.rollingTag" .Values.image }}
  25. {{- end -}}
  26. {{/*
  27. Create the name of the service account to use
  28. */}}
  29. {{- define "zookeeper.serviceAccountName" -}}
  30. {{- if .Values.serviceAccount.create -}}
  31. {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
  32. {{- else -}}
  33. {{ default "default" .Values.serviceAccount.name }}
  34. {{- end -}}
  35. {{- end -}}
  36. {{/*
  37. Return ZooKeeper Client Password
  38. */}}
  39. {{- define "zookeeper.clientPassword" -}}
  40. {{- if .Values.auth.clientPassword -}}
  41. {{- .Values.auth.clientPassword -}}
  42. {{- else -}}
  43. {{- randAlphaNum 10 -}}
  44. {{- end -}}
  45. {{- end -}}
  46. {{/*
  47. Return ZooKeeper Servers Passwords
  48. */}}
  49. {{- define "zookeeper.serverPasswords" -}}
  50. {{- if .Values.auth.serverPasswords -}}
  51. {{- .Values.auth.serverPasswords -}}
  52. {{- else -}}
  53. {{- randAlphaNum 10 -}}
  54. {{- end -}}
  55. {{- end -}}
  56. {{/*
  57. Return ZooKeeper Namespace to use
  58. */}}
  59. {{- define "zookeeper.namespace" -}}
  60. {{- if .Values.namespaceOverride }}
  61. {{- .Values.namespaceOverride -}}
  62. {{- else }}
  63. {{- .Release.Namespace -}}
  64. {{- end }}
  65. {{- end -}}