-
Notifications
You must be signed in to change notification settings - Fork 120
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 #785
Merged
ulucinar
merged 4 commits into
crossplane-contrib:main
from
lsviben:granular_management_policies
Jul 31, 2023
Merged
Support Granular management policies #785
ulucinar
merged 4 commits into
crossplane-contrib:main
from
lsviben:granular_management_policies
Jul 31, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lsviben
force-pushed
the
granular_management_policies
branch
from
July 14, 2023 12:48
089e2e4
to
86766a3
Compare
lsviben
force-pushed
the
granular_management_policies
branch
from
July 24, 2023 10:28
86766a3
to
fe906d6
Compare
3 tasks
lsviben
force-pushed
the
granular_management_policies
branch
from
July 28, 2023 12:31
7757374
to
43602a2
Compare
Signed-off-by: lsviben <sviben.lovro@gmail.com>
Signed-off-by: lsviben <sviben.lovro@gmail.com>
Signed-off-by: lsviben <sviben.lovro@gmail.com>
lsviben
force-pushed
the
granular_management_policies
branch
from
July 28, 2023 12:42
43602a2
to
29c8e9d
Compare
Signed-off-by: lsviben <sviben.lovro@gmail.com>
/test-examples="examples/ec2/vpc.yaml" |
1 similar comment
/test-examples="examples/ec2/vpc.yaml" |
ulucinar
force-pushed
the
granular_management_policies
branch
from
July 31, 2023 17:46
409ca4a
to
475ad97
Compare
ulucinar
approved these changes
Jul 31, 2023
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 #786
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