xclusters.gcp.platformref.upbound.io
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xclusters.gcp.platformref.upbound.io
creationTimestamp: null
spec:
compositeTypeRef:
apiVersion: gcp.platformref.upbound.io/v1alpha1
kind: XCluster
mode: Pipeline
pipeline:
- step: patch-and-transform
functionRef:
name: crossplane-contrib-function-patch-and-transform
input:
apiVersion: pt.fn.crossplane.io/v1beta1
kind: Resources
resources:
- base:
apiVersion: gcp.platform.upbound.io/v1alpha1
kind: XNetwork
name: XNetwork
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: spec.parameters.id
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.region
toFieldPath: spec.parameters.region
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.parameters.deletionPolicy
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.providerConfigName
toFieldPath: spec.parameters.providerConfigName
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.networkSelector
toFieldPath: spec.compositionSelector.matchLabels[type]
type: FromCompositeFieldPath
- base:
apiVersion: gcp.platform.upbound.io/v1alpha1
kind: XGKE
connectionDetails:
- fromConnectionSecretKey: kubeconfig
name: kubeconfig
type: FromConnectionSecretKey
name: XGKE
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: metadata.labels[xgke.gcp.platform.upbound.io/cluster-id]
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.id
toFieldPath: spec.parameters.id
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.region
toFieldPath: spec.parameters.region
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.parameters.deletionPolicy
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.providerConfigName
toFieldPath: spec.parameters.providerConfigName
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.id
toFieldPath: metadata.annotations[crossplane.io/external-name]
type: FromCompositeFieldPath
- fromFieldPath: metadata.uid
toFieldPath: spec.writeConnectionSecretToRef.name
transforms:
- string:
fmt: "%s-gke"
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: spec.writeConnectionSecretToRef.namespace
toFieldPath: spec.writeConnectionSecretToRef.namespace
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.version
toFieldPath: spec.parameters.version
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.nodes.count
toFieldPath: spec.parameters.nodes.count
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.nodes.instanceType
toFieldPath: spec.parameters.nodes.instanceType
type: FromCompositeFieldPath
- base:
apiVersion: observe.platform.upbound.io/v1alpha1
kind: XOss
name: XOss
patches:
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.parameters.deletionPolicy
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.id
toFieldPath: spec.parameters.id
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.operators.prometheus.version
toFieldPath: spec.parameters.operators.prometheus.version
type: FromCompositeFieldPath
- base:
apiVersion: gitops.platform.upbound.io/v1alpha1
kind: XFlux
name: XFlux
patches:
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.parameters.deletionPolicy
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.id
toFieldPath: spec.parameters.providerConfigName
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.operators.flux.version
toFieldPath: spec.parameters.operators.flux.version
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.operators.flux-sync.version
toFieldPath: spec.parameters.operators.flux-sync.version
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.gitops
toFieldPath: spec.parameters.source
type: FromCompositeFieldPath
- base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
by:
apiVersion: gitops.platform.upbound.io/v1alpha1
kind: XFlux
resourceSelector:
matchControllerRef: true
of:
apiVersion: gcp.platform.upbound.io/v1alpha1
kind: XGKE
resourceSelector:
matchControllerRef: true
name: usageXGkeByXFlux
- base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
by:
apiVersion: observe.platform.upbound.io/v1alpha1
kind: XOss
resourceSelector:
matchControllerRef: true
of:
apiVersion: gcp.platform.upbound.io/v1alpha1
kind: XGKE
resourceSelector:
matchControllerRef: true
name: usageXGkeByXOss
- base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
by:
apiVersion: helm.crossplane.io/v1beta1
kind: Release
resourceSelector:
matchLabels:
platform.upbound.io/deletion-ordering: enabled
of:
apiVersion: gcp.platform.upbound.io/v1alpha1
kind: XGKE
resourceSelector:
matchControllerRef: true
name: usageXGkeByArbitraryLabeledRelease
readinessChecks:
- type: None
writeConnectionSecretsToNamespace: upbound-system
© 2022 Upbound, Inc.
Discover the building blocksfor your internal cloud platform.