Marketplace
BrowsePublish
Marketplace
devops-toolkit/dot-kubernetes@v0.12.88
cluster-google

cluster-google

cluster-google
devops-toolkit/dot-kubernetes@v0.12.88cluster-google
Type

Composition

Referenced XRD

CompositeCluster

Source Codegithub.com/vfarcic/crossplane-kubernetes
Resources (18)

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

Kind
Group
Version

Cluster

container.gcp.crossplane.io
v1beta2

NodePool

container.gcp.crossplane.io
v1beta1

ProviderConfig

helm.crossplane.io
v1beta1

Release

helm.crossplane.io
v1beta1

Release

helm.crossplane.io
v1beta1

ProviderConfig

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1

Object

kubernetes.crossplane.io
v1alpha1
YAML
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
  name: cluster-google
  creationTimestamp: null
  labels:
    cluster: gke
    provider: google
spec:
  compositeTypeRef:
    apiVersion: devopstoolkitseries.com/v1alpha1
    kind: CompositeCluster
  patchSets:
    - name: metadata
      patches:
        - fromFieldPath: metadata.labels
  resources:
    - name: gkecluster
      base:
        apiVersion: container.gcp.crossplane.io/v1beta2
        kind: Cluster
        spec:
          forProvider:
            initialClusterVersion: latest
            location: us-east1
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
        - fromFieldPath: spec.id
          toFieldPath: spec.writeConnectionSecretToRef.name
          transforms:
            - type: string
              string:
                fmt: "%s-cluster"
        - fromFieldPath: spec.writeConnectionSecretToRef.namespace
          toFieldPath: spec.writeConnectionSecretToRef.namespace
        - fromFieldPath: spec.parameters.version
          toFieldPath: spec.forProvider.initialClusterVersion
        - type: ToCompositeFieldPath
          fromFieldPath: metadata.name
          toFieldPath: status.clusterName
        - type: ToCompositeFieldPath
          fromFieldPath: status.atProvider.status
          toFieldPath: status.controlPlaneStatus
      connectionDetails:
        - fromConnectionSecretKey: kubeconfig
        - name: value
          fromConnectionSecretKey: kubeconfig
      readinessChecks:
        - type: MatchString
          fieldPath: status.atProvider.status
          matchString: RUNNING
    - name: nodepool
      base:
        apiVersion: container.gcp.crossplane.io/v1beta1
        kind: NodePool
        spec:
          forProvider:
            autoscaling:
              enabled: true
              maxNodeCount: 3
            clusterSelector:
              matchControllerRef: true
            config:
              oauthScopes:
                - https://www.googleapis.com/auth/cloud-platform
              preemptible: true
            locations:
              - us-east1-b
              - us-east1-c
              - us-east1-d
            management:
              autoRepair: true
              autoUpgrade: false
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
        - fromFieldPath: spec.writeConnectionSecretToRef.namespace
          toFieldPath: spec.credentials.secretRef.namespace
        - fromFieldPath: spec.parameters.minNodeCount
          toFieldPath: spec.forProvider.initialNodeCount
        - fromFieldPath: spec.parameters.minNodeCount
          toFieldPath: spec.forProvider.autoscaling.minNodeCount
        - fromFieldPath: spec.parameters.nodeSize
          toFieldPath: spec.forProvider.config.machineType
          transforms:
            - type: map
              map:
                large: n1-standard-16
                medium: n1-standard-4
                small: n1-standard-2
        - type: ToCompositeFieldPath
          fromFieldPath: status.atProvider.status
          toFieldPath: status.nodePoolStatus
      readinessChecks:
        - type: MatchString
          fieldPath: status.atProvider.status
          matchString: RUNNING
    - name: helm
      base:
        apiVersion: helm.crossplane.io/v1beta1
        kind: ProviderConfig
        spec:
          credentials:
            secretRef:
              key: kubeconfig
            source: Secret
          identity:
            secretRef:
              key: creds
              name: gcp-creds
              namespace: crossplane-system
            source: Secret
            type: GoogleApplicationCredentials
      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-cluster"
      readinessChecks:
        - type: None
    - name: ingress
      base:
        apiVersion: helm.crossplane.io/v1beta1
        kind: Release
        spec:
          forProvider:
            chart:
              name: ingress-nginx
              repository: https://kubernetes.github.io/ingress-nginx
              version: 4.2.0
            namespace: ingress-nginx
            values:
              controller:
                annotations:
                  service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
                  service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
                  service.beta.kubernetes.io/aws-load-balancer-type: nlb
                ingressClassResource:
                  default: true
          rollbackLimit: 3
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-ingress"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: crossplane
      base:
        apiVersion: helm.crossplane.io/v1beta1
        kind: Release
        spec:
          forProvider:
            chart:
              name: crossplane
              repository: https://charts.crossplane.io/stable
              version: 1.9.0
            namespace: crossplane-system
          rollbackLimit: 3
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-crossplane"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: kubernetes
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: ProviderConfig
        spec:
          credentials:
            secretRef:
              key: kubeconfig
            source: Secret
          identity:
            secretRef:
              key: creds
              name: gcp-creds
              namespace: crossplane-system
            source: Secret
            type: GoogleApplicationCredentials
      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-cluster"
      readinessChecks:
        - type: None
    - name: ns-prod
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: v1
              kind: Namespace
              metadata:
                name: production
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-ns-prod"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: ns-dev
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: v1
              kind: Namespace
              metadata:
                name: dev
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-ns-dev"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: k8s-provider-sa
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: v1
              kind: ServiceAccount
              metadata:
                name: provider-kubernetes
                namespace: crossplane-system
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-k8s-provider-sa"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: k8s-provider-crd
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: rbac.authorization.k8s.io/v1
              kind: ClusterRoleBinding
              metadata:
                name: provider-kubernetes
              roleRef:
                apiGroup: rbac.authorization.k8s.io
                kind: ClusterRole
                name: cluster-admin
              subjects:
                - kind: ServiceAccount
                  name: provider-kubernetes
                  namespace: crossplane-system
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-k8s-provider-crb"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: k8s-provider-cc
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: pkg.crossplane.io/v1alpha1
              kind: ControllerConfig
              metadata:
                name: provider-kubernetes
              spec:
                serviceAccountName: provider-kubernetes
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-k8s-provider-cc"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: kubernetes-provider
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: pkg.crossplane.io/v1
              kind: Provider
              metadata:
                name: crossplane-provider-kubernetes
              spec:
                controllerConfigRef:
                  name: provider-kubernetes
                package: xpkg.upbound.io/crossplane-contrib/provider-kubernetes:v0.6.0
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-kubernetes-provider"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: helm-provider
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: pkg.crossplane.io/v1
              kind: Provider
              metadata:
                name: crossplane-provider-helm
              spec:
                controllerConfigRef:
                  name: provider-kubernetes
                package: xpkg.upbound.io/crossplane-contrib/provider-helm:v0.13.0
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-helm-provider"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: sql-provider
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: pkg.crossplane.io/v1
              kind: Provider
              metadata:
                name: crossplane-provider-sql
              spec:
                package: crossplane/provider-sql:v0.5.0
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-sql-provider"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: config-app
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: pkg.crossplane.io/v1
              kind: Configuration
              metadata:
                name: crossplane-app
              spec:
                package: xpkg.upbound.io/devops-toolkit/dot-application:v0.3.8
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-config-app"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: config-monitoring
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: pkg.crossplane.io/v1
              kind: Configuration
              metadata:
                name: crossplane-monitoring
              spec:
                package: xpkg.upbound.io/devops-toolkit/dot-monitoring:v0.0.41
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-config-monitoring"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: config-sql
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: pkg.crossplane.io/v1
              kind: Configuration
              metadata:
                name: crossplane-sql
              spec:
                package: xpkg.upbound.io/devops-toolkit/dot-sql:v0.7.14
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-config-sql"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
    - name: gcp-p
      base:
        apiVersion: kubernetes.crossplane.io/v1alpha1
        kind: Object
        spec:
          forProvider:
            manifest:
              apiVersion: pkg.crossplane.io/v1
              kind: Provider
              metadata:
                name: crossplane-provider-gcp
              spec:
                package: crossplane/provider-gcp:v0.21.0
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-gcp-p"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
  writeConnectionSecretsToNamespace: crossplane-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.