From 7f04846c52091631b2486bbd0031b6279adef51a Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Wed, 20 Mar 2019 08:40:03 -0500 Subject: [PATCH] Ceph charts: Add missing templates, update dependency values This addresses slight issues with the ceph-osd, ceph-provisioners, and ceph-rgw charts. Those issues include: - Remove duplicate test: key in ceph-osd dependencies - Add missing image repo sync job to ceph-provisioner and rgw - Use correct job name for image repo sync dependencies in charts - Remove incorrect keystone service dependency for ceph-rgw, as the keystone jobs are dependent on the keystone service This also updates the ceph-rgw chart to use dynamic dependencies based on whether keystone auth or s3 auth is used Change-Id: Id3b3f289bdd4ca4d1b2e9b6267b12427e422a08d --- ceph-osd/values.yaml | 4 ---- .../templates/job-image-repo-sync.yaml | 20 +++++++++++++++++++ ceph-provisioners/values.yaml | 2 +- ceph-rgw/templates/deployment-rgw.yaml | 16 +++++++++++++-- ceph-rgw/templates/job-image-repo-sync.yaml | 20 +++++++++++++++++++ ceph-rgw/values.yaml | 13 ++++++++---- 6 files changed, 64 insertions(+), 11 deletions(-) create mode 100644 ceph-provisioners/templates/job-image-repo-sync.yaml create mode 100644 ceph-rgw/templates/job-image-repo-sync.yaml diff --git a/ceph-osd/values.yaml b/ceph-osd/values.yaml index 7aabe7a2d..e2ad779e2 100644 --- a/ceph-osd/values.yaml +++ b/ceph-osd/values.yaml @@ -216,10 +216,6 @@ dependencies: services: - endpoint: internal service: local_image_registry - tests: - services: - - endpoint: internal - service: ceph_mon tests: jobs: - ceph-storage-keys-generator diff --git a/ceph-provisioners/templates/job-image-repo-sync.yaml b/ceph-provisioners/templates/job-image-repo-sync.yaml new file mode 100644 index 000000000..cc8ca8d46 --- /dev/null +++ b/ceph-provisioners/templates/job-image-repo-sync.yaml @@ -0,0 +1,20 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }} +{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "ceph-provisioners" -}} +{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }} +{{- end }} diff --git a/ceph-provisioners/values.yaml b/ceph-provisioners/values.yaml index 06d64f493..45fb4f537 100644 --- a/ceph-provisioners/values.yaml +++ b/ceph-provisioners/values.yaml @@ -122,7 +122,7 @@ dependencies: common: local_image_registry: jobs: - - ceph-client-image-repo-sync + - ceph-provisioners-image-repo-sync services: - endpoint: node service: local_image_registry diff --git a/ceph-rgw/templates/deployment-rgw.yaml b/ceph-rgw/templates/deployment-rgw.yaml index 0c94294f5..0b59bfa83 100644 --- a/ceph-rgw/templates/deployment-rgw.yaml +++ b/ceph-rgw/templates/deployment-rgw.yaml @@ -18,7 +18,19 @@ limitations under the License. {{- $envAll := . }} {{- $serviceAccountName := "ceph-rgw" }} -{{ tuple $envAll "rgw" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} + +{{- $_ := set $envAll.Values "__depParams" ( list ) }} +{{- if .Values.conf.rgw_ks.enabled -}} +{{- $__updateDepParams := append $envAll.Values.__depParams "keystone" -}} +{{- $_ := set $envAll.Values "__depParams" $__updateDepParams -}} +{{- end -}} +{{- if .Values.conf.rgw_s3.enabled -}} +{{- $__updateDepParams := append $envAll.Values.__depParams "s3" -}} +{{- $_ := set $envAll.Values "__depParams" $__updateDepParams -}} +{{- end -}} +{{- $dependencyOpts := dict "envAll" $envAll "dependencyMixinParam" $envAll.Values.__depParams "dependencyKey" "rgw" -}} +{{- $_ := include "helm-toolkit.utils.dependency_resolver" $dependencyOpts | toString | fromYaml }} +{{ tuple $envAll "pod_dependency" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- kind: Deployment apiVersion: apps/v1 @@ -48,7 +60,7 @@ spec: nodeSelector: {{ .Values.labels.rgw.node_selector_key }}: {{ .Values.labels.rgw.node_selector_value }} initContainers: -{{ tuple $envAll "rgw" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} +{{ tuple $envAll "pod_dependency" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} - name: ceph-init-dirs {{ tuple $envAll "ceph_rgw" | include "helm-toolkit.snippets.image" | indent 10 }} command: diff --git a/ceph-rgw/templates/job-image-repo-sync.yaml b/ceph-rgw/templates/job-image-repo-sync.yaml new file mode 100644 index 000000000..bb71d393b --- /dev/null +++ b/ceph-rgw/templates/job-image-repo-sync.yaml @@ -0,0 +1,20 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }} +{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "ceph-rgw" -}} +{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }} +{{- end }} diff --git a/ceph-rgw/values.yaml b/ceph-rgw/values.yaml index 366699282..61b39e204 100644 --- a/ceph-rgw/values.yaml +++ b/ceph-rgw/values.yaml @@ -325,10 +325,18 @@ dependencies: common: local_image_registry: jobs: - - ceph-client-image-repo-sync + - ceph-rgw-image-repo-sync services: - endpoint: node service: local_image_registry + targeted: + keystone: + rgw: + services: + - endpoint: internal + service: identity + s3: + rgw: {} static: bootstrap: jobs: null @@ -338,9 +346,6 @@ dependencies: rgw: jobs: - ceph-rgw-storage-init - services: - - endpoint: internal - service: keystone-api image_repo_sync: services: - endpoint: internal