diff --git a/rook/helmfile.d/upstream/rook-ceph/templates/configmap.yaml b/rook/helmfile.d/upstream/rook-ceph/templates/configmap.yaml index cc312f55..5dfde244 100644 --- a/rook/helmfile.d/upstream/rook-ceph/templates/configmap.yaml +++ b/rook/helmfile.d/upstream/rook-ceph/templates/configmap.yaml @@ -119,7 +119,7 @@ data: ROOK_CSI_RBD_POD_LABELS: {{ .Values.csi.rbdPodLabels | quote }} {{- end }} {{- if .Values.csi.provisionerTolerations }} - CSI_PROVISIONER_TOLERATIONS: {{ toYaml .Values.csi.provisionerTolerations | quote }} + CSI_PROVISIONER_TOLERATIONS: | {{- toYaml .Values.csi.provisionerTolerations | nindent 4 }} {{- end }} {{- if .Values.csi.provisionerNodeAffinity }} CSI_PROVISIONER_NODE_AFFINITY: {{ .Values.csi.provisionerNodeAffinity }} @@ -146,7 +146,7 @@ data: ROOK_CSI_ALLOW_UNSUPPORTED_VERSION: {{ .Values.csi.allowUnsupportedVersion | quote }} {{- end }} {{- if .Values.csi.pluginTolerations }} - CSI_PLUGIN_TOLERATIONS: {{ toYaml .Values.csi.pluginTolerations | quote }} + CSI_PLUGIN_TOLERATIONS: | {{- toYaml .Values.csi.pluginTolerations | nindent 4 }} {{- end }} {{- if .Values.csi.pluginNodeAffinity }} CSI_PLUGIN_NODE_AFFINITY: {{ .Values.csi.pluginNodeAffinity }} @@ -203,10 +203,10 @@ data: CSI_PROVISIONER_REPLICAS: {{ .Values.csi.provisionerReplicas | quote }} {{- end }} {{- if .Values.csi.csiRBDProvisionerResource }} - CSI_RBD_PROVISIONER_RESOURCE: {{ .Values.csi.csiRBDProvisionerResource | quote }} + CSI_RBD_PROVISIONER_RESOURCE: | {{- toYaml .Values.csi.csiRBDProvisionerResource | nindent 4 }} {{- end }} {{- if .Values.csi.csiRBDPluginResource }} - CSI_RBD_PLUGIN_RESOURCE: {{ .Values.csi.csiRBDPluginResource | quote }} + CSI_RBD_PLUGIN_RESOURCE: | {{ toYaml .Values.csi.csiRBDPluginResource | nindent 4 }} {{- end }} {{- if .Values.csi.csiCephFSProvisionerResource }} CSI_CEPHFS_PROVISIONER_RESOURCE: {{ .Values.csi.csiCephFSProvisionerResource | quote }} diff --git a/rook/helmfile.d/values/cluster.yaml.gotmpl b/rook/helmfile.d/values/cluster.yaml.gotmpl index 113117ba..bdc2d0bb 100644 --- a/rook/helmfile.d/values/cluster.yaml.gotmpl +++ b/rook/helmfile.d/values/cluster.yaml.gotmpl @@ -29,9 +29,6 @@ cephClusterSpec: port: 7000 ssl: false - monitoring: - enabled: {{ .Values | get "monitoring.installServiceMonitors" false }} - mgr: count: {{ $cluster | get "mgr.count" 1 }} @@ -48,16 +45,16 @@ cephClusterSpec: {{- range $name, $spec := . }} {{- $rules := pick $spec "nodeAffinity" "tolerations" "topologySpreadConstraints" }} {{- with $rules }} - {{ $name }}: {{- toYaml $spec | nindent 6 }} + {{ $name }}: {{- toYaml $rules | nindent 6 }} {{- end }} {{- end }} {{- end }} - {{ $resources := pick $cluster "crashCollector" "logCollector" "mgr" "mon" "osd" "prepareosd" "cleanup" "exporter" }} + {{ $resources := pick $cluster "crashCollector" "logCollector" "mgr" "mgr-sidecar" "mon" "osd" "prepareosd" "cleanup" "exporter" }} {{- range $resources }}{{ if hasKey . "resources" }} resources: {{- break }} {{- end }}{{ end }} - {{- range $name, $spec := pick $cluster "crashCollector" "logCollector" "mgr" "mon" "osd" "prepareosd" "cleanup" "exporter" }} + {{- range $name, $spec := pick $cluster "crashCollector" "logCollector" "mgr" "mgr-sidecar" "mon" "osd" "prepareosd" "cleanup" "exporter" }} {{- with $spec | get "resources" dict }} {{ $name | lower }}: {{- toYaml . | nindent 6 }} {{- end }} @@ -105,3 +102,6 @@ cephBlockPools: cephFileSystems: [] cephObjectStores: [] + +monitoring: + enabled: {{ .Values | get "monitoring.installServiceMonitors" false }} diff --git a/rook/helmfile.d/values/operator.yaml.gotmpl b/rook/helmfile.d/values/operator.yaml.gotmpl index 39c10c86..7e3ec510 100644 --- a/rook/helmfile.d/values/operator.yaml.gotmpl +++ b/rook/helmfile.d/values/operator.yaml.gotmpl @@ -18,7 +18,7 @@ tolerations: {{- toYaml . | nindent 2 }} csi: enableCephfsDriver: false - csiRBDProvisionerResource: | + csiRBDProvisionerResource: {{- range $name, $config := omit .Values.provisioner "tolerations" }} - name: {{ $name }} {{- with get "resources" dict $config }} @@ -28,7 +28,7 @@ csi: provisionerTolerations: {{- toYaml .Values.provisioner.tolerations | nindent 4 }} - csiRBDPluginResource: | + csiRBDPluginResource: {{- range $name, $config := omit .Values.plugin "tolerations" }} - name: {{ $name }} {{- with get "resources" dict $config }} diff --git a/rook/migration/v1.11/prepare/diff.sh b/rook/migration/v1.11/prepare/diff.sh index ba08db53..63cd76d7 100755 --- a/rook/migration/v1.11/prepare/diff.sh +++ b/rook/migration/v1.11/prepare/diff.sh @@ -8,20 +8,32 @@ fi block_pool="$(yq4 ".commons * .clusters.${1} | .cluster.cephBlockPool.name // \"replicapool\"" "${CK8S_CONFIG_PATH}/rook/values.yaml")" storage_class="$(yq4 ".commons * .clusters.${1} | .cluster.storageClass.name // \"rook-ceph-block\"" "${CK8S_CONFIG_PATH}/rook/values.yaml")" +echo "diffing operator..." +diff -u100 --color \ + --label current <(kubectl -n rook-ceph get deployment rook-ceph-operator -oyaml | yq4 'sort_keys(...) | del(.metadata.annotations,.metadata.creationTimestamp,.metadata.finalizers,.metadata.generation,.metadata.namespace,.metadata.resourceVersion,.metadata.uid,.status)') \ + --label pending <(helmfile -e "${1}" -l app=operator template | yq4 'select(.kind == "Deployment") | sort_keys(...)') +echo "---" + +echo "diffing operator config..." +diff -u100 --color \ + --label current <(kubectl -n rook-ceph get configmap rook-ceph-operator-config -oyaml | yq4 'sort_keys(...) | del(.metadata.annotations,.metadata.creationTimestamp,.metadata.finalizers,.metadata.generation,.metadata.namespace,.metadata.resourceVersion,.metadata.uid,.status)') \ + --label pending <(helmfile -e "${1}" -l app=operator template | yq4 'select(.kind == "ConfigMap") | sort_keys(...)') +echo "---" + echo "diffing cluster..." -diff -u3 --color \ +diff -u100 --color \ --label current <(kubectl -n rook-ceph get cephclusters.ceph.rook.io rook-ceph -oyaml | yq4 'sort_keys(...) | del(.metadata.annotations,.metadata.creationTimestamp,.metadata.finalizers,.metadata.generation,.metadata.namespace,.metadata.resourceVersion,.metadata.uid,.status)') \ --label pending <(helmfile -e "${1}" -l app=cluster template | yq4 'select(.kind == "CephCluster") | sort_keys(...)') echo "---" echo "diffing block pool..." -diff -u3 --color \ +diff -u100 --color \ --label current <(kubectl -n rook-ceph get cephblockpools.ceph.rook.io "${block_pool}" -oyaml | yq4 'sort_keys(...) | del(.metadata.annotations,.metadata.creationTimestamp,.metadata.finalizers,.metadata.generation,.metadata.namespace,.metadata.resourceVersion,.metadata.uid,.status)') \ --label pending <(helmfile -e service -l app=cluster template | yq4 'select(.kind == "CephBlockPool") | sort_keys(...)') echo "---" echo "diffing storage class..." -diff -u3 --color \ +diff -u100 --color \ --label current <(kubectl -n rook-ceph get storageclass "${storage_class}" -oyaml | yq4 'sort_keys(...) | del(.metadata.annotations,.metadata.creationTimestamp,.metadata.finalizers,.metadata.generation,.metadata.namespace,.metadata.resourceVersion,.metadata.uid,.status)') \ --label pending <(helmfile -e service -l app=cluster template | yq4 'select(.kind == "StorageClass") | sort_keys(...)') echo "---"