upbound/platform-ref-cloud-native@v0.0.3
gke.clusters.cloudnative.platformref.crossplane.io

gke.clusters.cloudnative.platformref.crossplane.io

gke.clusters.cloudnative.platformref.crossplane.io
upbound/platform-ref-cloud-native@v0.0.3gke.clusters.cloudnative.platformref.crossplane.io
Type

Composition

Referenced XRD

GKE

Source Codegithub.com/upbound/platform-ref-cloud-native
Resources (5)

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

Kind
Group
Version

Network

compute.gcp.crossplane.io
v1beta1

Subnetwork

compute.gcp.crossplane.io
v1beta1

GKECluster

container.gcp.crossplane.io
v1beta1

NodePool

container.gcp.crossplane.io
v1alpha1

ProviderConfig

helm.crossplane.io
v1beta1
YAML
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
  name: gke.clusters.cloudnative.platformref.crossplane.io
  creationTimestamp: null
  labels:
    provider: GCP
spec:
  compositeTypeRef:
    apiVersion: cloudnative.platformref.crossplane.io/v1alpha1
    kind: GKE
  resources:
    - base:
        apiVersion: compute.gcp.crossplane.io/v1beta1
        kind: Network
        spec:
          forProvider:
            autoCreateSubnetworks: false
            routingConfig:
              routingMode: REGIONAL
          reclaimPolicy: Delete
    - base:
        apiVersion: compute.gcp.crossplane.io/v1beta1
        kind: Subnetwork
        spec:
          forProvider:
            ipCidrRange: 172.16.0.0/16
            networkSelector:
              matchControllerRef: true
            privateIpGoogleAccess: true
            region: us-west2
            secondaryIpRanges:
              - ipCidrRange: 10.200.0.0/14
                rangeName: pods
              - ipCidrRange: 10.204.0.0/16
                rangeName: services
          reclaimPolicy: Delete
    - base:
        apiVersion: container.gcp.crossplane.io/v1beta1
        kind: GKECluster
        spec:
          forProvider:
            addonsConfig:
              gcePersistentDiskCsiDriverConfig:
                enabled: true
            initialClusterVersion: "1.18"
            ipAllocationPolicy:
              clusterSecondaryRangeName: pods
              servicesSecondaryRangeName: services
              useIpAliases: true
            location: us-west2
            loggingService: logging.googleapis.com/kubernetes
            masterAuth:
              username: admin
            masterAuthorizedNetworksConfig:
              enabled: false
            monitoringService: monitoring.googleapis.com/kubernetes
            networkConfig:
              enableIntraNodeVisibility: true
            networkSelector:
              matchControllerRef: true
            subnetworkSelector:
              matchControllerRef: true
      patches:
        - fromFieldPath: metadata.uid
          toFieldPath: spec.writeConnectionSecretToRef.name
          transforms:
            - type: string
              string:
                fmt: "%s-gkecluster"
        - fromFieldPath: spec.writeConnectionSecretToRef.namespace
          toFieldPath: spec.writeConnectionSecretToRef.namespace
      connectionDetails:
        - fromConnectionSecretKey: kubeconfig
    - base:
        apiVersion: container.gcp.crossplane.io/v1alpha1
        kind: NodePool
        spec:
          forProvider:
            autoscaling:
              enabled: true
            clusterSelector:
              matchControllerRef: true
            config:
              diskSizeGb: 100
              diskType: pd-standard
              imageType: COS
              metadata:
                disable-legacy-endpoints: "true"
              oauthScopes:
                - https://www.googleapis.com/auth/cloud-platform
              preemptible: true
              shieldedInstanceConfig:
                enableIntegrityMonitoring: true
                enableSecureBoot: true
            initialNodeCount: 1
            location: us-west2
            management:
              autoRepair: true
              autoUpgrade: false
            maxPodsConstraint:
              maxPodsPerNode: 55
          reclaimPolicy: Delete
      patches:
        - fromFieldPath: spec.nodes.size
          toFieldPath: spec.forProvider.config.machineType
          transforms:
            - type: map
              map:
                large: n1-standard-32
                medium: n1-standard-16
                small: n1-standard-4
        - fromFieldPath: spec.nodes.count
          toFieldPath: spec.forProvider.initialNodeCount
        - fromFieldPath: spec.nodes.count
          toFieldPath: spec.forProvider.autoscaling.minNodeCount
        - fromFieldPath: spec.nodes.count
          toFieldPath: spec.forProvider.autoscaling.maxNodeCount
    - base:
        apiVersion: helm.crossplane.io/v1beta1
        kind: ProviderConfig
        spec:
          credentials:
            secretRef:
              key: kubeconfig
            source: Secret
      patches:
        - fromFieldPath: spec.clusterName
          toFieldPath: metadata.name
        - fromFieldPath: spec.writeConnectionSecretToRef.namespace
          toFieldPath: spec.credentials.secretRef.namespace
        - fromFieldPath: metadata.uid
          toFieldPath: spec.credentials.secretRef.name
          transforms:
            - type: string
              string:
                fmt: "%s-gkecluster"
      readinessChecks:
        - type: None
  writeConnectionSecretsToNamespace: upbound-system
Discover the building blocks for your internal cloud platform.
© 2024 Upbound, Inc.
Solutions