_persistence.tpl 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. {{- define "distribution.persistence" -}}
  2. persistence:
  3. {{- if .Values.distributionStorage.useFilesystemBackend }}
  4. data:
  5. enabled: true
  6. type: {{ .Values.distributionStorage.data.type }}
  7. datasetName: {{ .Values.distributionStorage.data.datasetName | default "" }}
  8. hostPath: {{ .Values.distributionStorage.data.hostPath | default "" }}
  9. targetSelector:
  10. distribution:
  11. distribution:
  12. mountPath: /var/lib/registry
  13. 01-permissions:
  14. mountPath: /mnt/directories/registry
  15. {{- end }}
  16. tmp:
  17. enabled: true
  18. type: emptyDir
  19. targetSelector:
  20. distribution:
  21. distribution:
  22. mountPath: /tmp
  23. {{- range $idx, $storage := .Values.distributionStorage.additionalStorages }}
  24. {{ printf "distribution-%v" (int $idx) }}:
  25. enabled: true
  26. type: {{ $storage.type }}
  27. datasetName: {{ $storage.datasetName | default "" }}
  28. hostPath: {{ $storage.hostPath | default "" }}
  29. targetSelector:
  30. distribution:
  31. distribution:
  32. mountPath: {{ $storage.mountPath }}
  33. 01-permissions:
  34. mountPath: /mnt/directories{{ $storage.mountPath }}
  35. {{- end -}}
  36. {{- if .Values.distributionConfig.basicAuthUsers }}
  37. htpasswd:
  38. enabled: true
  39. type: secret
  40. objectName: distribution-htpasswd
  41. defaultMode: "0600"
  42. items:
  43. - key: htpasswd
  44. path: htpasswd
  45. targetSelector:
  46. distribution:
  47. distribution:
  48. mountPath: /auth
  49. readOnly: true
  50. {{- end -}}
  51. {{- if .Values.distributionNetwork.certificateID }}
  52. cert:
  53. enabled: true
  54. type: secret
  55. objectName: distribution-cert
  56. defaultMode: "0600"
  57. items:
  58. - key: tls.key
  59. path: tls.key
  60. - key: tls.crt
  61. path: tls.crt
  62. targetSelector:
  63. distribution:
  64. distribution:
  65. mountPath: /certs
  66. readOnly: true
  67. scaleCertificate:
  68. distribution-cert:
  69. enabled: true
  70. id: {{ .Values.distributionNetwork.certificateID }}
  71. {{- end -}}
  72. {{- end -}}