The following resources are composed to implement the referenced Composite Resource Definition (XRD).
KubernetesCluster
ProviderConfig
ProviderConfig
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xaks.azure.caas.upbound.io
creationTimestamp: null
labels:
provider: azure
spec:
compositeTypeRef:
apiVersion: azure.caas.upbound.io/v1alpha1
kind: XAKS
patchSets:
- name: providerConfigRef
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.parameters.providerConfigName
toFieldPath: spec.providerConfigRef.name
- name: deletionPolicy
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.deletionPolicy
- name: region
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.parameters.region
toFieldPath: spec.forProvider.location
resources:
- name: kubernetes-cluster
base:
apiVersion: containerservice.azure.upbound.io/v1beta1
kind: KubernetesCluster
spec:
forProvider:
defaultNodePool:
- name: default
identity:
- type: SystemAssigned
patches:
- type: PatchSet
patchSetName: providerConfigRef
- type: PatchSet
patchSetName: deletionPolicy
- type: PatchSet
patchSetName: region
- fromFieldPath: spec.parameters.version
toFieldPath: spec.forProvider.kubernetesVersion
- fromFieldPath: spec.parameters.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: "%s-aks"
- fromFieldPath: spec.parameters.id
toFieldPath: spec.forProvider.resourceGroupNameSelector.matchLabels[azure.caas.upbound.io/network-id]
- fromFieldPath: spec.parameters.id
toFieldPath: spec.forProvider.defaultNodePool[0].vnetSubnetIdSelector.matchLabels[azure.caas.upbound.io/network-id]
- fromFieldPath: spec.parameters.id
toFieldPath: spec.forProvider.dnsPrefix
- fromFieldPath: spec.parameters.nodes.size
toFieldPath: spec.forProvider.defaultNodePool[0].vmSize
transforms:
- type: map
map:
large: Standard_B8ms
medium: Standard_B4ms
small: Standard_B2s
- fromFieldPath: spec.parameters.nodes.count
toFieldPath: spec.forProvider.defaultNodePool[0].nodeCount
- fromFieldPath: spec.writeConnectionSecretToRef.namespace
toFieldPath: spec.writeConnectionSecretToRef.namespace
- fromFieldPath: metadata.uid
toFieldPath: spec.writeConnectionSecretToRef.name
transforms:
- type: string
string:
fmt: "%s-akscluster"
connectionDetails:
- fromConnectionSecretKey: kubeconfig
- name: providerConfig-helm
base:
apiVersion: helm.crossplane.io/v1beta1
kind: ProviderConfig
spec:
credentials:
secretRef:
key: kubeconfig
source: Secret
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: metadata.name
- type: PatchSet
patchSetName: deletionPolicy
- fromFieldPath: spec.writeConnectionSecretToRef.namespace
toFieldPath: spec.credentials.secretRef.namespace
- fromFieldPath: metadata.uid
toFieldPath: spec.credentials.secretRef.name
transforms:
- type: string
string:
fmt: "%s-akscluster"
readinessChecks:
- type: None
- name: providerConfig-kubernetes
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: ProviderConfig
spec:
credentials:
secretRef:
key: kubeconfig
source: Secret
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: metadata.name
- type: PatchSet
patchSetName: deletionPolicy
- fromFieldPath: spec.writeConnectionSecretToRef.namespace
toFieldPath: spec.credentials.secretRef.namespace
- fromFieldPath: metadata.uid
toFieldPath: spec.credentials.secretRef.name
transforms:
- type: string
string:
fmt: "%s-akscluster"
readinessChecks:
- type: None
writeConnectionSecretsToNamespace: upbound-system
© 2022 Upbound, Inc.
Discover the building blocksfor your internal cloud platform.