xclusters.aws.platformref.upbound.io
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xclusters.aws.platformref.upbound.io
creationTimestamp: null
spec:
compositeTypeRef:
apiVersion: aws.platformref.upbound.io/v1alpha1
kind: XCluster
mode: Pipeline
pipeline:
- step: patch-and-transform
functionRef:
name: upbound-function-patch-and-transform
input:
apiVersion: pt.fn.crossplane.io/v1beta1
kind: Resources
resources:
- base:
apiVersion: aws.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
- fromFieldPath: status.subnetIds
policy:
fromFieldPath: Required
toFieldPath: status.subnetIds
type: ToCompositeFieldPath
- base:
apiVersion: aws.platform.upbound.io/v1alpha1
kind: XEKS
connectionDetails:
- fromConnectionSecretKey: kubeconfig
name: kubeconfig
type: FromConnectionSecretKey
name: XEKS
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: metadata.labels[xeks.aws.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-eks"
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
- fromFieldPath: spec.parameters.iam.roleArn
toFieldPath: spec.parameters.iam.roleArn
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.iam.userArn
toFieldPath: spec.parameters.iam.userArn
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: aws.platform.upbound.io/v1alpha1
kind: XEKS
resourceSelector:
matchControllerRef: true
name: usageXEksByXFlux
- base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
by:
apiVersion: observe.platform.upbound.io/v1alpha1
kind: XOss
resourceSelector:
matchControllerRef: true
of:
apiVersion: aws.platform.upbound.io/v1alpha1
kind: XEKS
resourceSelector:
matchControllerRef: true
name: usageXEksByXOss
- 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: aws.platform.upbound.io/v1alpha1
kind: XEKS
resourceSelector:
matchControllerRef: true
name: usageXEksByArbitraryLabeledRelease
readinessChecks:
- type: None
writeConnectionSecretsToNamespace: upbound-system