Skip to content

Commit

Permalink
ASOAPI: add e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
nojnhuh committed Apr 30, 2024
1 parent cef502c commit 38b9def
Show file tree
Hide file tree
Showing 14 changed files with 439 additions and 68 deletions.
2 changes: 2 additions & 0 deletions templates/cluster-template-aks-aso-clusterclass.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions templates/cluster-template-aks-aso.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions templates/flavors/aks-aso-clusterclass/clusterclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ spec:
type: SystemAssigned
servicePrincipalProfile:
clientId: msi
networkProfile:
networkPlugin: azure
operatorSpec:
secrets:
adminCredentials:
Expand Down
2 changes: 2 additions & 0 deletions templates/flavors/aks-aso/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ spec:
type: SystemAssigned
servicePrincipalProfile:
clientId: msi
networkProfile:
networkPlugin: azure
operatorSpec:
secrets:
adminCredentials:
Expand Down
197 changes: 197 additions & 0 deletions templates/test/ci/cluster-template-prow-aks-aso.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions templates/test/ci/prow-aks-aso/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: default
resources:
- ../../../flavors/aks-aso
- patches/aks-pool2.yaml

patches:
- patch: |-
- op: test
path: /spec/resources/0/kind
value: ResourceGroup
- op: replace
path: /spec/resources/0/spec/tags
value:
jobName: ${JOB_NAME}
creationTimestamp: ${TIMESTAMP}
buildProvenance: ${BUILD_PROVENANCE}
target:
kind: AzureASOManagedCluster
- patch: |-
- op: test
path: /spec/resources/0/kind
value: ManagedClustersAgentPool
- op: replace
path: /spec/resources/0/spec/vmSize
value: "${AZURE_AKS_NODE_MACHINE_TYPE:=Standard_D2s_v3}"
target:
kind: AzureASOManagedMachinePool
40 changes: 40 additions & 0 deletions templates/test/ci/prow-aks-aso/patches/aks-pool2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachinePool
metadata:
name: "${CLUSTER_NAME}-pool2"
spec:
clusterName: "${CLUSTER_NAME}"
replicas: 1
template:
metadata: {}
spec:
bootstrap:
dataSecretName: ""
clusterName: "${CLUSTER_NAME}"
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: AzureASOManagedMachinePool
name: "${CLUSTER_NAME}-pool2"
version: "${KUBERNETES_VERSION}"
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: AzureASOManagedMachinePool
metadata:
name: "${CLUSTER_NAME}-pool2"
spec:
resources:
- apiVersion: "containerservice.azure.com/v1api20231001"
kind: ManagedClustersAgentPool
metadata:
name: ${CLUSTER_NAME}-pool2
annotations:
serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME}
spec:
azureName: pool2
owner:
name: ${CLUSTER_NAME}
mode: User
type: VirtualMachineScaleSets
vmSize: "${AZURE_AKS_NODE_MACHINE_TYPE:=Standard_D2s_v3}"
osType: Windows
count: 1
Loading

0 comments on commit 38b9def

Please sign in to comment.