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

Do not add tags to spec when ObserveOnly #186

Merged
merged 1 commit into from
Apr 13, 2023
Merged

Do not add tags to spec when ObserveOnly #186

merged 1 commit into from
Apr 13, 2023

Conversation

turkenh
Copy link
Member

@turkenh turkenh commented Apr 13, 2023

Description of your changes

We should not add default tags to the spec of the managed resources when the management policy is set as ObserveOnly as we are only observing the resource in read-only mode.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Together with crossplane-contrib/provider-upjet-aws#672

Before this PR:

apiVersion: rds.aws.upbound.io/v1beta1
kind: Instance
metadata:
  ...
spec:
  deletionPolicy: Delete
  forProvider:
    region: us-west-1
    tags:
      crossplane-kind: instance.rds.aws.upbound.io
      crossplane-name: rds-observe-only
      crossplane-providerconfig: default
  managementPolicy: ObserveOnly
  providerConfigRef:
    name: default
  writeConnectionSecretToRef:
    name: example-dbinstance-out
    namespace: default
status:
  atProvider:
    ...

With this PR:

apiVersion: rds.aws.upbound.io/v1beta1
kind: Instance
metadata:
  ...
spec:
  deletionPolicy: Delete
  forProvider:
    region: us-west-1
  managementPolicy: ObserveOnly
  providerConfigRef:
    name: default
  writeConnectionSecretToRef:
    name: example-dbinstance-out
    namespace: default
status:
  atProvider:
    ...

Copy link
Contributor

@lsviben lsviben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @turkenh !

Copy link
Collaborator

@ulucinar ulucinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @turkenh, lgtm.

@turkenh turkenh merged commit 01e5c1f into crossplane:main Apr 13, 2023
@turkenh turkenh deleted the no-tags-in-spec branch April 13, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants