kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xsqlinstances.azure.dbaas.upbound.io
creationTimestamp: null
labels:
provider: azure
spec:
compositeTypeRef:
apiVersion: dbaas.upbound.io/v1alpha1
kind: XSQLInstance
mode: Pipeline
pipeline:
- step: patch-and-transform
functionRef:
name: crossplane-contrib-function-patch-and-transform
input:
apiVersion: pt.fn.crossplane.io/v1beta1
kind: Resources
patchSets:
- name: providerConfigRef
patches:
- fromFieldPath: spec.parameters.providerConfigName
toFieldPath: spec.parameters.providerConfigName
type: FromCompositeFieldPath
- name: deletionPolicy
patches:
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.parameters.deletionPolicy
type: FromCompositeFieldPath
- name: region
patches:
- fromFieldPath: spec.parameters.region
toFieldPath: spec.parameters.region
type: FromCompositeFieldPath
resources:
- base:
apiVersion: azure.platform.upbound.io/v1alpha1
kind: XSQLInstance
connectionDetails:
- fromConnectionSecretKey: host
name: host
type: FromConnectionSecretKey
- fromConnectionSecretKey: username
name: username
type: FromConnectionSecretKey
- fromConnectionSecretKey: password
name: password
type: FromConnectionSecretKey
- fromConnectionSecretKey: port
name: port
type: FromConnectionSecretKey
name: xsqlinstance
patches:
- patchSetName: providerConfigRef
type: PatchSet
- patchSetName: deletionPolicy
type: PatchSet
- patchSetName: region
type: PatchSet
- fromFieldPath: spec.parameters.storageGB
toFieldPath: spec.parameters.storageGB
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.passwordSecretRef.namespace
toFieldPath: spec.parameters.passwordSecretRef.namespace
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.passwordSecretRef.name
toFieldPath: spec.parameters.passwordSecretRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.passwordSecretRef.key
toFieldPath: spec.parameters.passwordSecretRef.key
type: FromCompositeFieldPath
- fromFieldPath: metadata.name
toFieldPath: spec.parameters.networkRef.id
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.engine
toFieldPath: spec.compositionSelector.matchLabels[dbengine]
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.engineVersion
toFieldPath: spec.parameters.version
type: FromCompositeFieldPath
- base:
apiVersion: azure.platform.upbound.io/v1alpha1
kind: XNetwork
name: xnetwork
patches:
- patchSetName: region
type: PatchSet
- patchSetName: providerConfigRef
type: PatchSet
- patchSetName: deletionPolicy
type: PatchSet
- fromFieldPath: metadata.name
toFieldPath: spec.parameters.id
type: FromCompositeFieldPath
writeConnectionSecretsToNamespace: upbound-system