The following resources are composed to implement the referenced Composite Resource Definition (XRD).
XNetwork
XGKE
XServices
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xclusters.gcp.caas.upbound.io
creationTimestamp: null
labels:
provider: GCP
spec:
compositeTypeRef:
apiVersion: gcp.caas.upbound.io/v1alpha1
kind: XCluster
resources:
- base:
apiVersion: gcp.caas.upbound.io/v1alpha1
kind: XNetwork
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: spec.parameters.id
- fromFieldPath: spec.parameters.region
toFieldPath: spec.parameters.region
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.parameters.deletionPolicy
- fromFieldPath: spec.parameters.providerConfigName
toFieldPath: spec.parameters.providerConfigName
- fromFieldPath: spec.parameters.networkSelector
toFieldPath: spec.compositionSelector.matchLabels[type]
- base:
apiVersion: gcp.caas.upbound.io/v1alpha1
kind: XGKE
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: spec.parameters.id
- fromFieldPath: spec.parameters.region
toFieldPath: spec.parameters.region
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.parameters.deletionPolicy
- fromFieldPath: spec.parameters.providerConfigName
toFieldPath: spec.parameters.providerConfigName
- fromFieldPath: metadata.uid
toFieldPath: spec.writeConnectionSecretToRef.name
transforms:
- type: string
string:
fmt: "%s-gke"
- fromFieldPath: spec.writeConnectionSecretToRef.namespace
toFieldPath: spec.writeConnectionSecretToRef.namespace
- fromFieldPath: spec.parameters.version
toFieldPath: spec.parameters.version
- fromFieldPath: spec.parameters.nodes.count
toFieldPath: spec.parameters.nodes.count
- fromFieldPath: spec.parameters.nodes.instanceType
toFieldPath: spec.parameters.nodes.instanceType
connectionDetails:
- fromConnectionSecretKey: kubeconfig
- base:
apiVersion: gcp.caas.upbound.io/v1alpha1
kind: XServices
patches:
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.deletionPolicy
- fromFieldPath: spec.parameters.id
toFieldPath: spec.providerConfigRef.name
- fromFieldPath: spec.parameters.services.operators.flux.version
toFieldPath: spec.operators.flux.version
- fromFieldPath: spec.parameters.gitops.url
toFieldPath: spec.gitops.url
- fromFieldPath: spec.parameters.gitops.path
toFieldPath: spec.gitops.path
- fromFieldPath: spec.parameters.gitops.kubeConfigSecretRef.name
toFieldPath: spec.gitops.kubeConfigSecretRef.name
- fromFieldPath: spec.parameters.gitops.kubeConfigSecretRef.namespace
toFieldPath: spec.gitops.kubeConfigSecretRef.namespace
- fromFieldPath: spec.parameters.serviceSelector
toFieldPath: spec.compositionSelector.matchLabels[type]
writeConnectionSecretsToNamespace: upbound-system
© 2022 Upbound, Inc.
Discover the building blocksfor your internal cloud platform.