Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata annotations fields and label should be propagated from requirement to managed resource object #1654

Closed
kelvinwijaya opened this issue Jul 14, 2020 · 3 comments · Fixed by #1664
Assignees
Labels
enhancement New feature or request
Projects

Comments

@kelvinwijaya
Copy link

What problem are you facing?

From requirement object : MySQLInstanceRequirement, i would like to pass the metadata annotations and labels information to the managed resource object : MySQLInstance

So that when the composition object could extract the metadata annotations or labels (other than external-name) to be map in the specification of the DB Object, this is useful when the annotation information is required as a Tag informations of the DBInstance that is being provisioned


apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Composition
.
.
spec:
          forProvider:
            skipFinalSnapshotBeforeDeletion: true
            publiclyAccessible: false
            backupRetentionPeriod: 1
            copyTagsToSnapshot: true
            applyModificationsImmediately: true
            tags:
              - key: "Key0"
                value: ""
              - key: "Key1"
                value: ""
              - key: "Key2"
                value: ""
.
.
.
- fromFieldPath: "metadata.annotations.key0"
          toFieldPath: "spec.forProvider.tags[0].value"
        - fromFieldPath: "metadata.annotations.key1"
          toFieldPath: "spec.forProvider.tags[1].value"
        - fromFieldPath: "metadata.annotations.key2"
          toFieldPath: "spec.forProvider.tags[2].value"
.
.

How could Crossplane help solve your problem?

By allowing any metadata annotations and label objects to be mapped.

@kelvinwijaya kelvinwijaya added the enhancement New feature or request label Jul 14, 2020
@muvaf
Copy link
Member

muvaf commented Jul 14, 2020

The spec fields are propagated and I can see that automatic propagation of labels and annotations of *Requirement to composite would be in line with that behavior. @negz what are your thoughts?

@kelvinwijaya
Copy link
Author

HI @muvaf @negz , may I know if this changes will be part of the enhancement, reason behind this is because my organization is using tags on the created AWS resource to track bills and resource utilisation

@muvaf
Copy link
Member

muvaf commented Jul 29, 2020

I've opened #1664 for this feature since it's pretty easy to implement with existing mechanism. If @negz gives a thumbs-up, we can merge and include in the next release.

@muvaf muvaf self-assigned this Jul 29, 2020
@muvaf muvaf added this to To do - Proposed in v0.13 via automation Jul 29, 2020
@muvaf muvaf moved this from To do - Proposed to PR open in v0.13 Jul 29, 2020
@muvaf muvaf moved this from PR open to To do - Proposed in v0.13 Jul 29, 2020
v0.13 automation moved this from To do - Proposed to Done Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
v0.13
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants