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

Do not use default namespace in AKS e2e example #1149

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions test/e2e/data/cluster-templates/azure-aks-topology.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: cluster.x-k8s.io/v1beta1
kind: ClusterClass
metadata:
name: ${CLUSTER_CLASS_NAME}
namespace: "${NAMESPACE}"
namespace: ${NAMESPACE}
spec:
controlPlane:
ref:
Expand Down Expand Up @@ -45,7 +45,7 @@ apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AzureManagedControlPlaneTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: "${NAMESPACE}"
namespace: ${NAMESPACE}
spec:
template:
spec:
Expand All @@ -62,7 +62,7 @@ apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AzureManagedClusterTemplate
metadata:
name: ${CLUSTER_NAME}
namespace: "${NAMESPACE}"
namespace: ${NAMESPACE}
spec:
template:
spec: {}
Expand All @@ -71,7 +71,7 @@ apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AzureManagedMachinePoolTemplate
metadata:
name: ${CLUSTER_NAME}-pool0
namespace: "${NAMESPACE}"
namespace: ${NAMESPACE}
spec:
template:
spec:
Expand All @@ -83,7 +83,7 @@ apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AzureManagedMachinePoolTemplate
metadata:
name: ${CLUSTER_NAME}-pool1
namespace: "${NAMESPACE}"
namespace: ${NAMESPACE}
spec:
template:
spec:
Expand All @@ -95,7 +95,7 @@ apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: RKE2ConfigTemplate
metadata:
name: ${CLUSTER_NAME}-pool0
namespace: "${NAMESPACE}"
namespace: ${NAMESPACE}
spec:
template:
spec: {}
Expand All @@ -104,7 +104,7 @@ apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: RKE2ConfigTemplate
metadata:
name: ${CLUSTER_NAME}-pool1
namespace: "${NAMESPACE}"
namespace: ${NAMESPACE}
spec:
template:
spec: {}
Expand All @@ -117,21 +117,21 @@ metadata:
labels:
clusterctl.cluster.x-k8s.io/move-hierarchy: "true"
name: cluster-identity
namespace: "${NAMESPACE}"
namespace: ${NAMESPACE}
spec:
allowedNamespaces: {}
clientID: ${AZURE_CLIENT_ID}
clientSecret:
name: cluster-identity-secret
namespace: capz-system
namespace: ${NAMESPACE}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to break the test. The Secret is actually in the capz-system namespace (it's reused across tests).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According our documentation: Note that the AzureClusterIdentity is a namespaced resource and it needs to be created in the same namespace as the Cluster. https://turtles.docs.rancher.com/turtles/next/en/user/clusterclass.html#_setup

Copy link
Contributor

@anmazzotti anmazzotti Mar 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjura The documentation is correct. The line I mentioned however is a Secret reference.
The Secret is in capz-system, the AzureClusterIdentity is not.

tenantID: ${AZURE_TENANT_ID}
type: ServicePrincipal
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: ${CLUSTER_NAME}
namespace: "${NAMESPACE}"
namespace: ${NAMESPACE}
spec:
clusterNetwork:
pods:
Expand Down
Loading