Skip to content

Commit

Permalink
fix!: convert compositions to pipeline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Duologic committed Dec 12, 2024
1 parent 735bdd3 commit 133faec
Show file tree
Hide file tree
Showing 48 changed files with 7,023 additions and 6,639 deletions.
482 changes: 245 additions & 237 deletions packages/grafana-namespaced-alerting/Composition-ContactPoint.yaml

Large diffs are not rendered by default.

242 changes: 125 additions & 117 deletions packages/grafana-namespaced-alerting/Composition-MessageTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,120 +10,128 @@ spec:
compositeTypeRef:
apiVersion: alerting.grafana.crossplane.io.namespaced/v1alpha1
kind: XMessageTemplate
resources:
- base:
apiVersion: alerting.grafana.crossplane.io/v1alpha1
kind: MessageTemplate
name: messagetemplate
patches:
- fromFieldPath: spec.parameters.externalName
toFieldPath: "metadata.annotations[\"crossplane.io/external-name\"]"
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.deletionPolicy
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.disableProvenance
toFieldPath: spec.forProvider.disableProvenance
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.name
toFieldPath: spec.forProvider.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.orgId
toFieldPath: spec.forProvider.orgId
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationRef.name
toFieldPath: spec.forProvider.organizationRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationRef.policy.resolution
toFieldPath: spec.forProvider.organizationRef.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationRef.policy.resolve
toFieldPath: spec.forProvider.organizationRef.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationSelector.matchControllerRef
toFieldPath: spec.forProvider.organizationSelector.matchControllerRef
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationSelector.matchLabels
toFieldPath: spec.forProvider.organizationSelector.matchLabels
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationSelector.policy.resolution
toFieldPath: spec.forProvider.organizationSelector.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationSelector.policy.resolve
toFieldPath: spec.forProvider.organizationSelector.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.template
toFieldPath: spec.forProvider.template
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.disableProvenance
toFieldPath: spec.initProvider.disableProvenance
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.name
toFieldPath: spec.initProvider.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.orgId
toFieldPath: spec.initProvider.orgId
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationRef.name
toFieldPath: spec.initProvider.organizationRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationRef.policy.resolution
toFieldPath: spec.initProvider.organizationRef.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationRef.policy.resolve
toFieldPath: spec.initProvider.organizationRef.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationSelector.matchControllerRef
toFieldPath: spec.initProvider.organizationSelector.matchControllerRef
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationSelector.matchLabels
toFieldPath: spec.initProvider.organizationSelector.matchLabels
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationSelector.policy.resolution
toFieldPath: spec.initProvider.organizationSelector.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationSelector.policy.resolve
toFieldPath: spec.initProvider.organizationSelector.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.template
toFieldPath: spec.initProvider.template
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.managementPolicies
toFieldPath: spec.managementPolicies
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.providerConfigRef.name
toFieldPath: spec.providerConfigRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.providerConfigRef.policy.resolution
toFieldPath: spec.providerConfigRef.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.providerConfigRef.policy.resolve
toFieldPath: spec.providerConfigRef.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.configRef.name
toFieldPath: spec.publishConnectionDetailsTo.configRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.configRef.policy.resolution
toFieldPath: spec.publishConnectionDetailsTo.configRef.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.configRef.policy.resolve
toFieldPath: spec.publishConnectionDetailsTo.configRef.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.metadata.annotations
toFieldPath: spec.publishConnectionDetailsTo.metadata.annotations
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.metadata.labels
toFieldPath: spec.publishConnectionDetailsTo.metadata.labels
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.metadata.type
toFieldPath: spec.publishConnectionDetailsTo.metadata.type
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.name
toFieldPath: spec.publishConnectionDetailsTo.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.writeConnectionSecretToRef.name
toFieldPath: spec.writeConnectionSecretToRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.writeConnectionSecretToRef.namespace
toFieldPath: spec.writeConnectionSecretToRef.namespace
type: FromCompositeFieldPath
mode: Pipeline
pipeline:
- functionRef:
name: function-patch-and-transform
input:
apiVersion: pt.fn.crossplane.io/v1beta1
kind: Resources
resources:
- base:
apiVersion: alerting.grafana.crossplane.io/v1alpha1
kind: MessageTemplate
name: messagetemplate
patches:
- fromFieldPath: spec.parameters.externalName
toFieldPath: "metadata.annotations[\"crossplane.io/external-name\"]"
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.deletionPolicy
toFieldPath: spec.deletionPolicy
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.disableProvenance
toFieldPath: spec.forProvider.disableProvenance
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.name
toFieldPath: spec.forProvider.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.orgId
toFieldPath: spec.forProvider.orgId
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationRef.name
toFieldPath: spec.forProvider.organizationRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationRef.policy.resolution
toFieldPath: spec.forProvider.organizationRef.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationRef.policy.resolve
toFieldPath: spec.forProvider.organizationRef.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationSelector.matchControllerRef
toFieldPath: spec.forProvider.organizationSelector.matchControllerRef
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationSelector.matchLabels
toFieldPath: spec.forProvider.organizationSelector.matchLabels
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationSelector.policy.resolution
toFieldPath: spec.forProvider.organizationSelector.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.organizationSelector.policy.resolve
toFieldPath: spec.forProvider.organizationSelector.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.forProvider.template
toFieldPath: spec.forProvider.template
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.disableProvenance
toFieldPath: spec.initProvider.disableProvenance
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.name
toFieldPath: spec.initProvider.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.orgId
toFieldPath: spec.initProvider.orgId
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationRef.name
toFieldPath: spec.initProvider.organizationRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationRef.policy.resolution
toFieldPath: spec.initProvider.organizationRef.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationRef.policy.resolve
toFieldPath: spec.initProvider.organizationRef.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationSelector.matchControllerRef
toFieldPath: spec.initProvider.organizationSelector.matchControllerRef
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationSelector.matchLabels
toFieldPath: spec.initProvider.organizationSelector.matchLabels
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationSelector.policy.resolution
toFieldPath: spec.initProvider.organizationSelector.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.organizationSelector.policy.resolve
toFieldPath: spec.initProvider.organizationSelector.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.initProvider.template
toFieldPath: spec.initProvider.template
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.managementPolicies
toFieldPath: spec.managementPolicies
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.providerConfigRef.name
toFieldPath: spec.providerConfigRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.providerConfigRef.policy.resolution
toFieldPath: spec.providerConfigRef.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.providerConfigRef.policy.resolve
toFieldPath: spec.providerConfigRef.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.configRef.name
toFieldPath: spec.publishConnectionDetailsTo.configRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.configRef.policy.resolution
toFieldPath: spec.publishConnectionDetailsTo.configRef.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.configRef.policy.resolve
toFieldPath: spec.publishConnectionDetailsTo.configRef.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.metadata.annotations
toFieldPath: spec.publishConnectionDetailsTo.metadata.annotations
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.metadata.labels
toFieldPath: spec.publishConnectionDetailsTo.metadata.labels
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.metadata.type
toFieldPath: spec.publishConnectionDetailsTo.metadata.type
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.publishConnectionDetailsTo.name
toFieldPath: spec.publishConnectionDetailsTo.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.writeConnectionSecretToRef.name
toFieldPath: spec.writeConnectionSecretToRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.writeConnectionSecretToRef.namespace
toFieldPath: spec.writeConnectionSecretToRef.namespace
type: FromCompositeFieldPath
step: patch-and-transform
Loading

0 comments on commit 133faec

Please sign in to comment.