Skip to content

Commit

Permalink
Merge pull request crossplane-contrib#23 from akesser/feature/patchName
Browse files Browse the repository at this point in the history
Feature/patch name
  • Loading branch information
haarchri authored Sep 8, 2023
2 parents fe07bac + 0f6d972 commit d880e90
Show file tree
Hide file tree
Showing 19 changed files with 495 additions and 14 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ The local configuration is placed in the subfolder of the composition to be crea
| tags.globalHandling.fromLabels | "append" or "replace" | If append, the tags in tags.fromLabels are appended to the tags in the global configuration tags.fromLabels, otherwise those will be replaced |
| tags.globalHandling.common | "append" or "replace" | If append, the tags in labels.common are appended to the tasg in the global configuration tags.common, otherwise those will be replaced |
| overrideFieldsInClaim | object | This optional property can be used to override the names in the composite and the claim or add properties. See description below |
| patchName | boolean | If set to false, the name of the object will not be patched, otherwise`patchExternalName` decides if the name of the claim will be patched to `metadata.name` or `metadata.annotations[crossplane.io/external-name]` |
| patchExternalName | boolean | Decides if if the name of the claim will be patched to `metadata.name` or `metadata.annotations[crossplane.io/external-name]`. Not applied if `patchName` is false |



## overrideFieldsInClaim
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## WARNING: This file was autogenerated!
## Manual modifications will be overwritten
## unless ignore: true is set in generate.yaml!
## Last Modification: 11:59:22 on 04-25-2023.
## Last Modification: 08:00:35 on 08-30-2023.

apiVersion: apiextensions.crossplane.io/v1
kind: Composition
Expand Down
2 changes: 1 addition & 1 deletion package/IAM-Policy/composition-policy.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## WARNING: This file was autogenerated!
## Manual modifications will be overwritten
## unless ignore: true is set in generate.yaml!
## Last Modification: 20:03:39 on 04-28-2023.
## Last Modification: 08:00:35 on 08-30-2023.

apiVersion: apiextensions.crossplane.io/v1
kind: Composition
Expand Down
2 changes: 1 addition & 1 deletion package/IAM-Role/composition-role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## WARNING: This file was autogenerated!
## Manual modifications will be overwritten
## unless ignore: true is set in generate.yaml!
## Last Modification: 11:59:23 on 04-25-2023.
## Last Modification: 08:00:36 on 08-30-2023.

apiVersion: apiextensions.crossplane.io/v1
kind: Composition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## WARNING: This file was autogenerated!
## Manual modifications will be overwritten
## unless ignore: true is set in generate.yaml!
## Last Modification: 11:59:24 on 04-25-2023.
## Last Modification: 08:00:55 on 08-30-2023.

apiVersion: apiextensions.crossplane.io/v1
kind: Composition
Expand Down
2 changes: 1 addition & 1 deletion package/KMS-Alias/composition-alias.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## WARNING: This file was autogenerated!
## Manual modifications will be overwritten
## unless ignore: true is set in generate.yaml!
## Last Modification: 11:59:25 on 04-25-2023.
## Last Modification: 08:00:37 on 08-30-2023.

apiVersion: apiextensions.crossplane.io/v1
kind: Composition
Expand Down
2 changes: 1 addition & 1 deletion package/KMS-Key/composition-key.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## WARNING: This file was autogenerated!
## Manual modifications will be overwritten
## unless ignore: true is set in generate.yaml!
## Last Modification: 11:59:25 on 04-25-2023.
## Last Modification: 08:00:37 on 08-30-2023.

apiVersion: apiextensions.crossplane.io/v1
kind: Composition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## WARNING: This file was autogenerated!
## Manual modifications will be overwritten
## unless ignore: true is set in generate.yaml!
## Last Modification: 11:59:26 on 04-25-2023.
## Last Modification: 08:00:37 on 08-30-2023.

apiVersion: apiextensions.crossplane.io/v1
kind: Composition
Expand Down
File renamed without changes.
File renamed without changes.
207 changes: 207 additions & 0 deletions package/Kafka-TopicCcl/composition-topicacl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
## WARNING: This file was autogenerated!
## Manual modifications will be overwritten
## unless ignore: true is set in generate.yaml!
## Last Modification: 07:52:43 on 08-30-2023.

apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
labels:
example.cloud/provider: sop
name: compositetopicacl.kafka.aws.example.cloud
spec:
compositeTypeRef:
apiVersion: kafka.aws.example.cloud/v1alpha1
kind: CompositeTopicAcl
patchSets:
- name: Common
patches:
- fromFieldPath: metadata.labels['crossplane.io/claim-name']
policy:
fromFieldPath: Optional
toFieldPath: metadata.labels['crossplane.io/claim-name']
type: FromCompositeFieldPath
- fromFieldPath: metadata.labels['crossplane.io/claim-namespace']
policy:
fromFieldPath: Optional
toFieldPath: metadata.labels['crossplane.io/claim-namespace']
type: FromCompositeFieldPath
- fromFieldPath: metadata.labels['crossplane.io/composite']
policy:
fromFieldPath: Optional
toFieldPath: metadata.labels['crossplane.io/composite']
type: FromCompositeFieldPath
- fromFieldPath: metadata.labels['external-name']
policy:
fromFieldPath: Optional
toFieldPath: metadata.labels['external-name']
type: FromCompositeFieldPath
- name: Parameters
patches:
- fromFieldPath: spec.deletionPolicy
policy:
fromFieldPath: Optional
toFieldPath: spec.deletionPolicy
type: FromCompositeFieldPath
- fromFieldPath: spec.forProvider.resourceHost
policy:
fromFieldPath: Optional
toFieldPath: spec.forProvider.resourceHost
type: FromCompositeFieldPath
- fromFieldPath: spec.forProvider.resourceName
policy:
fromFieldPath: Optional
toFieldPath: spec.forProvider.resourceName
type: FromCompositeFieldPath
- fromFieldPath: spec.forProvider.resourceOperation
policy:
fromFieldPath: Optional
toFieldPath: spec.forProvider.resourceOperation
type: FromCompositeFieldPath
- fromFieldPath: spec.forProvider.resourcePatternTypeFilter
policy:
fromFieldPath: Optional
toFieldPath: spec.forProvider.resourcePatternTypeFilter
type: FromCompositeFieldPath
- fromFieldPath: spec.forProvider.resourcePermissionType
policy:
fromFieldPath: Optional
toFieldPath: spec.forProvider.resourcePermissionType
type: FromCompositeFieldPath
- fromFieldPath: spec.forProvider.resourcePrincipal
policy:
fromFieldPath: Optional
toFieldPath: spec.forProvider.resourcePrincipal
type: FromCompositeFieldPath
- fromFieldPath: spec.forProvider.resourceType
policy:
fromFieldPath: Optional
toFieldPath: spec.forProvider.resourceType
type: FromCompositeFieldPath
- fromFieldPath: spec.providerConfigRef.name
policy:
fromFieldPath: Optional
toFieldPath: spec.providerConfigRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.providerConfigRef.policy.resolution
policy:
fromFieldPath: Optional
toFieldPath: spec.providerConfigRef.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.providerConfigRef.policy.resolve
policy:
fromFieldPath: Optional
toFieldPath: spec.providerConfigRef.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.publishConnectionDetailsTo.configRef.name
policy:
fromFieldPath: Optional
toFieldPath: spec.publishConnectionDetailsTo.configRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.publishConnectionDetailsTo.configRef.policy.resolution
policy:
fromFieldPath: Optional
toFieldPath: spec.publishConnectionDetailsTo.configRef.policy.resolution
type: FromCompositeFieldPath
- fromFieldPath: spec.publishConnectionDetailsTo.configRef.policy.resolve
policy:
fromFieldPath: Optional
toFieldPath: spec.publishConnectionDetailsTo.configRef.policy.resolve
type: FromCompositeFieldPath
- fromFieldPath: spec.publishConnectionDetailsTo.metadata.annotations
policy:
fromFieldPath: Optional
toFieldPath: spec.publishConnectionDetailsTo.metadata.annotations
type: FromCompositeFieldPath
- fromFieldPath: spec.publishConnectionDetailsTo.metadata.labels
policy:
fromFieldPath: Optional
toFieldPath: spec.publishConnectionDetailsTo.metadata.labels
type: FromCompositeFieldPath
- fromFieldPath: spec.publishConnectionDetailsTo.metadata.type
policy:
fromFieldPath: Optional
toFieldPath: spec.publishConnectionDetailsTo.metadata.type
type: FromCompositeFieldPath
- fromFieldPath: spec.publishConnectionDetailsTo.name
policy:
fromFieldPath: Optional
toFieldPath: spec.publishConnectionDetailsTo.name
type: FromCompositeFieldPath
- name: Labels
patches:
- fromFieldPath: metadata.labels['controlling.example.cloud/cost-reference']
policy:
fromFieldPath: Optional
toFieldPath: metadata.labels['controlling.example.cloud/cost-reference']
type: FromCompositeFieldPath
- fromFieldPath: metadata.labels['controlling.example.cloud/owner']
policy:
fromFieldPath: Optional
toFieldPath: metadata.labels['controlling.example.cloud/owner']
type: FromCompositeFieldPath
- fromFieldPath: metadata.labels['controlling.example.cloud/product']
policy:
fromFieldPath: Optional
toFieldPath: metadata.labels['controlling.example.cloud/product']
type: FromCompositeFieldPath
- fromFieldPath: metadata.labels['tags.example.cloud/account']
policy:
fromFieldPath: Optional
toFieldPath: metadata.labels['tags.example.cloud/account']
type: FromCompositeFieldPath
- fromFieldPath: metadata.labels['tags.example.cloud/environment']
policy:
fromFieldPath: Optional
toFieldPath: metadata.labels['tags.example.cloud/environment']
type: FromCompositeFieldPath
- fromFieldPath: metadata.labels['tags.example.cloud/protection-requirement']
policy:
fromFieldPath: Optional
toFieldPath: metadata.labels['tags.example.cloud/protection-requirement']
type: FromCompositeFieldPath
- fromFieldPath: metadata.labels['tags.example.cloud/repourl']
policy:
fromFieldPath: Optional
toFieldPath: metadata.labels['tags.example.cloud/repourl']
type: FromCompositeFieldPath
- fromFieldPath: metadata.labels['tags.example.cloud/zone']
policy:
fromFieldPath: Optional
toFieldPath: metadata.labels['tags.example.cloud/zone']
type: FromCompositeFieldPath
resources:
- base:
apiVersion: acl.kafka.crossplane.io/v1alpha1
kind: AccessControlList
metadata:
labels:
commonLabelA: commonLabelAValue
commonLabelB: commonLabelBValue
spec:
forProvider: {}
providerConfigRef:
name: default
name: AccessControlList
patches:
- patchSetName: Common
type: PatchSet
- patchSetName: Parameters
type: PatchSet
- patchSetName: Labels
type: PatchSet
- fromFieldPath: status.atProvider.id
policy:
fromFieldPath: Optional
toFieldPath: status.atProvider.id
type: ToCompositeFieldPath
- fromFieldPath: metadata.annotations["crossplane.io/external-name"]
policy:
fromFieldPath: Optional
toFieldPath: status.uid
type: ToCompositeFieldPath
- fromFieldPath: status.conditions
policy:
fromFieldPath: Optional
toFieldPath: status.observed.conditions
type: ToCompositeFieldPath
Loading

0 comments on commit d880e90

Please sign in to comment.