Skip to content

Commit 8110c6b

Browse files
committed
Use annotation to recognize new clouds-yaml configStyle.
Signed-off-by: Kurt Garloff <kurt@garloff.de>
1 parent d17eda5 commit 8110c6b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

08-create-cluster.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ else
4444
fi
4545
# Distinguish between old (cloud.config) and new style (clouds.yaml) secrets
4646
# This depends on the clusterstackrelease, not on whether or not we have a newsecret
47-
if kubectl get -n $CS_NAMESPACE clusterstackreleases.clusterstack.x-k8s.io openstack-scs-${CS_MAINVER/./-}-${CS_VERSION/./-} -o jsonpath='{.status.resources}' | grep openstack-scs-${CS_MAINVER/./-}-${CS_VERSION}-clouds-yaml >/dev/null 2>&1; then
47+
#if kubectl get -n $CS_NAMESPACE clusterstackreleases.clusterstack.x-k8s.io openstack-scs-${CS_MAINVER/./-}-${CS_VERSION/./-} -o jsonpath='{.status.resources}' | grep openstack-scs-${CS_MAINVER/./-}-${CS_VERSION}-clouds-yaml >/dev/null 2>&1; then
48+
CFGSTYLE=$(kubectl get clusterclasses.cluster.x-k8s.io -n $CS_NAMESPACE openstack-scs-${CS_MAINVER/./-}-$CS_VERSION -o jsonpath='{.metadata.annotations.configStyle}' || true)
49+
if test "$CFGSTYLE" = "clouds-yaml"; then
4850
MGD_SEC="managed-secret: clouds-yaml$SECRETSUFFIX"
4951
else
5052
MGD_SEC="managed-secret: cloud-config$SECRETSUFFIX"

0 commit comments

Comments
 (0)