Marketplace
BrowsePublish
Marketplace
andrzej/natzka@v1.1
official-aks

official-aks

official-aks
andrzej/natzka@v1.1official-aks
Type

Composition

Referenced XRD

XManagedCluster

Source Codegithub.com/NatzkaLabsOpenSource/managed-kubernetes
Resources (9)

The following resources are composed to implement the referenced Composite Resource Definition (XRD).

Kind
Group
Version

ResourceGroup

azure.upbound.io
v1beta1

VirtualNetwork

network.azure.upbound.io
v1beta1

Subnet

network.azure.upbound.io
v1beta1

KubernetesCluster

containerservice.azure.upbound.io
v1beta1

KubernetesClusterNodePool

containerservice.azure.upbound.io
v1beta1

ProviderConfig

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1

ProviderConfig

helm.crossplane.io
v1beta1

Release

helm.crossplane.io
v1beta1
YAML
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
  name: official-aks
  creationTimestamp: null
  labels:
    cluster: aks
    crossplane.io/xrd: xmanagedclusters.compositions.io
    provider: official
spec:
  compositeTypeRef:
    apiVersion: compositions.io/v1alpha1
    kind: XManagedCluster
  patchSets:
    - name: metadata
      patches:
        - fromFieldPath: metadata.labels
    - name: region
      patches:
        - fromFieldPath: spec.parameters.region
          toFieldPath: spec.forProvider.location
          transforms:
            - type: map
              map:
                afs: southafricanorth
                ape: eastasia
                apne1: japaneast
                apne2: koreacentral
                apne3: japanwest
                aps1: westindia
                apse1: southeastasia
                apse2: australiaeast
                apse3: australiacentral
                cac: canadacentral
                euc: germanywestcentral
                eun: swedencentral
                eus: switzerlandnorth
                euw1: northeurope
                euw2: uksouth
                euw3: francecentral
                sae: brazilsouth
                use1: eastus
                use2: eastus2
                usw1: westus
                usw2: westus2
  resources:
    - name: rg
      base:
        apiVersion: azure.upbound.io/v1beta1
        kind: ResourceGroup
        spec:
          providerConfigRef:
            name: azure-uxp-provider
      patches:
        - type: PatchSet
          patchSetName: metadata
        - type: PatchSet
          patchSetName: region
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: rg-%s
        - type: FromCompositeFieldPath
          fromFieldPath: metadata.name
          toFieldPath: metadata.labels.resourcegroup
    - name: vnet
      base:
        apiVersion: network.azure.upbound.io/v1beta1
        kind: VirtualNetwork
        spec:
          forProvider:
            addressSpace:
              - 10.0.0.0/16
            resourceGroupNameSelector:
              matchControllerRef: true
          providerConfigRef:
            name: azure-uxp-provider
      patches:
        - type: PatchSet
          patchSetName: metadata
        - type: PatchSet
          patchSetName: region
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: vnet-%s
    - name: subnet
      base:
        apiVersion: network.azure.upbound.io/v1beta1
        kind: Subnet
        spec:
          forProvider:
            addressPrefixes:
              - 10.0.0.0/19
            resourceGroupNameSelector:
              matchControllerRef: true
            virtualNetworkNameSelector:
              matchControllerRef: true
          providerConfigRef:
            name: azure-uxp-provider
      patches:
        - type: PatchSet
          patchSetName: metadata
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: snet-%s
    - name: akscluster
      base:
        apiVersion: containerservice.azure.upbound.io/v1beta1
        kind: KubernetesCluster
        spec:
          forProvider:
            defaultNodePool:
              - name: default
                nodeCount: 1
                vmSize: Standard_D2s_v3
                vnetSubnetIDSelector:
                  matchControllerRef: true
            dnsPrefix: uxpjet
            identity:
              - type: SystemAssigned
            resourceGroupNameSelector:
              matchControllerRef: true
            roleBasedAccessControlEnabled: true
          providerConfigRef:
            name: azure-uxp-provider
          writeConnectionSecretToRef:
            namespace: upbound-system
      patches:
        - type: PatchSet
          patchSetName: metadata
        - type: PatchSet
          patchSetName: region
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: cluster-%s
        - fromFieldPath: spec.id
          toFieldPath: spec.writeConnectionSecretToRef.name
          transforms:
            - type: string
              string:
                fmt: "%s-akscluster"
        - fromFieldPath: spec.parameters.version
          toFieldPath: spec.forProvider.kubernetesVersion
        - fromFieldPath: spec.writeConnectionSecretToRef.namespace
        - type: ToCompositeFieldPath
          fromFieldPath: metadata.name
          toFieldPath: status.clusterName
        - type: ToCompositeFieldPath
          fromFieldPath: status.conditions[0].status
          toFieldPath: status.controlPlaneStatus
        - type: ToCompositeFieldPath
          fromFieldPath: metadata.name
          toFieldPath: status.fargateProfileStatus
          transforms:
            - type: string
              string:
                fmt: NA4-%s
      connectionDetails:
        - fromConnectionSecretKey: kubeconfig
      readinessChecks:
        - type: MatchString
          fieldPath: status.conditions[0].status
          matchString: "True"
    - name: aksnode
      base:
        apiVersion: containerservice.azure.upbound.io/v1beta1
        kind: KubernetesClusterNodePool
        spec:
          forProvider:
            kubernetesClusterIdSelector:
              matchControllerRef: true
            vnetSubnetIDSelector:
              matchControllerRef: true
          providerConfigRef:
            name: azure-uxp-provider
      patches:
        - type: PatchSet
          patchSetName: metadata
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: ng0%s
        - fromFieldPath: spec.parameters.nodeCount
          toFieldPath: spec.forProvider.nodeCount
        - fromFieldPath: spec.parameters.nodeSize
          toFieldPath: spec.forProvider.vmSize
          transforms:
            - type: map
              map:
                large: Standard_D8s_v3
                medium: Standard_D4s_v3
                small: Standard_D2s_v3
        - type: ToCompositeFieldPath
          fromFieldPath: status.conditions[0].status
          toFieldPath: status.nodePoolStatus
      readinessChecks:
        - type: MatchString
          fieldPath: status.conditions[0].status
          matchString: "True"
    - name: kubernetes
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: ProviderConfig
        spec:
          credentials:
            secretRef:
              key: kubeconfig
            source: Secret
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
        - fromFieldPath: spec.writeConnectionSecretToRef.namespace
          toFieldPath: spec.credentials.secretRef.namespace
        - fromFieldPath: spec.id
          toFieldPath: spec.credentials.secretRef.name
          transforms:
            - type: string
              string:
                fmt: "%s-akscluster"
      readinessChecks:
        - type: None
    - name: k8s-ns-xp
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: v1
              kind: Namespace
              metadata:
                name: upbound-system
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-ns-xp"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: helm
      base:
        apiVersion: helm.crossplane.io/v1beta1
        kind: ProviderConfig
        spec:
          credentials:
            secretRef:
              key: kubeconfig
            source: Secret
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
        - fromFieldPath: spec.writeConnectionSecretToRef.namespace
          toFieldPath: spec.credentials.secretRef.namespace
        - fromFieldPath: spec.id
          toFieldPath: spec.credentials.secretRef.name
          transforms:
            - type: string
              string:
                fmt: "%s-akscluster"
      readinessChecks:
        - type: None
    - name: helm-uxp
      base:
        apiVersion: helm.crossplane.io/v1beta1
        kind: Release
        spec:
          forProvider:
            chart:
              name: universal-crossplane
              repository: https://charts.upbound.io/stable
              version: 1.9.1-up.2
            namespace: upbound-system
          rollbackLimit: 3
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-uxp"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
  writeConnectionSecretsToNamespace: upbound-system
Marketplace

Discover the building blocks for your internal cloud platform.

© 2022 Upbound, Inc.

SolutionsProvidersConfigurations
LearnDocumentationTry for Free
MorePrivacy PolicyTerms & Conditions
Marketplace

© 2022 Upbound, Inc.

Marketplace

Discover the building blocksfor your internal cloud platform.