Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aks name refactor #1170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Aks name refactor #1170

wants to merge 1 commit into from

Conversation

tony-schndr
Copy link
Collaborator

@tony-schndr tony-schndr commented Jan 28, 2025

What this PR does

Refactors clusters names so they are unique. This change was mostly driven from the requirement of needing unique metrics as Azure Managed Prometheus does not support adding additional labels to default metrics (api server, node, etc) and there is no "resource_group" label to uniquely identity a metric.

How was it tested?

I was able to provision all the infrastructure for a personal dev cluster and create a hosted cluster.

Jira:
Link to demo recording:

Special notes for your reviewer

Copy link

Please rebase pull request.

@tony-schndr
Copy link
Collaborator Author

tony-schndr commented Jan 30, 2025

This change is a breaking change, the errors in the "what-if" look to be expected. We will need to fully redeploy environments

ARO HCP Integrated DEV Bicep What-If / what-if (pull_request)
CS PR Check Environment Bicep What-If / what-if (pull_request)
These checks fail because the aks node rg is already used by the existing cluster..

az deployment group what-if \
	--name svc-dev-13062823655 \
	--resource-group hcp-underlay-dev-svc \
	--template-file templates/svc-cluster.bicep \
	--parameters \
		configurations/svc-cluster.bicepparam
ERROR: InvalidTemplateDeployment - The template deployment 'svc-dev-13062823655' is not valid according to the validation procedure. The tracking id is '58bf22f6-c52e-4814-a406-13dead5776f6'. See inner errors for details.
NodeResourceGroupAlreadyExists - Preflight validation check for resource(s) for container service dev-svc in resource group hcp-underlay-dev-svc failed. Message: Node resource group 'hcp-underlay-dev-svc-aks1' under subscription '***' already exists, please provide a new one.. Details: 
make: *** [Makefile:273: svc.what-if] Error 1

ARO HCP Service PR Check / service_cluster_pr_check (pull_request)
ARO HCP Service PR Check / mgmt_cluster_pr_check (pull_request)

These checks fail because the resource does not exist, expected due to the name change.

ESPONSE 404: 404 Not Found
ERROR CODE: ResourceNotFound
--------------------------------------------------------------------------------
{
  "error": {
    "code": "ResourceNotFound",
    "message": "The Resource 'Microsoft.ContainerService/managedClusters/dev-svc' under resource group 'hcp-underlay-dev-svc' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
  }
}
--------------------------------------------------------------------------------

[23:02:15.080] ERROR: command failed {
  "err": "failed to prepare kubeconfig: failed to get kubeconfig: failed to get cluster access credentials: POST [https://management.azure.com/subscriptions/***/resourceGroups/hcp-underlay-dev-svc/providers/Microsoft.ContainerService/managedClusters/dev-svc/listClusterUserCredential\n--------------------------------------------------------------------------------\nRESPONSE](https://management.azure.com/subscriptions/***/resourceGroups/hcp-underlay-dev-svc/providers/Microsoft.ContainerService/managedClusters/dev-svc/listClusterUserCredential/n--------------------------------------------------------------------------------/nRESPONSE) 404: 404 Not Found\nERROR CODE: ResourceNotFound\n--------------------------------------------------------------------------------\n{\n  \"error\": {\n    \"code\": \"ResourceNotFound\",\n    \"message\": \"The Resource 'Microsoft.ContainerService/managedClusters/dev-svc' under resource group 'hcp-underlay-dev-svc' was not found. For more details please go to [https://aka.ms/ARMResourceNotFoundFix\](https://aka.ms/ARMResourceNotFoundFix/)"\n  }\n}\n--------------------------------------------------------------------------------\n"
}
make: *** [Makefile:148: cluster-service.dry_run] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant