Skip to content

Commit

Permalink
Avoid explicitly linking the management cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
  • Loading branch information
tiraboschi committed Jan 30, 2024
1 parent 5c14ad6 commit 8af60bf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ workflow:
allow_best_effort_post_steps: true
allow_skip_on_success: true
post:
- ref: wait # TODO: remove me!
- ref: hypershift-mce-dump
- chain: gather-core-dump
- chain: hypershift-mce-kubevirt-destroy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,26 +121,6 @@ chain:
--pull-secret \${PULL_SECRET_PATH} \
--generate-ssh
oc annotate hostedclusters -n local-cluster \${CLUSTER_NAME} "cluster.open-cluster-management.io/managedcluster-name=\${CLUSTER_NAME}" --overwrite
oc apply -f - <<EOF2
apiVersion: cluster.open-cluster-management.io/v1
kind: ManagedCluster
metadata:
annotations:
import.open-cluster-management.io/hosting-cluster-name: local-cluster
import.open-cluster-management.io/klusterlet-deploy-mode: Hosted
open-cluster-management/created-via: other
labels:
cloud: auto-detect
cluster.open-cluster-management.io/clusterset: default
name: \${CLUSTER_NAME}
vendor: OpenShift
name: \${CLUSTER_NAME}
spec:
hubAcceptsClient: true
leaseDurationSeconds: 60
EOF2
echo "Waiting for cluster to become available"
oc wait --timeout=30m --for=condition=Available --namespace=local-cluster hostedcluster/\${CLUSTER_NAME}
echo "Cluster became available, creating kubeconfig"
Expand All @@ -150,10 +130,6 @@ chain:
scp "${SSHOPTS[@]}" "root@${IP}:/home/nested_kubeconfig" "${SHARED_DIR}/nested_kubeconfig"
if [ "$(oc get infrastructure cluster -o=jsonpath='{.status.platformStatus.type}')" == "BareMetal" ]; then
exit 0
fi
echo "Waiting for nested cluster's node count to reach the desired replicas count in the NodePool"
until \
[[ $(oc get nodepool ${CLUSTER_NAME} -n local-cluster -o jsonpath='{.spec.replicas}') \
Expand Down

0 comments on commit 8af60bf

Please sign in to comment.