d0683139fe
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
598 lines
28 KiB
YAML
598 lines
28 KiB
YAML
|
|
---
|
|
apiVersion: apiextensions.k8s.io/v1
|
|
kind: CustomResourceDefinition
|
|
metadata:
|
|
annotations:
|
|
controller-gen.kubebuilder.io/version: v0.3.0
|
|
creationTimestamp: null
|
|
name: azuremachines.infrastructure.cluster.x-k8s.io
|
|
spec:
|
|
group: infrastructure.cluster.x-k8s.io
|
|
names:
|
|
categories:
|
|
- cluster-api
|
|
kind: AzureMachine
|
|
listKind: AzureMachineList
|
|
plural: azuremachines
|
|
singular: azuremachine
|
|
scope: Namespaced
|
|
versions:
|
|
- name: v1alpha2
|
|
schema:
|
|
openAPIV3Schema:
|
|
description: AzureMachine is the Schema for the azuremachines 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: AzureMachineSpec defines the desired state of AzureMachine
|
|
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
|
|
allocatePublicIP:
|
|
description: AllocatePublicIP allows the ability to create dynamic
|
|
public ips for machines where this value is true.
|
|
type: boolean
|
|
availabilityZone:
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
id:
|
|
type: string
|
|
type: object
|
|
image:
|
|
description: 'Image defines information about the image to use for
|
|
VM creation. There are three ways to specify an image: by ID, by
|
|
publisher, or by Shared Image Gallery. If specifying an image by
|
|
ID, only the ID field needs to be set. If specifying an image by
|
|
publisher, the Publisher, Offer, SKU, and Version fields must be
|
|
set. If specifying an image from a Shared Image Gallery, the SubscriptionID,
|
|
ResourceGroup, Gallery, Name, and Version fields must be set.'
|
|
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
|
|
location:
|
|
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
|
|
providerID:
|
|
description: ProviderID is the unique identifier as specified by the
|
|
cloud provider.
|
|
type: string
|
|
sshPublicKey:
|
|
type: string
|
|
vmSize:
|
|
type: string
|
|
required:
|
|
- location
|
|
- osDisk
|
|
- sshPublicKey
|
|
- vmSize
|
|
type: object
|
|
status:
|
|
description: AzureMachineStatus defines the observed state of AzureMachine
|
|
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
|
|
errorMessage:
|
|
description: "ErrorMessage will be set in the event that there is
|
|
a terminal problem reconciling the Machine 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 Machine'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 Machines can be added as events
|
|
to the Machine object and/or logged in the controller's output."
|
|
type: string
|
|
errorReason:
|
|
description: "ErrorReason will be set in the event that there is a
|
|
terminal problem reconciling the Machine 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 Machine'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 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
|
|
vmState:
|
|
description: VMState is the provisioning state of the Azure virtual
|
|
machine.
|
|
type: string
|
|
type: object
|
|
type: object
|
|
served: true
|
|
storage: false
|
|
subresources:
|
|
status: {}
|
|
- additionalPrinterColumns:
|
|
- description: AzureMachine ready status
|
|
jsonPath: .status.ready
|
|
name: Ready
|
|
type: string
|
|
- description: Azure VM provisioning state
|
|
jsonPath: .status.vmState
|
|
name: State
|
|
type: string
|
|
- description: Cluster to which this AzureMachine belongs
|
|
jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name
|
|
name: Cluster
|
|
priority: 1
|
|
type: string
|
|
- description: Machine object to which this AzureMachine belongs
|
|
jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name
|
|
name: Machine
|
|
priority: 1
|
|
type: string
|
|
- description: Azure VM ID
|
|
jsonPath: .spec.providerID
|
|
name: VM ID
|
|
priority: 1
|
|
type: string
|
|
- description: Azure VM Size
|
|
jsonPath: .spec.vmSize
|
|
name: VM Size
|
|
priority: 1
|
|
type: string
|
|
name: v1alpha3
|
|
schema:
|
|
openAPIV3Schema:
|
|
description: AzureMachine is the Schema for the azuremachines 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: AzureMachineSpec defines the desired state of AzureMachine
|
|
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
|
|
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
|
|
allocatePublicIP:
|
|
description: AllocatePublicIP allows the ability to create dynamic
|
|
public ips for machines where this value is true.
|
|
type: boolean
|
|
availabilityZone:
|
|
description: 'DEPRECATED: use FailureDomain instead'
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
id:
|
|
type: string
|
|
type: object
|
|
dataDisks:
|
|
description: DataDisk specifies the parameters that are used to add
|
|
one or more data disks to the 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
|
|
failureDomain:
|
|
description: FailureDomain is the failure domain unique identifier
|
|
this Machine should be attached to, as defined in Cluster API. This
|
|
relates to an Azure Availability Zone
|
|
type: string
|
|
identity:
|
|
default: None
|
|
description: Identity is the type of identity used for the virtual
|
|
machine. The type 'SystemAssigned' is an implicitly created identity.
|
|
The generated identity will be assigned a Subscription contributor
|
|
role. The type 'UserAssigned' is a standalone Azure resource provided
|
|
by the user and assigned to the VM
|
|
enum:
|
|
- None
|
|
- SystemAssigned
|
|
- UserAssigned
|
|
type: string
|
|
image:
|
|
description: Image is used to provide details of an image to use during
|
|
VM 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
|
|
location:
|
|
description: 'DEPRECATED: to support old clients, will be removed
|
|
in v1alpha4'
|
|
type: string
|
|
osDisk:
|
|
description: OSDisk specifies the parameters for the operating system
|
|
disk of the 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
|
|
providerID:
|
|
description: ProviderID is the unique identifier as specified by the
|
|
cloud provider.
|
|
type: string
|
|
spotVMOptions:
|
|
description: SpotVMOptions allows the ability to specify the Machine
|
|
should use a Spot VM
|
|
properties:
|
|
maxPrice:
|
|
description: MaxPrice defines the maximum price the user is willing
|
|
to pay for Spot VM instances
|
|
type: number
|
|
type: object
|
|
sshPublicKey:
|
|
type: string
|
|
userAssignedIdentities:
|
|
description: UserAssignedIdentities is a list of standalone Azure
|
|
identities provided by the user The lifecycle of a user-assigned
|
|
identity is managed separately from the lifecycle of the AzureMachine.
|
|
items:
|
|
description: UserAssignedIdentity defines the user-assigned identities
|
|
provided by the user to be assigned to Azure resources.
|
|
properties:
|
|
providerID:
|
|
description: 'ProviderID is the identification ID of the user-assigned
|
|
Identity, the format of an identity is: ''azure:///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'''
|
|
type: string
|
|
required:
|
|
- providerID
|
|
type: object
|
|
type: array
|
|
vmSize:
|
|
type: string
|
|
required:
|
|
- location
|
|
- osDisk
|
|
- sshPublicKey
|
|
- vmSize
|
|
type: object
|
|
status:
|
|
description: AzureMachineStatus defines the observed state of AzureMachine
|
|
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
|
|
conditions:
|
|
description: Conditions defines current service state of the AzureMachine.
|
|
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
|
|
the current situation and act accordingly. The Severity field
|
|
MUST be set only when Status=False.
|
|
type: string
|
|
status:
|
|
description: Status of the condition, one of True, False, Unknown.
|
|
type: string
|
|
type:
|
|
description: Type of condition in CamelCase or in foo.example.com/CamelCase.
|
|
Many .condition.type values are consistent across resources
|
|
like Available, but because arbitrary conditions can be useful
|
|
(see .node.status.conditions), the ability to deconflict is
|
|
important.
|
|
type: string
|
|
required:
|
|
- status
|
|
- type
|
|
type: object
|
|
type: array
|
|
failureMessage:
|
|
description: "ErrorMessage will be set in the event that there is
|
|
a terminal problem reconciling the Machine 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 Machine'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 Machines can be added as events
|
|
to the Machine 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 Machine 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 Machine'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 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
|
|
vmState:
|
|
description: VMState is the provisioning state of the Azure virtual
|
|
machine.
|
|
type: string
|
|
type: object
|
|
type: object
|
|
served: true
|
|
storage: true
|
|
subresources:
|
|
status: {}
|
|
status:
|
|
acceptedNames:
|
|
kind: ""
|
|
plural: ""
|
|
conditions: []
|
|
storedVersions: []
|