Comments (7)
cc @nojnhuh if you want to sanity check this scenario as available in your ASO AKS prototype
from cluster-api-provider-azure.
@jackfrancis Yes, this kind of thing is possible with my prototype. Sorry @staerion I don't have anything to show for that yet, but keep your eyes on Slack and the PR queue in the coming weeks.
from cluster-api-provider-azure.
Great, thanksk for the heads up! We'll make sure to keep track of the slack channel and new releases.
from cluster-api-provider-azure.
How would this work with CAPZ new ASO v2 API? @nojnhuh @nawazkh
from cluster-api-provider-azure.
How would this work with CAPZ new ASO v2 API? @nojnhuh @nawazkh
You could add vnet and subnet resources to spec.resources
of the AzureASOManagedCluster alongside the ResourceGroup and define them however you want:
from cluster-api-provider-azure.
How would this work with CAPZ new ASO v2 API? @nojnhuh @nawazkh
You could add vnet and subnet resources to
spec.resources
of the AzureASOManagedCluster alongside the ResourceGroup and define them however you want:
This would be the particular kind of change to apply to the flavor template to achieve this:
diff --git a/templates/cluster-template-aks-aso.yaml b/templates/cluster-template-aks-aso.yaml
index 29f77594e..1fb00a94e 100644
--- a/templates/cluster-template-aks-aso.yaml
+++ b/templates/cluster-template-aks-aso.yaml
@@ -54,6 +54,44 @@ spec:
name: ${CLUSTER_NAME}
spec:
location: ${AZURE_LOCATION}
+ - apiVersion: network.azure.com/v1api20201101
+ kind: VirtualNetwork
+ metadata:
+ name: ${CLUSTER_NAME}
+ spec:
+ location: ${AZURE_LOCATION}
+ owner:
+ name: ${CLUSTER_NAME}
+ addressSpace:
+ addressPrefixes:
+ - 10.0.0.0/16
+ - apiVersion: network.azure.com/v1api20201101
+ kind: VirtualNetworksSubnet
+ metadata:
+ name: ${CLUSTER_NAME}-nodes
+ spec:
+ owner:
+ name: ${CLUSTER_NAME}
+ addressPrefix: 10.0.0.0/24
+ - apiVersion: network.azure.com/v1api20201101
+ kind: RouteTable
+ metadata:
+ name: ${CLUSTER_NAME}-nodes
+ spec:
+ location: ${AZURE_LOCATION}
+ owner:
+ name: ${CLUSTER_NAME}
+ disableBgpRoutePropagation: true
+ - apiVersion: network.azure.com/v1api20201101
+ kind: RouteTablesRoute
+ metadata:
+ name: ${CLUSTER_NAME}-route
+ spec:
+ owner:
+ name: ${CLUSTER_NAME}-nodes
+ addressPrefix: cab:cab::/96
+ nextHopType: VirtualAppliance
+ nextHopIpAddress: ace:cab:deca:f00d::1
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachinePool
@@ -95,6 +133,10 @@ spec:
name: ${CLUSTER_NAME}
type: VirtualMachineScaleSets
vmSize: ${AZURE_NODE_MACHINE_TYPE}
+ vnetSubnetReference:
+ group: network.azure.com
+ kind: VirtualNetworksSubnet
+ name: ${CLUSTER_NAME}-nodes
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachinePool
@@ -136,3 +178,7 @@ spec:
name: ${CLUSTER_NAME}
type: VirtualMachineScaleSets
vmSize: ${AZURE_NODE_MACHINE_TYPE}
+ vnetSubnetReference:
+ group: network.azure.com
+ kind: VirtualNetworksSubnet
+ name: ${CLUSTER_NAME}-nodes
Not that you'll have to set the ADDITIONAL_ASO_CRDS
environment variable when you install CAPZ to a valid value for the --crd-pattern
ASO command line flag as described here: https://azure.github.io/azure-service-operator/guide/crd-management/. You could set it to network.azure.com/*
or more granularly depending on what you need.
https://azure.github.io/azure-service-operator/guide/crd-management/
These changes are mostly taken from the examples in the ASO docs, so tweak the parameters as-needed, but this should get you most of the way there.
All of the ASO resources' schemas are defined here: https://azure.github.io/azure-service-operator/reference/
/close
from cluster-api-provider-azure.
@nojnhuh: Closing this issue.
In response to this:
How would this work with CAPZ new ASO v2 API? @nojnhuh @nawazkh
You could add vnet and subnet resources to
spec.resources
of the AzureASOManagedCluster alongside the ResourceGroup and define them however you want:This would be the particular kind of change to apply to the flavor template to achieve this:
diff --git a/templates/cluster-template-aks-aso.yaml b/templates/cluster-template-aks-aso.yaml index 29f77594e..1fb00a94e 100644 --- a/templates/cluster-template-aks-aso.yaml +++ b/templates/cluster-template-aks-aso.yaml @@ -54,6 +54,44 @@ spec: name: ${CLUSTER_NAME} spec: location: ${AZURE_LOCATION} + - apiVersion: network.azure.com/v1api20201101 + kind: VirtualNetwork + metadata: + name: ${CLUSTER_NAME} + spec: + location: ${AZURE_LOCATION} + owner: + name: ${CLUSTER_NAME} + addressSpace: + addressPrefixes: + - 10.0.0.0/16 + - apiVersion: network.azure.com/v1api20201101 + kind: VirtualNetworksSubnet + metadata: + name: ${CLUSTER_NAME}-nodes + spec: + owner: + name: ${CLUSTER_NAME} + addressPrefix: 10.0.0.0/24 + - apiVersion: network.azure.com/v1api20201101 + kind: RouteTable + metadata: + name: ${CLUSTER_NAME}-nodes + spec: + location: ${AZURE_LOCATION} + owner: + name: ${CLUSTER_NAME} + disableBgpRoutePropagation: true + - apiVersion: network.azure.com/v1api20201101 + kind: RouteTablesRoute + metadata: + name: ${CLUSTER_NAME}-route + spec: + owner: + name: ${CLUSTER_NAME}-nodes + addressPrefix: cab:cab::/96 + nextHopType: VirtualAppliance + nextHopIpAddress: ace:cab:deca:f00d::1 --- apiVersion: cluster.x-k8s.io/v1beta1 kind: MachinePool @@ -95,6 +133,10 @@ spec: name: ${CLUSTER_NAME} type: VirtualMachineScaleSets vmSize: ${AZURE_NODE_MACHINE_TYPE} + vnetSubnetReference: + group: network.azure.com + kind: VirtualNetworksSubnet + name: ${CLUSTER_NAME}-nodes --- apiVersion: cluster.x-k8s.io/v1beta1 kind: MachinePool @@ -136,3 +178,7 @@ spec: name: ${CLUSTER_NAME} type: VirtualMachineScaleSets vmSize: ${AZURE_NODE_MACHINE_TYPE} + vnetSubnetReference: + group: network.azure.com + kind: VirtualNetworksSubnet + name: ${CLUSTER_NAME}-nodesNot that you'll have to set the
ADDITIONAL_ASO_CRDS
environment variable when you install CAPZ to a valid value for the--crd-pattern
ASO command line flag as described here: https://azure.github.io/azure-service-operator/guide/crd-management/. You could set it tonetwork.azure.com/*
or more granularly depending on what you need.https://azure.github.io/azure-service-operator/guide/crd-management/
These changes are mostly taken from the examples in the ASO docs, so tweak the parameters as-needed, but this should get you most of the way there.
All of the ASO resources' schemas are defined here: https://azure.github.io/azure-service-operator/reference/
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
from cluster-api-provider-azure.
Related Issues (20)
- Update ASO dep to 2.8.0 HOT 1
- VMSS reaches limit number of models (10) and can't be scaled anymore HOT 5
- Support AKS uninstall of NetworkPolicyManager as part of upgrading to CNI Overlay HOT 4
- Better UX to indicate the reason of WaitingForInfrastructure when using MachinePool/AzureMachinePool HOT 1
- AMCP needs explicit IP CIDR block when referencing existing VNETS HOT 6
- Migrate Upstream tests to community infrastructure HOT 2
- MachinePool ready state leading to not processing providerIDs in CAPI HOT 1
- Better error message for not setting identity field for UserAssignedIdentity HOT 4
- CAPI v1.8.0-beta.0 has been released and is ready for testing
- Generate API version upgrade test templates with kustomize instead of hard-coding them
- CAPZ doesn't invalidate Azure client cache when only auth mechanism changes
- community infra migration: subscription and regional issues
- ASO API - AKS Automatic Authentication Failure HOT 2
- AzureMachinePool controller endlessly reconciles when Azure Policy applies a tag HOT 2
- Cannot reconcile kubeconfig for `AzureMangagedControlPlanes` with local accounts disabled if Identity is provided using `WorkloadIdentity`
- Provide more ASO API migration guidance
- AzureCluster failureDomains do not always match specific control plane AzureMachine SKU HOT 3
- VM provisioning keeps failing with CAPI api (pointing to CAPZ.Windows.Bootstrapping extension failed) HOT 1
- VM creation might fail when failure domain is set and availability set is also created and set
- Tests with highly-available control planes sometimes fail to reach Service targeting Windows workload HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cluster-api-provider-azure.