seanblong/test@v0.1.1
autopilot-composition

autopilot-composition

autopilot-composition
seanblong/test@v0.1.1autopilot-composition
Type

Composition

Referenced XRD

XAutoPilotCluster

Source Codegithub.com/dexcom-inc/cdo-toolbox
Resources (2)

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

Kind
Group
Version

Subnetwork

compute.gcp.upbound.io
v1beta1

Cluster

container.gcp.upbound.io
v1beta1
YAML
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
  name: autopilot-composition
  creationTimestamp: null
  labels:
    provider: GCP
spec:
  compositeTypeRef:
    apiVersion: devops.dexcom.io/v1alpha1
    kind: XAutoPilotCluster
  resources:
    - base:
        apiVersion: compute.gcp.upbound.io/v1beta1
        kind: Subnetwork
        spec:
          forProvider:
            deletionPolicy: Orphan
            ipCidrRange: 10.1.0.0/24
            privateIpGoogleAccess: true
            region: us-central1
            secondaryIpRange:
              - ipCidrRange: 10.1.64.0/18
                rangeName: pods
              - ipCidrRange: 10.1.128.0/19
                rangeName: services
          providerConfigRef:
            name: gcp-provider
      patches:
        - type: CombineFromComposite
          combine:
            variables:
              - fromFieldPath: spec.id
            strategy: string
            string:
              fmt: sandbox%s-k8s
          toFieldPath: metadata.name
        - fromFieldPath: spec.nodeRange
          toFieldPath: spec.forProvider.ipCidrRange
        - fromFieldPath: spec.podRange
          toFieldPath: spec.forProvider.secondaryIpRange[0].ipCidrRange
        - fromFieldPath: spec.serviceRange
          toFieldPath: spec.forProvider.secondaryIpRange[1].ipCidrRange
        - fromFieldPath: spec.region
          toFieldPath: spec.forProvider.region
        - fromFieldPath: spec.networkName
          toFieldPath: spec.forProvider.network
    - base:
        apiVersion: container.gcp.upbound.io/v1beta1
        kind: Cluster
        spec:
          forProvider:
            deletionPolicy: Delete
            enableAutopilot: true
            initialNodeCount: 1
            ipAllocationPolicy:
              - clusterSecondaryRangeName: pods
                servicesSecondaryRangeName: services
            location: us-central1
            masterAuthorizedNetworksConfig:
              - cidrBlocks:
                  - cidrBlock: 66.85.67.20/32
                    displayName: Dexcom HQ
            privateClusterConfig:
              - enablePrivateNodes: true
                masterGlobalAccessConfig:
                  - enabled: false
            releaseChannel:
              - channel: STABLE
            subnetworkSelector:
              matchControllerRef: true
          providerConfigRef:
            name: gcp-provider
      patches:
        - fromFieldPath: spec.networkName
          toFieldPath: spec.forProvider.network
        - fromFieldPath: spec.region
          toFieldPath: spec.forProvider.location
        - type: CombineFromComposite
          combine:
            variables:
              - fromFieldPath: spec.id
            strategy: string
            string:
              fmt: sandbox-%s
          toFieldPath: metadata.name
      connectionDetails:
        - fromConnectionSecretKey: kubeconfig
  writeConnectionSecretsToNamespace: upbound-system
Discover the building blocks for your internal cloud platform.
© 2024 Upbound, Inc.
Solutions