diff --git a/ceph/templates/secrets.yaml b/ceph/templates/secrets.yaml index eafaca486f..63a5b9e111 100644 --- a/ceph/templates/secrets.yaml +++ b/ceph/templates/secrets.yaml @@ -1,3 +1,4 @@ +{{- if .Values.secrets.use_common_secrets -}} --- apiVersion: v1 kind: Secret @@ -47,3 +48,4 @@ type: Opaque data: ceph-client-key: | {{ include "secrets/ceph-client-key" . | b64enc | indent 4 }} +{{- end -}} diff --git a/ceph/templates/storage.yaml b/ceph/templates/storage.yaml index 40b9fe7a87..95c3ed6f44 100644 --- a/ceph/templates/storage.yaml +++ b/ceph/templates/storage.yaml @@ -4,13 +4,13 @@ apiVersion: storage.k8s.io/v1beta1 kind: StorageClass metadata: - name: general + name: {{ .Values.storageclass.name }} provisioner: kubernetes.io/rbd parameters: - monitors: ceph-mon.{{.Release.Namespace}}:6789 - adminId: admin - adminSecretName: pvc-ceph-conf-combined-storageclass - adminSecretNamespace: {{.Release.Namespace}} - pool: rbd - userId: admin - userSecretName: pvc-ceph-client-key \ No newline at end of file + monitors: {{ .Values.storageclass.monitors | default "ceph.{{ .Release.Namespace }}:6789" }} + adminId: {{ .Values.storageclass.admin_id }} + adminSecretName: {{ .Values.storageclass.admin_secret_name }} + adminSecretNamespace: {{ .Values.storageclass.admin_secret_namespace | default "{{ .Release.Namespace }}" }} + pool: {{ .Values.storageclass.pool }} + userId: {{ .Values.storageclass.user_id }} + userSecretName: {{ .Values.storageclass.user_secret_name }} diff --git a/ceph/values.yaml b/ceph/values.yaml index 550536cdb3..d613d57322 100644 --- a/ceph/values.yaml +++ b/ceph/values.yaml @@ -7,7 +7,6 @@ # tunables available - parameterizing more of the elements # in the manifests is a work in progress - images: daemon: quay.io/attcomdev/ceph-daemon:latest @@ -23,4 +22,47 @@ network: storage: osd_directory: /var/lib/aic-helm/ceph/osd - var_directory: /var/lib/aic-helm/ceph/ceph \ No newline at end of file + var_directory: /var/lib/aic-helm/ceph/ceph + +# Setting this to false will assume you will +# setup and orchestrate your own secrets and +# configmaps outside of this helm chart +# +# The list below is in the format of +# +# configMapName: +# elementKeyName +# +# ceph.conf: +# ceph.conf +# ceph.client.admin.keyring +# ceph.client.admin.keyring +# ceph.mon.keyring: +# ceph.mon.keyring +# ceph-bootstrap-rgw-keyring: +# ceph.keyring +# ceph.rgw.keyring +# ceph-bootstrap-mds-keyring: +# ceph.keyring +# ceph.mds.keyring +# ceph-bootstrap-osd-keyring: +# ceph.keyring +# ceph.osd.keyring +# ceph-client-key: +# ceph-client-key +secrets: + use_common_secrets: true + +# if you change provision_storage_class to false +# it is presumed you manage your own storage +# class definition externally +storageclass: + provision_storage_class: true + name: general + monitors: nil + pool: rbd + admin_id: admin + admin_secret_name: pvc-ceph-conf-combined-storageclass + admin_secret_namespace: nil + user_id: admin + user_secret_name: pvc-ceph-client-key \ No newline at end of file