Skip to content

Commit

Permalink
Prevent availabilitySetName error when deploying Azure ManagedCluster
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Squizzato <[email protected]>
  • Loading branch information
squizzi committed Oct 1, 2024
1 parent 84b64c9 commit d624862
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
id: vars
run: |
echo "version=$(git describe --tags --always)" >> $GITHUB_OUTPUT
echo "clustername=ci-e2e-test-$(date +%s)" >> $GITHUB_OUTPUT
echo "clustername=ci-$(date +%s | cut -b6-10)" >> $GITHUB_OUTPUT
- name: Build and push HMC controller image
uses: docker/build-push-action@v6
with:
Expand Down
5 changes: 5 additions & 0 deletions test/e2e/managedcluster/managedcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ func setClusterName(templateName Template) {
generatedName = fmt.Sprintf("%s-%s", generatedName, "hosted")
}

// Azure has a 19 character limit for cluster names.
if providerName == "azure" {
generatedName = generatedName[0:18]
}

GinkgoT().Setenv(EnvVarManagedClusterName, generatedName)
}

Expand Down

0 comments on commit d624862

Please sign in to comment.