The following resources are composed to implement the referenced Composite Resource Definition (XRD).
XNetwork
XEKS
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xkubernetesclusters.k8s.starter.org
creationTimestamp: null
spec:
compositeTypeRef:
apiVersion: k8s.starter.org/v1alpha1
kind: XKubernetesCluster
resources:
- name: compositeNetworkEKS
base:
apiVersion: net.starter.org/v1alpha1
kind: XNetwork
patches:
- fromFieldPath: spec.id
toFieldPath: spec.id
- type: ToCompositeFieldPath
fromFieldPath: status.subnetIds
toFieldPath: status.subnetIds
policy:
fromFieldPath: Required
- type: ToCompositeFieldPath
fromFieldPath: status.securityGroupIds
toFieldPath: status.securityGroupIds
policy:
fromFieldPath: Required
- name: compositeClusterEKS
base:
apiVersion: aws.k8s.starter.org/v1alpha1
kind: XEKS
patches:
- fromFieldPath: spec.id
toFieldPath: spec.id
- fromFieldPath: spec.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.nodes.count
toFieldPath: spec.parameters.nodes.count
- fromFieldPath: spec.parameters.nodes.size
toFieldPath: spec.parameters.nodes.size
- fromFieldPath: status.subnetIds
toFieldPath: spec.parameters.subnetIds
policy:
fromFieldPath: Required
- fromFieldPath: status.securityGroupIds
toFieldPath: spec.parameters.securityGroupIds
policy:
fromFieldPath: Required
connectionDetails:
- fromConnectionSecretKey: kubeconfig
writeConnectionSecretsToNamespace: upbound-system