зеркало из https://github.com/Azure/knarly.git
add dedicated multi template (#37)
This commit is contained in:
Родитель
0978aec966
Коммит
8f4235ce8c
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
kind: Cluster
|
||||
apiVersion: cluster.x-k8s.io/v1beta1
|
||||
metadata:
|
||||
name: "${CLUSTER_NAME}"
|
||||
spec:
|
||||
controlPlaneRef:
|
||||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
||||
kind: AzureManagedControlPlane
|
||||
name: ${CLUSTER_NAME}
|
||||
infrastructureRef:
|
||||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
||||
kind: AzureManagedCluster
|
||||
name: ${CLUSTER_NAME}
|
|
@ -0,0 +1,10 @@
|
|||
resources:
|
||||
- ../../../bases/cluster.yaml
|
||||
- ../../../bases/azure_managed_cluster.yaml
|
||||
- ../../../bases/cluster_identity.yaml
|
||||
- ../../../bases/azure_managed_control_plane.yaml
|
||||
- nodepool1
|
||||
- nodepool2
|
||||
patchesStrategicMerge:
|
||||
- infra_ref_patch.yaml
|
||||
- ../../identities/azure_managed_control_plane_patch.yaml
|
|
@ -0,0 +1,3 @@
|
|||
resources:
|
||||
- ../../../nodepools/aks/system
|
||||
nameSuffix: "1"
|
|
@ -0,0 +1,3 @@
|
|||
resources:
|
||||
- ../../../nodepools/aks/user
|
||||
nameSuffix: "2"
|
|
@ -0,0 +1,116 @@
|
|||
apiVersion: cluster.x-k8s.io/v1beta1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: ${CLUSTER_NAME}
|
||||
namespace: default
|
||||
spec:
|
||||
clusterNetwork:
|
||||
services:
|
||||
cidrBlocks:
|
||||
- 192.168.0.0/16
|
||||
controlPlaneRef:
|
||||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
||||
kind: AzureManagedControlPlane
|
||||
name: ${CLUSTER_NAME}
|
||||
infrastructureRef:
|
||||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
||||
kind: AzureManagedCluster
|
||||
name: ${CLUSTER_NAME}
|
||||
---
|
||||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
||||
kind: AzureManagedCluster
|
||||
metadata:
|
||||
name: ${CLUSTER_NAME}
|
||||
namespace: default
|
||||
---
|
||||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
||||
kind: AzureClusterIdentity
|
||||
metadata:
|
||||
labels:
|
||||
clusterctl.cluster.x-k8s.io/move-hierarchy: "true"
|
||||
name: ${CLUSTER_IDENTITY_NAME}
|
||||
namespace: default
|
||||
spec:
|
||||
allowedNamespaces: {}
|
||||
clientID: ${AZURE_CLIENT_ID}
|
||||
clientSecret:
|
||||
name: ${AZURE_CLUSTER_IDENTITY_SECRET_NAME}
|
||||
namespace: ${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE}
|
||||
tenantID: ${AZURE_TENANT_ID}
|
||||
type: ServicePrincipal
|
||||
---
|
||||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
||||
kind: AzureManagedControlPlane
|
||||
metadata:
|
||||
name: ${CLUSTER_NAME}
|
||||
namespace: default
|
||||
spec:
|
||||
identityRef:
|
||||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
||||
kind: AzureClusterIdentity
|
||||
name: ${CLUSTER_IDENTITY_NAME}
|
||||
location: ${AZURE_LOCATION}
|
||||
resourceGroupName: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}}
|
||||
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
|
||||
subscriptionID: ${AZURE_SUBSCRIPTION_ID}
|
||||
version: ${KUBERNETES_VERSION}
|
||||
---
|
||||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
||||
kind: AzureManagedMachinePool
|
||||
metadata:
|
||||
name: nodepool1
|
||||
namespace: default
|
||||
spec:
|
||||
maxPods: 12
|
||||
mode: System
|
||||
sku: ${AZURE_NODE_MACHINE_TYPE}
|
||||
---
|
||||
apiVersion: cluster.x-k8s.io/v1beta1
|
||||
kind: MachinePool
|
||||
metadata:
|
||||
name: nodepool1
|
||||
namespace: default
|
||||
spec:
|
||||
clusterName: ${CLUSTER_NAME}
|
||||
replicas: ${WORKER_MACHINE_COUNT}
|
||||
template:
|
||||
metadata: {}
|
||||
spec:
|
||||
bootstrap:
|
||||
dataSecretName: ""
|
||||
clusterName: ${CLUSTER_NAME}
|
||||
infrastructureRef:
|
||||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
||||
kind: AzureManagedMachinePool
|
||||
name: nodepool
|
||||
version: ${KUBERNETES_VERSION}
|
||||
---
|
||||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
||||
kind: AzureManagedMachinePool
|
||||
metadata:
|
||||
name: nodepool2
|
||||
namespace: default
|
||||
spec:
|
||||
maxPods: 12
|
||||
mode: User
|
||||
sku: ${AZURE_NODE_MACHINE_TYPE}
|
||||
---
|
||||
apiVersion: cluster.x-k8s.io/v1beta1
|
||||
kind: MachinePool
|
||||
metadata:
|
||||
name: nodepool2
|
||||
namespace: default
|
||||
spec:
|
||||
clusterName: ${CLUSTER_NAME}
|
||||
replicas: ${WORKER_MACHINE_COUNT}
|
||||
template:
|
||||
metadata: {}
|
||||
spec:
|
||||
bootstrap:
|
||||
dataSecretName: ""
|
||||
clusterName: ${CLUSTER_NAME}
|
||||
infrastructureRef:
|
||||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
||||
kind: AzureManagedMachinePool
|
||||
name: nodepool
|
||||
version: ${KUBERNETES_VERSION}
|
|
@ -190,7 +190,8 @@ var _ = Describe("Workload cluster creation", func() {
|
|||
})
|
||||
|
||||
It("Run multi cluster test", func() {
|
||||
var result1, result2 *clusterctl.ApplyClusterTemplateAndWaitResult
|
||||
result1 := new(clusterctl.ApplyClusterTemplateAndWaitResult)
|
||||
result2 := new(clusterctl.ApplyClusterTemplateAndWaitResult)
|
||||
clusterName = utils.GetClusterName(clusterNamePrefix, "aks1")
|
||||
clusterctl.ApplyClusterTemplateAndWait(ctx, clusterctl.ApplyClusterTemplateAndWaitInput{
|
||||
ClusterProxy: bootstrapClusterProxy,
|
||||
|
@ -199,7 +200,7 @@ var _ = Describe("Workload cluster creation", func() {
|
|||
ClusterctlConfigPath: clusterctlConfigPath,
|
||||
KubeconfigPath: bootstrapClusterProxy.GetKubeconfigPath(),
|
||||
InfrastructureProvider: clusterctl.DefaultInfrastructureProvider,
|
||||
Flavor: "aks",
|
||||
Flavor: "multi",
|
||||
Namespace: namespace.Name,
|
||||
ClusterName: clusterName,
|
||||
KubernetesVersion: e2eConfig.GetVariable(utils.AKSKubernetesVersion),
|
||||
|
@ -223,7 +224,7 @@ var _ = Describe("Workload cluster creation", func() {
|
|||
ClusterctlConfigPath: clusterctlConfigPath,
|
||||
KubeconfigPath: bootstrapClusterProxy.GetKubeconfigPath(),
|
||||
InfrastructureProvider: clusterctl.DefaultInfrastructureProvider,
|
||||
Flavor: "aks",
|
||||
Flavor: "multi",
|
||||
Namespace: namespace.Name,
|
||||
ClusterName: clusterName,
|
||||
KubernetesVersion: e2eConfig.GetVariable(utils.AKSKubernetesVersion),
|
||||
|
|
Загрузка…
Ссылка в новой задаче