Integration of Azure provider to Airship 2.0

This commit integrates the Azure provider to the Airship 2.0 project.

It adds the following folders:
- manifest/function/capz: This folder contains all manifests required
for the integration of Azure provider.
- manifest/function/k8scontrol-capz: This folder contains the base
manifest for the Azure Workload cluster.
- manifest/site/az-test-site: This folder contains the manifests used
for initializing the CAPI and CAPZ components on the management cluster
invoking "airshipctl cluster init" and manifests used for deploying a
Workload cluster on the Azure Cloud by invoking the command
"airshipctl phase apply azure".
- tools/deployment/azure: provides the script shell that are used in the
zuul gates and local test.

Updated files:
- zuul.d/project.yaml and zuul.d/jobs.yaml have been updated to include
gates for validating the Azure provider integration.

Change-Id: Icbdc7f6f42c159f48dd11e35626da3bc016f5487
This commit is contained in:
Sidney Shiba 2020-09-09 12:41:04 -05:00
parent 8c180daf4e
commit d0683139fe
77 changed files with 4671 additions and 0 deletions

View File

@ -0,0 +1,213 @@
# Airship 2.0 Integration with Azure Cloud Platform
This document provides the instructions to setup and execute *airshipctl*
commands to deploy a Target cluster in Azure cloud platform.
The manifest for the Target cluster deployment can be found at
**manifest/site/az-test-site/target/azure-target**.
It will deploy:
- CAPZ v0.4.5 Management component
- Region: US East
- Control Plane: 1 VM (Standard_B2s)
- Worker: 2 VMs (Standard_B2s)
- Deploying K8S 1.18.3
## Pre-requisites
The list below are the expected pre-requisites for this integration.
- Create your *$HOME/.airship/config*
- Instantiate the Management cluster using Kind
- Update the manifest *manifest/function/capz/v.4.5/default/credentials.yaml*
with the Azure subscription credentials
TODO: Azure subscription credentials to be passed as environment variables
## Steps to create a Management cluster with Kind
The list of commands below creates a K8S cluster to be used as Management cluster
```bash
$ kind create cluster --name airship2-kind-api --kubeconfig /your/folder/kubeconfig.yaml
$ cp /your/folder/kubeconfig.yaml $HOME/.airship/kubeconfig
$ cp /your/folder/kubeconfig.yaml $HOME/.kube/config
```
## Initialize Management cluster
Execute the following command to initialize the Management cluster with CAPI and
CAPZ components.
```bash
$ airshipctl cluster init
```
## Deploy Target cluster on Azure
To deploy the Target cluster on Azure cloude execute the following command.
```bash
$ airshipctl phase apply azure-target
```
Verify the status of Target cluster deployment
```bash
$ kubectl get cluster --all-namespaces
```
Check status of Target cluster KUBEADM control plane deployment
```bash
$ kubectl get kubeadmcontrolplane --all-namespaces
```
Retrieve the kubeconfig of Target cluster
```bash
$ kubectl --namespace=default get secret/az-target-cluster-kubeconfig -o jsonpath={.data.value} \
| base64 --decode > ./az-target-cluster.kubeconfig
```
Check the list of nodes create for the Target cluster
```bash
$ kubectl --kubeconfig=./az-target-cluster.kubeconfig get nodes
```
When all control plane and worker nodes have been created, they will stay in Not Ready state until
CNI is configured. See next step below.
## Configure CNI on the Target cluster with Calico
Calico will be initialized as part of control plane VM *postKubeadmCommands*, which executes the
*sudo kubectl --kubeconfig /etc/kubernetes/admin.conf apply -f https://raw.githubusercontent.com/kubernetes-sigs/cluster-api-provider-azure/master/templates/addons/calico.yaml* command.
See snippet of manifest integrating Calico initialization below:
```yaml
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
kind: KubeadmControlPlane
metadata:
name: az-target-cluster-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureMachineTemplate
name: az-target-cluster-control-plane
kubeadmConfigSpec:
...
files:
- path: /calico.sh
owner: root:root
permissions: "0755"
content: |
#!/bin/bash -x
sudo kubectl --kubeconfig /etc/kubernetes/admin.conf apply -f https://raw.githubusercontent.com/kubernetes-sigs/cluster-api-provider-azure/master/templates/addons/calico.yaml
...
postKubeadmCommands:
- /calico.sh
useExperimentalRetryJoin: true
replicas: 3
version: v1.18.2
```
This approach automates the initialization of Calico and saves the need to execute manually
the list of commands described below.
First we need to provision the Target cluster context in the airship config file
Add Target Cluster manifest to azure_manifest
```bash
$ airshipctl config import ./az-target-cluster.kubeconfig
```
Replace Target Cluster kubeconfig Context in the airship config file
```bash
$ airshipctl config set-context az-target-cluster-admin@az-target-cluster --manifest azure_manifest
```
Set Current Context to the Target Cluster kubeconfig Context in the airship config file
```bash
$ airshipctl config use-context az-target-cluster-admin@az-target-cluster
```
Now we can trigger the configuration of Calico on the Target Cluster
```bash
$ airshipctl phase apply calico --kubeconfig az-target-cluster.kubeconfig
```
Once the Calico provisionning has been completed you should see all the nodes instantiated for the
Target cluster in Ready state.
```bash
$ kubectl --kubeconfig=./az-target-cluster.kubeconfig get nodes
NAME STATUS ROLES AGE VERSION
az-target-cluster-control-plane-28ghk Ready master 17h v1.18.2
az-target-cluster-md-0-46zfv Ready <none> 17h v1.18.2
az-target-cluster-md-0-z5lff Ready <none> 17h v1.18.2
```
## APPENDIX: $HOME/.airship/config
```yaml
apiVersion: airshipit.org/v1alpha1
bootstrapInfo:
azure_bootstrap_config:
builder:
networkConfigFileName: network-config
outputMetadataFileName: output-metadata.yaml
userDataFileName: user-data
container:
containerRuntime: docker
image: quay.io/airshipit/isogen:latest-debian_stable
volume: /srv/iso:/config
remoteDirect:
isoUrl: http://localhost:8099/debian-custom.iso
default:
builder:
networkConfigFileName: network-config
outputMetadataFileName: output-metadata.yaml
userDataFileName: user-data
container:
containerRuntime: docker
image: quay.io/airshipit/isogen:latest-debian_stable
volume: /srv/iso:/config
remoteDirect:
isoUrl: http://localhost:8099/debian-custom.iso
clusters:
az-target-cluster:
clusterType:
target:
bootstrapInfo: default
clusterKubeconf: az-target-cluster_target
managementConfiguration: default
contexts:
az-target-cluster-admin@az-target-cluster:
contextKubeconf: az-target-cluster_target
manifest: azure_manifest
currentContext: az-target-cluster-admin@az-target-cluster
kind: Config
managementConfiguration:
azure_management_config:
insecure: true
systemActionRetries: 30
systemRebootDelay: 30
type: azure
default:
systemActionRetries: 30
systemRebootDelay: 30
type: azure
manifests:
azure_manifest:
primaryRepositoryName: primary
repositories:
primary:
checkout:
branch: master
commitHash: ""
force: false
tag: ""
url: https://review.opendev.org/airship/airshipctl
subPath: airshipctl/manifests/site/az-test-site
targetPath: /tmp/airship
default:
primaryRepositoryName: primary
repositories:
primary:
checkout:
branch: master
commitHash: ""
force: false
tag: ""
url: https://opendev.org/airship/treasuremap
subPath: treasuremap/manifests/site
targetPath: /tmp/default
users:
az-target-cluster-admin: {}
```

View File

@ -0,0 +1,24 @@
# The following manifests contain a self-signed issuer CR and a certificate CR.
# More document can be found at https://docs.cert-manager.io
apiVersion: cert-manager.io/v1alpha2
kind: Issuer
metadata:
name: selfsigned-issuer
namespace: system
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml
namespace: system
spec:
# $(SERVICE_NAME) and $(SERVICE_NAMESPACE) will be substituted by kustomize
dnsNames:
- $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc
- $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc.cluster.local
issuerRef:
kind: Issuer
name: selfsigned-issuer
secretName: $(SERVICE_NAME)-cert

View File

@ -0,0 +1,4 @@
resources:
- certificate.yaml
configurations:
- kustomizeconfig.yaml

View File

@ -0,0 +1,19 @@
# This configuration is for teaching kustomize how to update name ref and var substitution
nameReference:
- kind: Issuer
group: cert-manager.io
fieldSpecs:
- kind: Certificate
group: cert-manager.io
path: spec/issuerRef/name
varReference:
- kind: Certificate
group: cert-manager.io
path: spec/commonName
- kind: Certificate
group: cert-manager.io
path: spec/dnsNames
- kind: Certificate
group: cert-manager.io
path: spec/secretName

View File

@ -0,0 +1,354 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: azuremachinepools.exp.infrastructure.cluster.x-k8s.io
spec:
group: exp.infrastructure.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: AzureMachinePool
listKind: AzureMachinePoolList
plural: azuremachinepools
shortNames:
- amp
singular: azuremachinepool
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: AzureMachinePool replicas count
jsonPath: .status.replicas
name: Replicas
type: string
- description: AzureMachinePool replicas count
jsonPath: .status.ready
name: Ready
type: string
- description: Azure VMSS provisioning state
jsonPath: .status.provisioningState
name: State
type: string
- description: Cluster to which this AzureMachinePool belongs
jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name
name: Cluster
priority: 1
type: string
- description: MachinePool object to which this AzureMachinePool belongs
jsonPath: .metadata.ownerReferences[?(@.kind=="MachinePool")].name
name: MachinePool
priority: 1
type: string
- description: Azure VMSS ID
jsonPath: .spec.providerID
name: VMSS ID
priority: 1
type: string
- description: Azure VM Size
jsonPath: .spec.template.vmSize
name: VM Size
priority: 1
type: string
name: v1alpha3
schema:
openAPIV3Schema:
description: AzureMachinePool is the Schema for the azuremachinepools API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: AzureMachinePoolSpec defines the desired state of AzureMachinePool
properties:
additionalTags:
additionalProperties:
type: string
description: AdditionalTags is an optional set of tags to add to an
instance, in addition to the ones added by default by the Azure
provider. If both the AzureCluster and the AzureMachine specify
the same tag name with different values, the AzureMachine's value
takes precedence.
type: object
location:
description: Location is the Azure region location e.g. westus2
type: string
providerID:
description: ProviderID is the identification ID of the Virtual Machine
Scale Set
type: string
providerIDList:
description: ProviderIDList are the identification IDs of machine
instances provided by the provider. This field must match the provider
IDs as seen on the node objects corresponding to a machine pool's
machine instances.
items:
type: string
type: array
template:
description: Template contains the details used to build a replica
virtual machine within the Machine Pool
properties:
acceleratedNetworking:
description: AcceleratedNetworking enables or disables Azure accelerated
networking. If omitted, it will be set based on whether the
requested VMSize supports accelerated networking. If AcceleratedNetworking
is set to true with a VMSize that does not support it, Azure
will return an error.
type: boolean
dataDisks:
description: DataDisks specifies the list of data disks to be
created for a Virtual Machine
items:
description: DataDisk specifies the parameters that are used
to add one or more data disks to the machine.
properties:
cachingType:
type: string
diskSizeGB:
description: DiskSizeGB is the size in GB to assign to the
data disk.
format: int32
type: integer
lun:
description: Lun Specifies the logical unit number of the
data disk. This value is used to identify data disks within
the VM and therefore must be unique for each data disk
attached to a VM. The value must be between 0 and 63.
format: int32
type: integer
nameSuffix:
description: NameSuffix is the suffix to be appended to
the machine name to generate the disk name. Each disk
name will be in format <machineName>_<nameSuffix>.
type: string
required:
- diskSizeGB
- nameSuffix
type: object
type: array
image:
description: Image is used to provide details of an image to use
during Virtual Machine creation. If image details are omitted
the image will default the Azure Marketplace "capi" offer, which
is based on Ubuntu.
properties:
id:
description: ID specifies an image to use by ID
type: string
marketplace:
description: Marketplace specifies an image to use from the
Azure Marketplace
properties:
offer:
description: Offer specifies the name of a group of related
images created by the publisher. For example, UbuntuServer,
WindowsServer
minLength: 1
type: string
publisher:
description: Publisher is the name of the organization
that created the image
minLength: 1
type: string
sku:
description: SKU specifies an instance of an offer, such
as a major release of a distribution. For example, 18.04-LTS,
2019-Datacenter
minLength: 1
type: string
thirdPartyImage:
default: false
description: ThirdPartyImage indicates the image is published
by a third party publisher and a Plan will be generated
for it.
type: boolean
version:
description: Version specifies the version of an image
sku. The allowed formats are Major.Minor.Build or 'latest'.
Major, Minor, and Build are decimal numbers. Specify
'latest' to use the latest version of an image available
at deploy time. Even if you use 'latest', the VM image
will not automatically update after deploy time even
if a new version becomes available.
minLength: 1
type: string
required:
- offer
- publisher
- sku
- thirdPartyImage
- version
type: object
sharedGallery:
description: SharedGallery specifies an image to use from
an Azure Shared Image Gallery
properties:
gallery:
description: Gallery specifies the name of the shared
image gallery that contains the image
minLength: 1
type: string
name:
description: Name is the name of the image
minLength: 1
type: string
resourceGroup:
description: ResourceGroup specifies the resource group
containing the shared image gallery
minLength: 1
type: string
subscriptionID:
description: SubscriptionID is the identifier of the subscription
that contains the shared image gallery
minLength: 1
type: string
version:
description: Version specifies the version of the marketplace
image. The allowed formats are Major.Minor.Build or
'latest'. Major, Minor, and Build are decimal numbers.
Specify 'latest' to use the latest version of an image
available at deploy time. Even if you use 'latest',
the VM image will not automatically update after deploy
time even if a new version becomes available.
minLength: 1
type: string
required:
- gallery
- name
- resourceGroup
- subscriptionID
- version
type: object
type: object
osDisk:
description: OSDisk contains the operating system disk information
for a Virtual Machine
properties:
cachingType:
type: string
diffDiskSettings:
description: DiffDiskSettings describe ephemeral disk settings
for the os disk.
properties:
option:
description: Option enables ephemeral OS when set to "Local"
See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks
for full details
enum:
- Local
type: string
required:
- option
type: object
diskSizeGB:
format: int32
type: integer
managedDisk:
description: ManagedDisk defines the managed disk options
for a VM.
properties:
storageAccountType:
type: string
required:
- storageAccountType
type: object
osType:
type: string
required:
- diskSizeGB
- managedDisk
- osType
type: object
sshPublicKey:
description: SSHPublicKey is the SSH public key string base64
encoded to add to a Virtual Machine
type: string
terminateNotificationTimeout:
description: TerminateNotificationTimeout enables or disables
VMSS scheduled events termination notification with specified
timeout allowed values are between 5 and 15 (mins)
type: integer
vmSize:
description: VMSize is the size of the Virtual Machine to build.
See https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/createorupdate#virtualmachinesizetypes
type: string
required:
- osDisk
- sshPublicKey
- vmSize
type: object
required:
- location
- template
type: object
status:
description: AzureMachinePoolStatus defines the observed state of AzureMachinePool
properties:
failureMessage:
description: "ErrorMessage will be set in the event that there is
a terminal problem reconciling the MachinePool and will contain
a more verbose string suitable for logging and human consumption.
\n This field should not be set for transitive errors that a controller
faces that are expected to be fixed automatically over time (like
service outages), but instead indicate that something is fundamentally
wrong with the MachinePool's spec or the configuration of the controller,
and that manual intervention is required. Examples of terminal errors
would be invalid combinations of settings in the spec, values that
are unsupported by the controller, or the responsible controller
itself being critically misconfigured. \n Any transient errors that
occur during the reconciliation of MachinePools can be added as
events to the MachinePool object and/or logged in the controller's
output."
type: string
failureReason:
description: "ErrorReason will be set in the event that there is a
terminal problem reconciling the MachinePool and will contain a
succinct value suitable for machine interpretation. \n This field
should not be set for transitive errors that a controller faces
that are expected to be fixed automatically over time (like service
outages), but instead indicate that something is fundamentally wrong
with the MachinePool's spec or the configuration of the controller,
and that manual intervention is required. Examples of terminal errors
would be invalid combinations of settings in the spec, values that
are unsupported by the controller, or the responsible controller
itself being critically misconfigured. \n Any transient errors that
occur during the reconciliation of MachinePools can be added as
events to the MachinePool object and/or logged in the controller's
output."
type: string
provisioningState:
description: ProvisioningState is the provisioning state of the Azure
virtual machine.
type: string
ready:
description: Ready is true when the provider resource is ready.
type: boolean
replicas:
description: Replicas is the most recently observed number of replicas.
format: int32
type: integer
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,77 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: azuremanagedclusters.exp.infrastructure.cluster.x-k8s.io
spec:
group: exp.infrastructure.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: AzureManagedCluster
listKind: AzureManagedClusterList
plural: azuremanagedclusters
shortNames:
- amc
singular: azuremanagedcluster
scope: Namespaced
versions:
- name: v1alpha3
schema:
openAPIV3Schema:
description: AzureManagedCluster is the Schema for the azuremanagedclusters
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: AzureManagedClusterSpec defines the desired state of AzureManagedCluster
properties:
controlPlaneEndpoint:
description: ControlPlaneEndpoint represents the endpoint used to
communicate with the control plane.
properties:
host:
description: The hostname on which the API server is serving.
type: string
port:
description: The port on which the API server is serving.
format: int32
type: integer
required:
- host
- port
type: object
type: object
status:
description: AzureManagedClusterStatus defines the observed state of AzureManagedCluster
properties:
ready:
description: Ready is true when the provider resource is ready.
type: boolean
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,151 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: azuremanagedcontrolplanes.exp.infrastructure.cluster.x-k8s.io
spec:
group: exp.infrastructure.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: AzureManagedControlPlane
listKind: AzureManagedControlPlaneList
plural: azuremanagedcontrolplanes
shortNames:
- amcp
singular: azuremanagedcontrolplane
scope: Namespaced
versions:
- name: v1alpha3
schema:
openAPIV3Schema:
description: AzureManagedControlPlane is the Schema for the azuremanagedcontrolplanes
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: AzureManagedControlPlaneSpec defines the desired state of
AzureManagedControlPlane
properties:
additionalTags:
additionalProperties:
type: string
description: AdditionalTags is an optional set of tags to add to Azure
resources managed by the Azure provider, in addition to the ones
added by default.
type: object
controlPlaneEndpoint:
description: ControlPlaneEndpoint represents the endpoint used to
communicate with the control plane.
properties:
host:
description: The hostname on which the API server is serving.
type: string
port:
description: The port on which the API server is serving.
format: int32
type: integer
required:
- host
- port
type: object
defaultPoolRef:
description: DefaultPoolRef is the specification for the default pool,
without which an AKS cluster cannot be created.
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
type: object
dnsServiceIP:
description: DNSServiceIP is an IP address assigned to the Kubernetes
DNS service. It must be within the Kubernetes service address range
specified in serviceCidr.
type: string
loadBalancerSKU:
description: LoadBalancerSKU is the SKU of the loadBalancer to be
provisioned.
enum:
- Basic
- Standard
type: string
location:
description: 'Location is a string matching one of the canonical Azure
region names. Examples: "westus2", "eastus".'
type: string
networkPlugin:
description: NetworkPlugin used for building Kubernetes network.
enum:
- azure
- kubenet
type: string
networkPolicy:
description: NetworkPolicy used for building Kubernetes network.
enum:
- azure
- calico
type: string
resourceGroup:
description: ResourceGroup is the name of the Azure resource group
for this AKS Cluster.
type: string
sshPublicKey:
description: SSHPublicKey is a string literal containing an ssh public
key base64 encoded.
type: string
subscriptionID:
description: SubscriotionID is the GUID of the Azure subscription
to hold this cluster.
type: string
version:
description: Version defines the desired Kubernetes version.
minLength: 2
type: string
required:
- defaultPoolRef
- location
- resourceGroup
- sshPublicKey
- version
type: object
status:
description: AzureManagedControlPlaneStatus defines the observed state
of AzureManagedControlPlane
properties:
initialized:
description: Initialized is true when the the control plane is available
for initial contact. This may occur before the control plane is
fully ready. In the AzureManagedControlPlane implementation, these
are identical.
type: boolean
ready:
description: Ready is true when the provider resource is ready.
type: boolean
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,95 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: azuremanagedmachinepools.exp.infrastructure.cluster.x-k8s.io
spec:
group: exp.infrastructure.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: AzureManagedMachinePool
listKind: AzureManagedMachinePoolList
plural: azuremanagedmachinepools
shortNames:
- ammp
singular: azuremanagedmachinepool
scope: Namespaced
versions:
- name: v1alpha3
schema:
openAPIV3Schema:
description: AzureManagedMachinePool is the Schema for the azuremanagedmachinepools
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: AzureManagedMachinePoolSpec defines the desired state of
AzureManagedMachinePool
properties:
osDiskSizeGB:
description: OSDiskSizeGB is the disk size for every machine in this
agent pool. If you specify 0, it will apply the default osDisk size
according to the vmSize specified.
format: int32
type: integer
providerIDList:
description: ProviderIDList is the unique identifier as specified
by the cloud provider.
items:
type: string
type: array
sku:
description: SKU is the size of the VMs in the node pool.
type: string
required:
- sku
type: object
status:
description: AzureManagedMachinePoolStatus defines the observed state
of AzureManagedMachinePool
properties:
errorMessage:
description: Any transient errors that occur during the reconciliation
of Machines can be added as events to the Machine object and/or
logged in the controller's output.
type: string
errorReason:
description: Any transient errors that occur during the reconciliation
of Machines can be added as events to the Machine object and/or
logged in the controller's output.
type: string
ready:
description: Ready is true when the provider resource is ready.
type: boolean
replicas:
description: Replicas is the most recently observed number of replicas.
format: int32
type: integer
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,743 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: azureclusters.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: AzureCluster
listKind: AzureClusterList
plural: azureclusters
singular: azurecluster
scope: Namespaced
versions:
- name: v1alpha2
schema:
openAPIV3Schema:
description: AzureCluster is the Schema for the azureclusters API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: AzureClusterSpec defines the desired state of AzureCluster
properties:
additionalTags:
additionalProperties:
type: string
description: AdditionalTags is an optional set of tags to add to Azure
resources managed by the Azure provider, in addition to the ones
added by default.
type: object
location:
type: string
networkSpec:
description: NetworkSpec encapsulates all things related to Azure
network.
properties:
subnets:
description: Subnets is the configuration for the control-plane
subnet and the node subnet.
items:
description: SubnetSpec configures an Azure subnet.
properties:
cidrBlock:
description: CidrBlock is the CIDR block to be used when
the provider creates a managed Vnet.
type: string
id:
description: ID defines a unique identifier to reference
this resource.
type: string
internalLBIPAddress:
description: InternalLBIPAddress is the IP address that
will be used as the internal LB private IP. For the control
plane subnet only.
type: string
name:
description: Name defines a name for the subnet resource.
type: string
role:
description: Role defines the subnet role (eg. Node, ControlPlane)
type: string
securityGroup:
description: SecurityGroup defines the NSG (network security
group) that should be attached to this subnet.
properties:
id:
type: string
ingressRule:
description: IngressRules is a slice of Azure ingress
rules for security groups.
items:
description: IngressRule defines an Azure ingress
rule for security groups.
properties:
description:
type: string
destination:
description: Destination - The destination address
prefix. CIDR or destination IP range. Asterix
'*' can also be used to match all source IPs.
Default tags such as 'VirtualNetwork', 'AzureLoadBalancer'
and 'Internet' can also be used.
type: string
destinationPorts:
description: DestinationPorts - The destination
port or range. Integer or range between 0 and
65535. Asterix '*' can also be used to match
all ports.
type: string
protocol:
description: SecurityGroupProtocol defines the
protocol type for a security group rule.
type: string
source:
description: Source - The CIDR or source IP range.
Asterix '*' can also be used to match all source
IPs. Default tags such as 'VirtualNetwork',
'AzureLoadBalancer' and 'Internet' can also
be used. If this is an ingress rule, specifies
where network traffic originates from.
type: string
sourcePorts:
description: SourcePorts - The source port or
range. Integer or range between 0 and 65535.
Asterix '*' can also be used to match all ports.
type: string
required:
- description
- protocol
type: object
type: array
name:
type: string
tags:
additionalProperties:
type: string
description: Tags defines a map of tags.
type: object
type: object
required:
- name
type: object
type: array
vnet:
description: Vnet is the configuration for the Azure virtual network.
properties:
cidrBlock:
description: CidrBlock is the CIDR block to be used when the
provider creates a managed virtual network.
type: string
id:
description: ID is the identifier of the virtual network this
provider should use to create resources.
type: string
name:
description: Name defines a name for the virtual network resource.
type: string
resourceGroup:
description: ResourceGroup is the name of the resource group
of the existing virtual network or the resource group where
a managed virtual network should be created.
type: string
tags:
additionalProperties:
type: string
description: Tags is a collection of tags describing the resource.
type: object
required:
- name
type: object
type: object
resourceGroup:
type: string
required:
- location
- resourceGroup
type: object
status:
description: AzureClusterStatus defines the observed state of AzureCluster
properties:
apiEndpoints:
description: APIEndpoints represents the endpoints to communicate
with the control plane.
items:
description: APIEndpoint represents a reachable Kubernetes API endpoint.
properties:
host:
description: The hostname on which the API server is serving.
type: string
port:
description: The port on which the API server is serving.
type: integer
required:
- host
- port
type: object
type: array
bastion:
description: VM describes an Azure virtual machine.
properties:
addresses:
description: Addresses contains the Azure instance associated
addresses.
items:
description: NodeAddress contains information for the node's
address.
properties:
address:
description: The node address.
type: string
type:
description: Node address type, one of Hostname, ExternalIP
or InternalIP.
type: string
required:
- address
- type
type: object
type: array
availabilityZone:
type: string
id:
type: string
identity:
description: VMIdentity defines the identity of the virtual machine,
if configured.
type: string
image:
description: Storage profile
properties:
gallery:
type: string
id:
type: string
name:
type: string
offer:
type: string
publisher:
type: string
resourceGroup:
type: string
sku:
type: string
subscriptionID:
type: string
version:
type: string
type: object
name:
type: string
osDisk:
properties:
diskSizeGB:
format: int32
type: integer
managedDisk:
properties:
storageAccountType:
type: string
required:
- storageAccountType
type: object
osType:
type: string
required:
- diskSizeGB
- managedDisk
- osType
type: object
startupScript:
type: string
tags:
additionalProperties:
type: string
description: Tags defines a map of tags.
type: object
vmSize:
description: Hardware profile
type: string
vmState:
description: State - The provisioning state, which only appears
in the response.
type: string
type: object
network:
description: Network encapsulates Azure networking resources.
properties:
apiServerIp:
description: APIServerIP is the Kubernetes API server public IP
address.
properties:
dnsName:
type: string
id:
type: string
ipAddress:
type: string
name:
type: string
type: object
apiServerLb:
description: APIServerLB is the Kubernetes API server load balancer.
properties:
backendPool:
properties:
id:
type: string
name:
type: string
type: object
frontendIpConfig:
type: object
id:
type: string
name:
type: string
sku:
description: LoadBalancerSKU enumerates the values for load
balancer sku name.
type: string
tags:
additionalProperties:
type: string
description: Tags defines a map of tags.
type: object
type: object
securityGroups:
additionalProperties:
description: SecurityGroup defines an Azure security group.
properties:
id:
type: string
ingressRule:
description: IngressRules is a slice of Azure ingress rules
for security groups.
items:
description: IngressRule defines an Azure ingress rule
for security groups.
properties:
description:
type: string
destination:
description: Destination - The destination address
prefix. CIDR or destination IP range. Asterix '*'
can also be used to match all source IPs. Default
tags such as 'VirtualNetwork', 'AzureLoadBalancer'
and 'Internet' can also be used.
type: string
destinationPorts:
description: DestinationPorts - The destination port
or range. Integer or range between 0 and 65535.
Asterix '*' can also be used to match all ports.
type: string
protocol:
description: SecurityGroupProtocol defines the protocol
type for a security group rule.
type: string
source:
description: Source - The CIDR or source IP range.
Asterix '*' can also be used to match all source
IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer'
and 'Internet' can also be used. If this is an ingress
rule, specifies where network traffic originates
from.
type: string
sourcePorts:
description: SourcePorts - The source port or range.
Integer or range between 0 and 65535. Asterix '*'
can also be used to match all ports.
type: string
required:
- description
- protocol
type: object
type: array
name:
type: string
tags:
additionalProperties:
type: string
description: Tags defines a map of tags.
type: object
type: object
description: SecurityGroups is a map from the role/kind of the
security group to its unique name, if any.
type: object
type: object
ready:
description: Ready is true when the provider resource is ready.
type: boolean
type: object
type: object
served: true
storage: false
subresources:
status: {}
- additionalPrinterColumns:
- description: Cluster to which this AzureCluster belongs
jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name
name: Cluster
type: string
- jsonPath: .status.ready
name: Ready
type: boolean
- jsonPath: .spec.resourceGroup
name: Resource Group
priority: 1
type: string
- jsonPath: .spec.subscriptionID
name: SubscriptionID
priority: 1
type: string
- jsonPath: .spec.location
name: Location
priority: 1
type: string
- description: Control Plane Endpoint
jsonPath: .spec.controlPlaneEndpoint.host
name: Endpoint
priority: 1
type: string
name: v1alpha3
schema:
openAPIV3Schema:
description: AzureCluster is the Schema for the azureclusters API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: AzureClusterSpec defines the desired state of AzureCluster
properties:
additionalTags:
additionalProperties:
type: string
description: AdditionalTags is an optional set of tags to add to Azure
resources managed by the Azure provider, in addition to the ones
added by default.
type: object
controlPlaneEndpoint:
description: ControlPlaneEndpoint represents the endpoint used to
communicate with the control plane.
properties:
host:
description: The hostname on which the API server is serving.
type: string
port:
description: The port on which the API server is serving.
format: int32
type: integer
required:
- host
- port
type: object
location:
type: string
networkSpec:
description: NetworkSpec encapsulates all things related to Azure
network.
properties:
subnets:
description: Subnets is the configuration for the control-plane
subnet and the node subnet.
items:
description: SubnetSpec configures an Azure subnet.
properties:
cidrBlock:
description: CidrBlock is the CIDR block to be used when
the provider creates a managed Vnet.
type: string
id:
description: ID defines a unique identifier to reference
this resource.
type: string
internalLBIPAddress:
description: InternalLBIPAddress is the IP address that
will be used as the internal LB private IP. For the control
plane subnet only.
type: string
name:
description: Name defines a name for the subnet resource.
type: string
role:
description: Role defines the subnet role (eg. Node, ControlPlane)
type: string
routeTable:
description: RouteTable defines the route table that should
be attached to this subnet.
properties:
id:
type: string
name:
type: string
type: object
securityGroup:
description: SecurityGroup defines the NSG (network security
group) that should be attached to this subnet.
properties:
id:
type: string
ingressRule:
description: IngressRules is a slice of Azure ingress
rules for security groups.
items:
description: IngressRule defines an Azure ingress
rule for security groups.
properties:
description:
type: string
destination:
description: Destination - The destination address
prefix. CIDR or destination IP range. Asterix
'*' can also be used to match all source IPs.
Default tags such as 'VirtualNetwork', 'AzureLoadBalancer'
and 'Internet' can also be used.
type: string
destinationPorts:
description: DestinationPorts - The destination
port or range. Integer or range between 0 and
65535. Asterix '*' can also be used to match
all ports.
type: string
name:
type: string
priority:
description: Priority - A number between 100 and
4096. Each rule should have a unique value for
priority. Rules are processed in priority order,
with lower numbers processed before higher numbers.
Once traffic matches a rule, processing stops.
format: int32
type: integer
protocol:
description: SecurityGroupProtocol defines the
protocol type for a security group rule.
type: string
source:
description: Source - The CIDR or source IP range.
Asterix '*' can also be used to match all source
IPs. Default tags such as 'VirtualNetwork',
'AzureLoadBalancer' and 'Internet' can also
be used. If this is an ingress rule, specifies
where network traffic originates from.
type: string
sourcePorts:
description: SourcePorts - The source port or
range. Integer or range between 0 and 65535.
Asterix '*' can also be used to match all ports.
type: string
required:
- description
- name
- protocol
type: object
type: array
name:
type: string
tags:
additionalProperties:
type: string
description: Tags defines a map of tags.
type: object
type: object
required:
- name
type: object
type: array
vnet:
description: Vnet is the configuration for the Azure virtual network.
properties:
cidrBlock:
description: CidrBlock is the CIDR block to be used when the
provider creates a managed virtual network.
type: string
id:
description: ID is the identifier of the virtual network this
provider should use to create resources.
type: string
name:
description: Name defines a name for the virtual network resource.
type: string
resourceGroup:
description: ResourceGroup is the name of the resource group
of the existing virtual network or the resource group where
a managed virtual network should be created.
type: string
tags:
additionalProperties:
type: string
description: Tags is a collection of tags describing the resource.
type: object
required:
- name
type: object
type: object
resourceGroup:
type: string
subscriptionID:
type: string
required:
- location
type: object
status:
description: AzureClusterStatus defines the observed state of AzureCluster
properties:
conditions:
description: Conditions defines current service state of the AzureCluster.
items:
description: Condition defines an observation of a Cluster API resource
operational state.
properties:
lastTransitionTime:
description: Last time the condition transitioned from one status
to another. This should be when the underlying condition changed.
If that is not known, then using the time when the API field
changed is acceptable.
format: date-time
type: string
message:
description: A human readable message indicating details about
the transition. This field may be empty.
type: string
reason:
description: The reason for the condition's last transition
in CamelCase. The specific API may choose whether or not this
field is considered a guaranteed API. This field may not be
empty.
type: string
severity:
description: Severity provides an explicit classification of
Reason code, so the users or machines can immediately understand