Skip to content

Commit

Permalink
Index ceph secrets to support multiple Ceph Pod instances
Browse files Browse the repository at this point in the history
As per [1] it is possible to deploy multiple ceph instances by passing a
CEPH_CLUSTERS variable. It represents the number of Ceph Pods we'd like
to deploy, and it allows to either test glance multistore, as well as it
enables to simulate/test edge scenarios (DCN).
This patch just adds an index to the generated Ceph secret, so we do not
fail in case there's only one Ceph cluster.

[1] openstack-k8s-operators/install_yamls#654

Signed-off-by: Francesco Pantano <[email protected]>
  • Loading branch information
fmount committed Jan 15, 2024
1 parent 6843b4f commit 0169173
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ patches:
projected:
sources:
- secret:
name: ceph-conf-files
name: ceph-conf-files-0
mounts:
- name: ceph
mountPath: "/etc/ceph"
Expand Down Expand Up @@ -225,7 +225,7 @@ fi)
kind: OpenStackControlPlane
EOF

FSID=$(oc get secret ceph-conf-files -o json | jq -r '.data."ceph.conf"' | base64 -d | grep fsid | awk 'BEGIN { FS = "=" } ; { print $2 }' | xargs)
FSID=$(oc get secret ceph-conf-files-0 -o json | jq -r '.data."ceph.conf"' | base64 -d | grep fsid | awk 'BEGIN { FS = "=" } ; { print $2 }' | xargs)

sed -i ${BASE_DIR}/install_yamls/out/openstack/openstack/cr/kustomization.yaml -e s/FSID/$FSID/g
cat ${BASE_DIR}/install_yamls/out/openstack/openstack/cr/kustomization.yaml
Expand Down

0 comments on commit 0169173

Please sign in to comment.