The following resources are composed to implement the referenced Composite Resource Definition (XRD).
XNetwork
XEKS
XServices
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xclusters.aws.caas.upbound.io
creationTimestamp: null
spec:
compositeTypeRef:
apiVersion: aws.caas.upbound.io/v1alpha1
kind: XCluster
resources:
- name: compositeNetworkEKS
base:
apiVersion: aws.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]
- type: ToCompositeFieldPath
fromFieldPath: status.subnetIds
toFieldPath: status.subnetIds
policy:
fromFieldPath: Required
- name: compositeClusterEKS
base:
apiVersion: aws.caas.upbound.io/v1alpha1
kind: XEKS
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.id
toFieldPath: metadata.annotations[crossplane.io/external-name]
- fromFieldPath: metadata.uid
toFieldPath: spec.writeConnectionSecretToRef.name
transforms:
- type: string
string:
fmt: "%s-eks"
- 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
- fromFieldPath: spec.parameters.iam.roleArn
toFieldPath: spec.parameters.iam.roleArn
- fromFieldPath: spec.parameters.iam.userArn
toFieldPath: spec.parameters.iam.userArn
- fromFieldPath: status.subnetIds
toFieldPath: spec.parameters.subnetIds
policy:
fromFieldPath: Required
connectionDetails:
- fromConnectionSecretKey: kubeconfig
- name: compositeClusterServices
base:
apiVersion: aws.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