diff --git a/ceph/templates/configmap-bin-clients.yaml b/ceph/templates/configmap-bin-clients.yaml index 79b9ec0278..9dfe8b4c84 100644 --- a/ceph/templates/configmap-bin-clients.yaml +++ b/ceph/templates/configmap-bin-clients.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.configmap_bin_clients }} +{{- if and .Values.manifests.configmap_bin_clients .Values.deployment.client_secrets }} {{- $envAll := . }} -{{- if .Values.deployment.client_secrets }} --- apiVersion: v1 kind: ConfigMap @@ -28,4 +27,3 @@ data: ceph-namespace-client-key-cleaner.sh: |+ {{ tuple "bin/_ceph-namespace-client-key-cleaner.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{- end }} -{{- end }} diff --git a/ceph/templates/configmap-bin-ks.yaml b/ceph/templates/configmap-bin-ks.yaml index fecbfb46b4..ace72b4dc5 100644 --- a/ceph/templates/configmap-bin-ks.yaml +++ b/ceph/templates/configmap-bin-ks.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.configmap_bin_ks }} +{{- if and .Values.manifests.configmap_bin_ks .Values.deployment.rgw_keystone_user_and_endpoints }} {{- $envAll := . }} -{{- if .Values.deployment.rgw_keystone_user_and_endpoints }} --- apiVersion: v1 kind: ConfigMap @@ -30,4 +29,3 @@ data: ks-user.sh: |+ {{- include "helm-toolkit.scripts.keystone_user" . | indent 4 }} {{- end }} -{{- end }} diff --git a/ceph/templates/configmap-bin.yaml b/ceph/templates/configmap-bin.yaml index 6e5bfd0776..33de601344 100644 --- a/ceph/templates/configmap-bin.yaml +++ b/ceph/templates/configmap-bin.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.configmap_bin }} +{{- if and .Values.manifests.configmap_bin .Values.deployment.ceph }} {{- $envAll := . }} -{{- if .Values.deployment.ceph }} --- apiVersion: v1 kind: ConfigMap @@ -88,4 +87,3 @@ data: ceph_rbd_pool.sh: | {{ tuple "bin/_ceph_rbd_pool.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{- end }} -{{- end }} diff --git a/ceph/templates/configmap-templates.yaml b/ceph/templates/configmap-templates.yaml index 8bcf25bc1d..95ce112239 100644 --- a/ceph/templates/configmap-templates.yaml +++ b/ceph/templates/configmap-templates.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.configmap_templates }} +{{- if and .Values.manifests.configmap_templates .Values.deployment.storage_secrets }} {{- $envAll := . }} -{{- if .Values.deployment.storage_secrets }} --- apiVersion: v1 kind: ConfigMap @@ -36,4 +35,3 @@ data: mon.keyring: |+ {{ tuple "templates/_mon.keyring.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{- end }} -{{- end }} diff --git a/ceph/templates/daemonset-mon.yaml b/ceph/templates/daemonset-mon.yaml index 98ad3ab21b..5fda6ccd74 100644 --- a/ceph/templates/daemonset-mon.yaml +++ b/ceph/templates/daemonset-mon.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.daemonset_mon }} +{{- if and .Values.manifests.daemonset_mon .Values.deployment.ceph }} {{- $envAll := . }} -{{- if .Values.deployment.ceph }} {{- $dependencies := .Values.dependencies.mon }} {{- $serviceAccountName := "ceph-mon"}} @@ -82,9 +81,6 @@ spec: - name: pod-var-lib-ceph mountPath: /var/lib/ceph readOnly: false - - name: mon-directory - mountPath: /var/lib/ceph/mon - readOnly: false - name: pod-run mountPath: /run readOnly: false @@ -186,9 +182,6 @@ spec: - name: pod-var-lib-ceph mountPath: /var/lib/ceph readOnly: false - - name: mon-directory - mountPath: /var/lib/ceph/mon - readOnly: false - name: pod-run mountPath: /run readOnly: false @@ -203,13 +196,10 @@ spec: defaultMode: 0444 - name: pod-var-lib-ceph hostPath: - path: {{ .Values.ceph.storage.mon_directory }} + path: {{ .Values.conf.storage.mon.directory }} - name: pod-run emptyDir: medium: "Memory" - - name: mon-directory - hostPath: - path: {{ .Values.ceph.storage.mon_directory }} - name: ceph-client-admin-keyring secret: secretName: {{ .Values.secrets.keyrings.admin }} @@ -226,4 +216,3 @@ spec: secret: secretName: {{ .Values.secrets.keyrings.rgw }} {{- end }} -{{- end }} diff --git a/ceph/templates/daemonset-osd.yaml b/ceph/templates/daemonset-osd.yaml index 783d33a968..90f343fc07 100644 --- a/ceph/templates/daemonset-osd.yaml +++ b/ceph/templates/daemonset-osd.yaml @@ -180,7 +180,7 @@ spec: secretName: {{ .Values.secrets.keyrings.rgw }} - name: osd-directory hostPath: - path: {{ .Values.ceph.storage.osd_directory }} + path: {{ .Values.conf.storage.osd.directory }} {{- end }} {{- end }} diff --git a/ceph/templates/deployment-cephfs-provisioner.yaml b/ceph/templates/deployment-cephfs-provisioner.yaml index 51fa8a65e8..2c274f4d90 100644 --- a/ceph/templates/deployment-cephfs-provisioner.yaml +++ b/ceph/templates/deployment-cephfs-provisioner.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.deployment_cephfs_provisioner }} +{{- if and .Values.manifests.deployment_cephfs_provisioner .Values.deployment.cephfs_provisioner }} {{- $envAll := . }} -{{- if .Values.deployment.cephfs_provisioner }} {{- $dependencies := .Values.dependencies.cephfs_provisioner }} {{- $serviceAccountName := "ceph-cephfs-provisioner"}} @@ -172,4 +171,3 @@ spec: name: ceph-bin defaultMode: 0555 {{- end }} -{{- end }} diff --git a/ceph/templates/deployment-mds.yaml b/ceph/templates/deployment-mds.yaml index 23e0daebb1..41504a20db 100644 --- a/ceph/templates/deployment-mds.yaml +++ b/ceph/templates/deployment-mds.yaml @@ -14,10 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.deployment_mds }} +{{- if and .Values.manifests.deployment_mds ( and .Values.deployment.ceph .Values.conf.features.mds) }} {{- $envAll := . }} -{{- if .Values.deployment.ceph }} -{{- if .Values.ceph.enabled.mds }} {{- $dependencies := .Values.dependencies.mds }} {{- $serviceAccountName := "ceph-mds"}} @@ -156,5 +154,3 @@ spec: secret: secretName: {{ .Values.secrets.keyrings.rgw }} {{- end }} -{{- end }} -{{- end }} diff --git a/ceph/templates/deployment-mgr.yaml b/ceph/templates/deployment-mgr.yaml index 46018ad514..ca68fe53a0 100644 --- a/ceph/templates/deployment-mgr.yaml +++ b/ceph/templates/deployment-mgr.yaml @@ -14,10 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.deployment_mgr }} +{{- if and .Values.manifests.deployment_mgr (and .Values.deployment.ceph .Values.conf.features.mgr ) }} {{- $envAll := . }} -{{- if .Values.deployment.ceph }} -{{- if .Values.ceph.enabled.mgr }} {{- $dependencies := .Values.dependencies.mgr }} {{- $serviceAccountName := "ceph-mgr"}} @@ -183,5 +181,3 @@ spec: secret: secretName: {{ .Values.secrets.keyrings.mgr }} {{- end }} -{{- end }} -{{- end }} diff --git a/ceph/templates/deployment-moncheck.yaml b/ceph/templates/deployment-moncheck.yaml index 1d99ab3449..3bf4100611 100644 --- a/ceph/templates/deployment-moncheck.yaml +++ b/ceph/templates/deployment-moncheck.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.deployment_moncheck }} +{{- if and .Values.manifests.deployment_moncheck .Values.deployment.ceph }} {{- $envAll := . }} -{{- if .Values.deployment.ceph }} {{- $dependencies := .Values.dependencies.moncheck }} {{- $serviceAccountName := "ceph-mon-check"}} @@ -147,4 +146,3 @@ spec: secret: secretName: {{ .Values.secrets.keyrings.rgw }} {{- end }} -{{- end }} diff --git a/ceph/templates/deployment-rbd-provisioner.yaml b/ceph/templates/deployment-rbd-provisioner.yaml index eb5eadd272..db0f7952f0 100644 --- a/ceph/templates/deployment-rbd-provisioner.yaml +++ b/ceph/templates/deployment-rbd-provisioner.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.deployment_rbd_provisioner }} +{{- if and .Values.manifests.deployment_rbd_provisioner .Values.deployment.rbd_provisioner }} {{- $envAll := . }} -{{- if .Values.deployment.rbd_provisioner }} {{- $dependencies := .Values.dependencies.rbd_provisioner }} {{- $serviceAccountName := "ceph-rbd-provisioner"}} @@ -162,4 +161,3 @@ spec: name: ceph-bin defaultMode: 0555 {{- end }} -{{- end }} diff --git a/ceph/templates/deployment-rgw.yaml b/ceph/templates/deployment-rgw.yaml index ab93d14deb..ca351ece1b 100644 --- a/ceph/templates/deployment-rgw.yaml +++ b/ceph/templates/deployment-rgw.yaml @@ -14,10 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.deployment_rgw }} +{{- if and .Values.manifests.deployment_rgw ( and .Values.deployment.ceph .Values.conf.features.rgw ) }} {{- $envAll := . }} -{{- if .Values.deployment.ceph }} -{{- if .Values.ceph.enabled.rgw }} {{- $dependencies := .Values.dependencies.rgw }} {{- $serviceAccountName := "ceph-rgw"}} @@ -61,7 +59,7 @@ spec: - name: pod-run mountPath: /run readOnly: false -{{ if .Values.ceph.rgw_keystone_auth }} +{{ if .Values.conf.rgw_ks.enabled }} - name: ceph-rgw-ks-init image: {{ .Values.images.tags.ceph_daemon }} imagePullPolicy: {{ .Values.images.pull_policy }} @@ -119,7 +117,7 @@ spec: volumeMounts: - name: pod-etc-ceph mountPath: /etc/ceph -{{- if not .Values.ceph.rgw_keystone_auth }} +{{- if not .Values.conf.rgw_ks.enabled }} - name: ceph-etc mountPath: /etc/ceph/ceph.conf subPath: ceph.conf @@ -195,5 +193,3 @@ spec: secret: secretName: {{ .Values.secrets.keyrings.rgw }} {{- end }} -{{- end }} -{{- end }} diff --git a/ceph/templates/job-bootstrap.yaml b/ceph/templates/job-bootstrap.yaml index da08850fef..4e7c6ec66d 100644 --- a/ceph/templates/job-bootstrap.yaml +++ b/ceph/templates/job-bootstrap.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.job_bootstrap }} +{{- if and .Values.manifests.job_bootstrap .Values.bootstrap.enabled }} {{- $envAll := . }} -{{- if .Values.bootstrap.enabled }} {{- $dependencies := .Values.dependencies.bootstrap }} {{- $serviceAccountName := "ceph-bootstrap"}} @@ -71,4 +70,3 @@ spec: secret: secretName: {{ .Values.secrets.keyrings.admin }} {{- end }} -{{- end }} diff --git a/ceph/templates/job-cephfs-client-key.yaml b/ceph/templates/job-cephfs-client-key.yaml index f835a3256a..691eae9bed 100644 --- a/ceph/templates/job-cephfs-client-key.yaml +++ b/ceph/templates/job-cephfs-client-key.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.job_cephfs_client_key }} +{{- if and .Values.manifests.job_cephfs_client_key .Values.deployment.cephfs_provisioner }} {{- $envAll := . }} -{{- if .Values.deployment.cephfs_provisioner }} {{- $dependencies := .Values.dependencies.cephfs_client_key_generator }} {{- $randStringSuffix := randAlphaNum 5 | lower }} @@ -124,4 +123,3 @@ spec: name: ceph-bin defaultMode: 0555 {{- end }} -{{- end }} diff --git a/ceph/templates/job-keyring.yaml b/ceph/templates/job-keyring.yaml index 698aafebdb..745c32a019 100644 --- a/ceph/templates/job-keyring.yaml +++ b/ceph/templates/job-keyring.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.job_keyring }} +{{- if and .Values.manifests.job_keyring .Values.deployment.storage_secrets }} {{- $envAll := . }} -{{- if .Values.deployment.storage_secrets }} {{- range $key1, $cephBootstrapKey := tuple "mds" "osd" "rgw" "mon" "mgr" }} {{- if not (and (not $envAll.Values.manifests.deployment_rgw) (eq $cephBootstrapKey "rgw")) }} {{- $jobName := print $cephBootstrapKey "-keyring-generator" }} @@ -121,4 +120,3 @@ spec: {{- end }} {{- end }} {{- end }} -{{- end }} diff --git a/ceph/templates/job-ks-endpoints.yaml b/ceph/templates/job-ks-endpoints.yaml index 4544dcdb68..675a83041a 100644 --- a/ceph/templates/job-ks-endpoints.yaml +++ b/ceph/templates/job-ks-endpoints.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.job_ks_endpoints }} +{{- if and .Values.manifests.job_ks_endpoints .Values.deployment.rgw_keystone_user_and_endpoints }} {{- $envAll := . }} -{{- if .Values.deployment.rgw_keystone_user_and_endpoints }} {{- $dependencies := .Values.dependencies.ks_endpoints }} {{- $serviceAccountName := "ceph-ks-endpoints" }} @@ -72,4 +71,3 @@ spec: name: ceph-bin-ks defaultMode: 0555 {{- end }} -{{- end }} diff --git a/ceph/templates/job-ks-service.yaml b/ceph/templates/job-ks-service.yaml index a7a0dc0cd1..a4d72f4db7 100644 --- a/ceph/templates/job-ks-service.yaml +++ b/ceph/templates/job-ks-service.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.job_ks_service }} +{{- if and .Values.manifests.job_ks_service .Values.deployment.rgw_keystone_user_and_endpoints }} {{- $envAll := . }} -{{- if .Values.deployment.rgw_keystone_user_and_endpoints }} {{- $dependencies := .Values.dependencies.ks_service }} {{- $serviceAccountName := "ceph-ks-service" }} @@ -66,4 +65,3 @@ spec: name: ceph-bin-ks defaultMode: 0555 {{- end }} -{{- end }} diff --git a/ceph/templates/job-ks-user.yaml b/ceph/templates/job-ks-user.yaml index b6d1bbc2ac..0e350c0c26 100644 --- a/ceph/templates/job-ks-user.yaml +++ b/ceph/templates/job-ks-user.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.job_ks_user }} +{{- if and .Values.manifests.job_ks_user .Values.deployment.rgw_keystone_user_and_endpoints }} {{- $envAll := . }} -{{- if .Values.deployment.rgw_keystone_user_and_endpoints }} {{- $dependencies := .Values.dependencies.ks_user }} {{- $serviceAccountName := "ceph-ks-user" }} @@ -67,4 +66,3 @@ spec: name: ceph-bin-ks defaultMode: 0555 {{- end }} -{{- end }} diff --git a/ceph/templates/job-namespace-client-key-cleaner.yaml b/ceph/templates/job-namespace-client-key-cleaner.yaml index e59cc014da..1197c10ec6 100644 --- a/ceph/templates/job-namespace-client-key-cleaner.yaml +++ b/ceph/templates/job-namespace-client-key-cleaner.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.job_namespace_client_key_cleaner }} +{{- if and .Values.manifests.job_namespace_client_key_cleaner .Values.deployment.client_secrets }} {{- $envAll := . }} -{{- if .Values.deployment.client_secrets }} {{- $dependencies := .Values.dependencies.namespace_client_key_cleaner }} {{- $randStringSuffix := randAlphaNum 5 | lower }} @@ -98,4 +97,3 @@ spec: name: ceph-bin-clients defaultMode: 0555 {{- end }} -{{- end }} diff --git a/ceph/templates/job-namespace-client-key.yaml b/ceph/templates/job-namespace-client-key.yaml index 89139a2a13..39cad7a7bf 100644 --- a/ceph/templates/job-namespace-client-key.yaml +++ b/ceph/templates/job-namespace-client-key.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.job_namespace_client_key }} +{{- if and .Values.manifests.job_namespace_client_key .Values.deployment.client_secrets }} {{- $envAll := . }} -{{- if .Values.deployment.client_secrets }} {{- $dependencies := .Values.dependencies.namespace_client_key_generator }} {{- $randStringSuffix := randAlphaNum 5 | lower }} @@ -124,4 +123,3 @@ spec: name: ceph-bin-clients defaultMode: 0555 {{- end }} -{{- end }} diff --git a/ceph/templates/job-rbd-pool.yaml b/ceph/templates/job-rbd-pool.yaml index b48911533a..3ffcf083e2 100644 --- a/ceph/templates/job-rbd-pool.yaml +++ b/ceph/templates/job-rbd-pool.yaml @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.job_rbd_pool }} -{{- if .Values.deployment.ceph }} +{{- if and .Values.manifests.job_rbd_pool .Values.deployment.ceph }} {{- $envAll := . }} {{- $dependencies := .Values.dependencies.rbd_pool }} @@ -96,4 +95,3 @@ spec: secret: secretName: {{ .Values.secrets.keyrings.admin }} {{- end }} -{{- end }} diff --git a/ceph/templates/job-storage-admin-keys.yaml b/ceph/templates/job-storage-admin-keys.yaml index 392076d64b..f529df1137 100644 --- a/ceph/templates/job-storage-admin-keys.yaml +++ b/ceph/templates/job-storage-admin-keys.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.job_storage_admin_keys }} +{{- if and .Values.manifests.job_storage_admin_keys .Values.deployment.storage_secrets }} {{- $envAll := . }} -{{- if .Values.deployment.storage_secrets }} {{- $dependencies := .Values.dependencies.storage_keys_generator }} {{- $serviceAccountName := "ceph-storage-keys-generator" }} @@ -110,4 +109,3 @@ spec: name: ceph-templates defaultMode: 0444 {{- end }} -{{- end }} diff --git a/ceph/templates/secret-keystone-rgw.yaml b/ceph/templates/secret-keystone-rgw.yaml index 5d93bd471d..c1d8e0c7a8 100644 --- a/ceph/templates/secret-keystone-rgw.yaml +++ b/ceph/templates/secret-keystone-rgw.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.secret_keystone_rgw }} +{{- if and .Values.manifests.secret_keystone_rgw .Values.deployment.ceph }} {{- $envAll := . }} -{{- if .Values.deployment.ceph }} {{- range $key1, $userClass := tuple "swift" }} {{- $secretName := index $envAll.Values.secrets.identity "user_rgw" }} --- @@ -29,4 +28,3 @@ data: {{- tuple $userClass "internal" $envAll | include "helm-toolkit.snippets.keystone_secret_openrc" | indent 2 -}} {{- end }} {{- end }} -{{- end }} diff --git a/ceph/templates/secret-keystone.yaml b/ceph/templates/secret-keystone.yaml index 95465c5d1a..bea479fa3b 100644 --- a/ceph/templates/secret-keystone.yaml +++ b/ceph/templates/secret-keystone.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.secret_keystone }} +{{- if and .Values.manifests.secret_keystone .Values.deployment.rgw_keystone_user_and_endpoints }} {{- $envAll := . }} -{{- if .Values.deployment.rgw_keystone_user_and_endpoints }} {{- range $key1, $userClass := tuple "admin" "swift" }} {{- $secretName := index $envAll.Values.secrets.identity $userClass }} --- @@ -29,4 +28,3 @@ data: {{- tuple $userClass "internal" $envAll | include "helm-toolkit.snippets.keystone_secret_openrc" | indent 2 -}} {{- end }} {{- end }} -{{- end }} diff --git a/ceph/templates/service-mgr.yaml b/ceph/templates/service-mgr.yaml index 46e00f5af4..8e431607e7 100644 --- a/ceph/templates/service-mgr.yaml +++ b/ceph/templates/service-mgr.yaml @@ -14,11 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_mgr }} +{{- if and .Values.manifests.service_mgr ( and .Values.deployment.ceph .Values.conf.features.mgr )}} {{- $envAll := . }} {{- $prometheus_annotations := $envAll.Values.monitoring.prometheus.ceph_mgr }} -{{- if .Values.deployment.ceph }} -{{- if .Values.ceph.enabled.mgr }} --- apiVersion: v1 kind: Service @@ -36,5 +34,3 @@ spec: selector: {{ tuple $envAll "ceph" "mgr" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{- end }} -{{- end }} -{{- end }} diff --git a/ceph/templates/service-mon-discovery.yaml b/ceph/templates/service-mon-discovery.yaml index a9e96c393c..75f6dad507 100644 --- a/ceph/templates/service-mon-discovery.yaml +++ b/ceph/templates/service-mon-discovery.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_mon_discovery }} +{{- if and .Values.manifests.service_mon_discovery .Values.deployment.ceph }} {{- $envAll := . }} -{{- if .Values.deployment.ceph }} --- kind: Service apiVersion: v1 @@ -39,4 +38,3 @@ spec: {{ tuple $envAll "ceph" "mon" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} clusterIP: None {{- end }} -{{- end }} diff --git a/ceph/templates/service-mon.yaml b/ceph/templates/service-mon.yaml index 37e7ad18b7..823dbc0629 100644 --- a/ceph/templates/service-mon.yaml +++ b/ceph/templates/service-mon.yaml @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_mon }} +{{- if and .Values.manifests.service_mon .Values.deployment.ceph }} {{- $envAll := . }} -{{- if .Values.deployment.ceph }} --- kind: Service apiVersion: v1 @@ -31,4 +30,3 @@ spec: {{ tuple $envAll "ceph" "mon" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} clusterIP: None {{- end }} -{{- end }} diff --git a/ceph/templates/service-rgw.yaml b/ceph/templates/service-rgw.yaml index cc40df9a6f..3081090968 100644 --- a/ceph/templates/service-rgw.yaml +++ b/ceph/templates/service-rgw.yaml @@ -14,10 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_rgw }} +{{- if and .Values.manifests.service_rgw ( and .Values.deployment.ceph .Values.conf.features.rgw ) }} {{- $envAll := . }} -{{- if .Values.deployment.ceph }} -{{- if .Values.ceph.enabled.rgw }} --- apiVersion: v1 kind: Service @@ -31,5 +29,3 @@ spec: selector: {{ tuple $envAll "ceph" "rgw" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{- end }} -{{- end }} -{{- end }} diff --git a/ceph/templates/storageclass-cephfs.yaml b/ceph/templates/storageclass-cephfs.yaml index 48dcb98781..4144db8518 100644 --- a/ceph/templates/storageclass-cephfs.yaml +++ b/ceph/templates/storageclass-cephfs.yaml @@ -14,10 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.storageclass }} +{{- if and .Values.manifests.storageclass_cephfs ( and .Values.deployment.ceph .Values.storageclass.cephfs.provision_storage_class ) }} {{- $envAll := . }} -{{- if .Values.deployment.ceph }} -{{- if .Values.storageclass.cephfs.provision_storage_class }} --- kind: StorageClass apiVersion: storage.k8s.io/v1 @@ -30,5 +28,3 @@ parameters: adminSecretName: {{ .Values.storageclass.cephfs.user_secret_name | quote }} adminSecretNamespace: {{ .Release.Namespace | quote }} {{- end }} -{{- end }} -{{- end }} diff --git a/ceph/templates/storageclass.yaml b/ceph/templates/storageclass-rbd.yaml similarity index 90% rename from ceph/templates/storageclass.yaml rename to ceph/templates/storageclass-rbd.yaml index 257aae9c34..0dfd104355 100644 --- a/ceph/templates/storageclass.yaml +++ b/ceph/templates/storageclass-rbd.yaml @@ -14,10 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.storageclass }} +{{- if and .Values.manifests.storageclass_rbd (and .Values.deployment.ceph .Values.storageclass.rbd.provision_storage_class) }} {{- $envAll := . }} -{{- if .Values.deployment.ceph }} -{{- if .Values.storageclass.rbd.provision_storage_class }} --- apiVersion: storage.k8s.io/v1 kind: StorageClass @@ -35,5 +33,3 @@ parameters: imageFormat: {{ .Values.storageclass.rbd.image_format | quote }} imageFeatures: {{ .Values.storageclass.rbd.image_features }} {{- end }} -{{- end }} -{{- end }} diff --git a/ceph/values.yaml b/ceph/values.yaml index 75e161b1c2..9c6e6d1237 100644 --- a/ceph/values.yaml +++ b/ceph/values.yaml @@ -184,7 +184,17 @@ network: mgr: 7000 conf: + storage: + osd: + directory: /var/lib/openstack-helm/ceph/osd + mon: + directory: /var/lib/openstack-helm/ceph/mon + features: + mds: true + rgw: true + mgr: true rgw_ks: + enabled: false config: rgw_keystone_api_version: 3 rgw_keystone_accepted_roles: "admin, _member_" @@ -295,16 +305,6 @@ dependencies: - service: ceph_mon endpoint: internal -ceph: - rgw_keystone_auth: false - enabled: - mds: true - rgw: true - mgr: true - storage: - osd_directory: /var/lib/openstack-helm/ceph/osd - mon_directory: /var/lib/openstack-helm/ceph/mon - bootstrap: enabled: false script: | @@ -476,4 +476,5 @@ manifests: service_mon: true service_mon_discovery: true service_rgw: true - storageclass: true + storageclass_cephfs: true + storageclass_rbd: true diff --git a/tools/deployment/developer/ceph/040-ceph.sh b/tools/deployment/developer/ceph/040-ceph.sh index a1c5f6922a..4c9d3c4ffb 100755 --- a/tools/deployment/developer/ceph/040-ceph.sh +++ b/tools/deployment/developer/ceph/040-ceph.sh @@ -20,22 +20,40 @@ set -xe make pull-images ceph #NOTE: Deploy command -WORK_DIR=$(pwd) -helm install --namespace=ceph ${WORK_DIR}/ceph --name=ceph \ - --set endpoints.identity.namespace=openstack \ - --set endpoints.object_store.namespace=ceph \ - --set endpoints.ceph_mon.namespace=ceph \ - --set ceph.rgw_keystone_auth=true \ - --set network.public=172.17.0.1/16 \ - --set network.cluster=172.17.0.1/16 \ - --set deployment.storage_secrets=true \ - --set deployment.ceph=true \ - --set deployment.rbd_provisioner=true \ - --set deployment.cephfs_provisioner=true \ - --set deployment.client_secrets=false \ - --set deployment.rgw_keystone_user_and_endpoints=false \ - --set bootstrap.enabled=true \ - --values=${WORK_DIR}/tools/overrides/mvp/ceph.yaml +cat > /tmp/ceph.yaml < /tmp/ceph-openstack-config.yaml < /tmp/radosgw-openstack.yaml < /tmp/ceph.yaml < /tmp/ceph-openstack-config.yaml < /tmp/radosgw-openstack.yaml <