Marketplace
BrowsePublish
Marketplace
upbound/platform-ref-aws-castai@v0.1.0
xclusters.castai.aws.platformref.upbound.io

xclusters.castai.aws.platformref.upbound.io

xclusters.castai.aws.platformref.upbound.io
upbound/platform-ref-aws-castai@v0.1.0xclusters.castai.aws.platformref.upbound.io
Type

Composition

Referenced XRD

XCluster

Source Codegithub.com/upbound/platform-ref-aws-castai
YAML
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
  name: xclusters.castai.aws.platformref.upbound.io
  creationTimestamp: null
spec:
  compositeTypeRef:
    apiVersion: castai.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: XNetworkAWS
            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: Optional
                toFieldPath: status.subnetIds
                type: ToCompositeFieldPath
              - fromFieldPath: status.publicSubnetIds
                policy:
                  fromFieldPath: Optional
                toFieldPath: status.castai.publicSubnetIds
                type: ToCompositeFieldPath
              - fromFieldPath: status.publicSubnetIds
                policy:
                  fromFieldPath: Optional
                toFieldPath: status.castai.publicSubnetIds
                type: ToCompositeFieldPath
              - fromFieldPath: status.vpcId
                policy:
                  fromFieldPath: Optional
                toFieldPath: status.castai.vpcId
                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
              - fromFieldPath: status.eks.accountId
                policy:
                  fromFieldPath: Optional
                toFieldPath: status.castai.accountId
                type: ToCompositeFieldPath
              - fromFieldPath: status.eks.clusterSecurityGroupId
                policy:
                  fromFieldPath: Optional
                toFieldPath: status.castai.clusterSecurityGroupId
                type: ToCompositeFieldPath
              - fromFieldPath: status.eks.clusterName
                policy:
                  fromFieldPath: Optional
                toFieldPath: status.castai.clusterName
                type: ToCompositeFieldPath
              - fromFieldPath: status.castai.instanceProfileRole
                policy:
                  fromFieldPath: Optional
                toFieldPath: spec.parameters.iam.autoscalerArn
                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: castai.aws.platform.upbound.io/v1alpha1
              kind: XReadOnly
            name: cluster-readonly-to-fullaccess
            patches:
              - fromFieldPath: status.castai.clusterName
                policy:
                  fromFieldPath: Required
                toFieldPath: spec.parameters.clusterName
                type: FromCompositeFieldPath
              - fromFieldPath: status.castai.accountId
                policy:
                  fromFieldPath: Required
                toFieldPath: spec.parameters.accountId
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.region
                toFieldPath: spec.parameters.region
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.id
                toFieldPath: spec.parameters.id
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.id
                toFieldPath: metadata.name
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.nodes.deleteNodesOnDisconnect
                toFieldPath: spec.parameters.deleteNodesOnDisconnect
                type: FromCompositeFieldPath
          - base:
              apiVersion: apiextensions.crossplane.io/v1alpha1
              kind: Usage
              spec:
                by:
                  apiVersion: castai.aws.platform.upbound.io/v1alpha1
                  kind: XReadOnly
                  resourceSelector:
                    matchControllerRef: true
                of:
                  apiVersion: aws.platform.upbound.io/v1alpha1
                  kind: XEKS
                  resourceSelector:
                    matchControllerRef: true
            name: usageXEksByXReadOnly
          - base:
              apiVersion: castai.aws.platform.upbound.io/v1alpha1
              kind: XFullAccess
            name: cluster-fullaccess
            patches:
              - fromFieldPath: status.castai.clusterName
                policy:
                  fromFieldPath: Required
                toFieldPath: spec.parameters.clusterName
                type: FromCompositeFieldPath
              - fromFieldPath: status.castai.accountId
                policy:
                  fromFieldPath: Required
                toFieldPath: spec.parameters.accountId
                type: FromCompositeFieldPath
              - fromFieldPath: status.castai.publicSubnetIds
                policy:
                  fromFieldPath: Required
                toFieldPath: spec.parameters.subnets
                type: FromCompositeFieldPath
              - fromFieldPath: status.castai.clusterSecurityGroupId
                policy:
                  fromFieldPath: Required
                toFieldPath: spec.parameters.securityGroups[0]
                type: FromCompositeFieldPath
              - fromFieldPath: status.castai.vpcId
                policy:
                  fromFieldPath: Required
                toFieldPath: spec.parameters.vpc
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.region
                toFieldPath: spec.parameters.region
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.id
                toFieldPath: spec.parameters.id
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.id
                toFieldPath: metadata.name
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.nodes.image
                toFieldPath: spec.parameters.image
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.nodes.deleteNodesOnDisconnect
                toFieldPath: spec.parameters.deleteNodesOnDisconnect
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.nodes.autoscalerPolicies
                toFieldPath: spec.parameters.autoscalerPolicies
                type: FromCompositeFieldPath
              - fromFieldPath: status.onboarding.instanceProfileRole
                policy:
                  fromFieldPath: Optional
                toFieldPath: status.castai.instanceProfileRole
                type: ToCompositeFieldPath
          - base:
              apiVersion: apiextensions.crossplane.io/v1alpha1
              kind: Usage
              spec:
                by:
                  apiVersion: castai.aws.platform.upbound.io/v1alpha1
                  kind: XFullAccess
                  resourceSelector:
                    matchControllerRef: true
                of:
                  apiVersion: aws.platform.upbound.io/v1alpha1
                  kind: XEKS
                  resourceSelector:
                    matchControllerRef: true
            name: usageXEksByXFullAccess
  writeConnectionSecretsToNamespace: upbound-system
Marketplace

Discover the building blocks for your internal cloud platform.

© 2022 Upbound, Inc.

SolutionsProvidersConfigurations
LearnDocumentationTry for Free
MorePrivacy PolicyTerms & Conditions
Marketplace

© 2022 Upbound, Inc.

Marketplace

Discover the building blocksfor your internal cloud platform.