kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xconnectors.mcp.caas.upbound.io
creationTimestamp: null
spec:
compositeTypeRef:
apiVersion: mcp.caas.upbound.io/v1alpha1
kind: XConnector
mode: Pipeline
pipeline:
- step: patch-and-transform
functionRef:
name: function-patch-and-transform
input:
apiVersion: pt.fn.crossplane.io/v1beta1
kind: Resources
resources:
- base:
apiVersion: helm.crossplane.io/v1beta1
kind: Release
spec:
forProvider:
chart:
name: mcp-connector
url: https://charts.upbound.io/beta/mcp-connector-0.3.5.tgz
version: 0.3.5
namespace: kube-system
set:
- name: mcp.token
valueFrom:
secretKeyRef:
key: token
namespace: upbound-system
optional: false
values:
mcp:
host: https://proxy.upbound.io
name: mcp-connector
patches:
- fromFieldPath: metadata.labels
toFieldPath: metadata.labels
type: FromCompositeFieldPath
- fromFieldPath: metadata.annotations
toFieldPath: metadata.annotations
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.providerConfigName
toFieldPath: spec.providerConfigRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.deletionPolicy
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.organizationName
toFieldPath: spec.forProvider.values.mcp.account
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.controlPlaneName
toFieldPath: spec.forProvider.set[0].valueFrom.secretKeyRef.name
transforms:
- string:
fmt: "%s-connection-details"
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.controlPlaneName
toFieldPath: spec.forProvider.values.mcp.name
type: FromCompositeFieldPath
- fromFieldPath: metadata.labels[crossplane.io/claim-name]
toFieldPath: spec.forProvider.values.mcp.namespace
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.version
toFieldPath: spec.forProvider.chart.version
type: FromCompositeFieldPath
- combine:
strategy: string
string:
fmt: https://charts.upbound.io/beta/mcp-connector-%s.tgz
variables:
- fromFieldPath: spec.parameters.version
toFieldPath: spec.forProvider.chart.url
type: CombineFromComposite
- fromFieldPath: spec.parameters.version
toFieldPath: spec.forProvider.values.image.tag
transforms:
- string:
fmt: v%s
type: Format
type: string
type: FromCompositeFieldPath
writeConnectionSecretsToNamespace: upbound-system
© 2022 Upbound, Inc.
Discover the building blocksfor your internal cloud platform.