-
Notifications
You must be signed in to change notification settings - Fork 75
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
Support granular management policies #495
Conversation
For some reason the CI lint is failing in the
|
/test-examples="examples/azure/resourcegroup.yaml" |
Signed-off-by: lsviben <sviben.lovro@gmail.com>
Signed-off-by: lsviben <sviben.lovro@gmail.com>
Signed-off-by: lsviben <sviben.lovro@gmail.com>
Signed-off-by: lsviben <sviben.lovro@gmail.com>
Signed-off-by: lsviben <sviben.lovro@gmail.com>
Signed-off-by: lsviben <sviben.lovro@gmail.com>
Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
/test-examples="examples/azure/resourcegroup.yaml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lsviben, lgtm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @lsviben, LGTM.
Description of your changes
ManagementPolicy -> granular ManagementPolicies
Adds support for granular management policies described based on the design.
This is a breaking change for the management policies alpha feature. (ObserveOnly)
The old
is getting replaced by
After applying the updated provider, the
spec.managementPolicy
field will be removed automatically, and thespec.managementPolicies: ["*"]
will be defaulted. This is equivalent toFullControl
but for resources usingObserveOnly
andOrphanOnDelete
the it meanst that the behavior changes.Suggested migration if needed is to:
managementPolicy: x
)managementPolicy
)initProvider
The new upjet version introduces the
spec.initProvider
field, which can be used to set fields which can replacespec.forProvider
fields during resource creation.In practice, how it works is that
spec.initProvider
andspec.forProvider
are merged before writing themain.tf
file, plus based on fields inspec.initProvider
which are not inspec.forProvider
we calculate a list of fields which are added to the ignore_changes terraform hook, to avoid them being used in updates.Both new features are only active if the
managementPolicy
alplha feature flag is enabled.** NOTE: This PR uses an unmerged branch of upjet, should be merged after it **
Fixes #494
I have:
make reviewable test
to ensure this PR is ready for review.Running above crashes on my machine :(.
How has this code been tested
The granular policies were tested with crossplane-runtime gmp PR & crossplane/upjet#224. More details in the crossplane-runtime PR.
The initProvider was tested with initProvider upjet PR. More details there