Skip to content

Commit

Permalink
Seed name ManagedCluster label
Browse files Browse the repository at this point in the history
Signed-off-by: Dale Haiducek <[email protected]>
  • Loading branch information
dhaiducek committed Jan 6, 2025
1 parent 80a1d42 commit 4a9dd65
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build/manage-clusters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,21 @@ for i in $(seq 2 $((MANAGED_CLUSTER_COUNT + 1))); do
KIND_KUBECONFIG="${PWD}/kubeconfig_${CLUSTER_PREFIX}1_e2e" make kind-deploy-addons
;;
esac

# Label the managed clusters with "name"
cat <<EOF | kubectl apply --kubeconfig=${PWD}/kubeconfig_${CLUSTER_NAME}_e2e -f -
apiVersion: cluster.open-cluster-management.io/v1alpha1
kind: ClusterClaim
metadata:
name: name
spec:
value: ${CLUSTER_NAME}
EOF

done

# Temporary ManagedCluster label workaround since the ClusterClaim controller
# isn't running in our current setup
for mc in $(kubectl get managedclusters -o name); do
kubectl label ${mc%/*} ${mc#*/} name=${mc#*/}
done

0 comments on commit 4a9dd65

Please sign in to comment.