diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/templates/configmap-ceph-etc.yaml b/stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/templates/configmap-ceph-etc.yaml new file mode 100644 index 0000000..1cdcc35 --- /dev/null +++ b/stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/templates/configmap-ceph-etc.yaml @@ -0,0 +1,30 @@ +{{/* +# +# Copyright (c) 2021 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +*/}} + +{{- if .Values.manifests.configmap_ceph_conf }} +{{- $envAll := . }} +{{- $ceph := $envAll.Values.conf.ceph }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $envAll.Values.ceph_client.configmap }} + namespace: {{ $envAll.Release.namespace }} + labels: + app: ceph-pools-audit + annotations: + "helm.sh/hook": "pre-upgrade, pre-install" + "helm.sh/hook-delete-policy": "before-hook-creation" +data: + ceph.conf: | + [global] + auth_supported = none + {{ $monitors := $ceph.monitors }}{{ range $index, $element := $monitors}} + [mon.{{- $index }}] + mon_addr = {{ $element }} + {{- end }} +{{- end }} diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/values.yaml b/stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/values.yaml index 62b6b96..fbbae8b 100644 --- a/stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/values.yaml +++ b/stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/values.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2019 Wind River Systems, Inc. +# Copyright (c) 2019-2021 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -13,7 +13,7 @@ labels: name: ceph-pools-audit ceph_client: - configmap: ceph-etc + configmap: ceph-etc-pools-audit conf: ceph: @@ -68,3 +68,4 @@ affinity: {} manifests: job_ceph_pools_audit: true configmap_bin: true + configmap_ceph_conf: true diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/cephfs-provisioner/templates/config-provisioner.yaml b/stx-platform-helm/stx-platform-helm/helm-charts/cephfs-provisioner/templates/config-provisioner.yaml index 0a1c763..dd8880d 100644 --- a/stx-platform-helm/stx-platform-helm/helm-charts/cephfs-provisioner/templates/config-provisioner.yaml +++ b/stx-platform-helm/stx-platform-helm/helm-charts/cephfs-provisioner/templates/config-provisioner.yaml @@ -1,6 +1,6 @@ {{/* # -# Copyright (c) 2020 Wind River Systems, Inc. +# Copyright (c) 2020-2021 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -15,6 +15,9 @@ kind: ConfigMap metadata: name: ceph-config-file namespace: {{ $defaults.cephFSNamespace }} + annotations: + "helm.sh/hook": "pre-upgrade, pre-install" + "helm.sh/hook-delete-policy": "before-hook-creation" data: ceph.conf: | {{ tuple "conf/_ceph-conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} @@ -92,4 +95,4 @@ spec: {{- if .Values.global.nodeSelector }} nodeSelector: {{ .Values.global.nodeSelector | toYaml | trim | indent 8 }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/rbd-provisioner/templates/pre-install-check-ceph.yaml b/stx-platform-helm/stx-platform-helm/helm-charts/rbd-provisioner/templates/pre-install-check-ceph.yaml index ec986b7..f57bec2 100644 --- a/stx-platform-helm/stx-platform-helm/helm-charts/rbd-provisioner/templates/pre-install-check-ceph.yaml +++ b/stx-platform-helm/stx-platform-helm/helm-charts/rbd-provisioner/templates/pre-install-check-ceph.yaml @@ -1,6 +1,6 @@ {{/* # -# Copyright (c) 2018 Wind River Systems, Inc. +# Copyright (c) 2018-2021 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -14,9 +14,11 @@ apiVersion: v1 kind: ConfigMap metadata: - creationTimestamp: 2016-02-18T19:14:38Z name: config-{{- $root.Values.global.name }} namespace: {{ $root.Release.Namespace }} + annotations: + "helm.sh/hook": "pre-upgrade, pre-install" + "helm.sh/hook-delete-policy": "before-hook-creation" data: ceph.conf: | {{ $monitors := $defaults.monitors }}{{ range $index, $element := $monitors}} @@ -202,6 +204,9 @@ kind: ConfigMap metadata: name: ceph-etc namespace: {{ $root.Release.Namespace }} + annotations: + "helm.sh/hook": "pre-upgrade, pre-install" + "helm.sh/hook-delete-policy": "before-hook-creation" data: ceph.conf: | [global]