[FLINK-XXXX] [helm] Add ValidatingAdmissionPolicy to protect FlinkBlueGreenDeployment child resources#17
Draft
james-kan-shopify wants to merge 1 commit intomainfrom
Draft
Conversation
ab1beb5 to
1c252ce
Compare
This file contains hidden or 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
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.
What is the purpose of the change
This pull request adds a Kubernetes native
ValidatingAdmissionPolicyto protect childFlinkDeploymentresources managed byFlinkBlueGreenDeploymentfrom direct modifications. When enabled, users won't be able to modify theFlinkDeploymentspec directly, only by modifying theFlinkBlueGreenDeploymentspec can the changes be applied, in which the operator handles all updates to child deployments. This prevents accidental or unauthorized changes that could disrupt blue/green transitions.Brief change log
ValidatingAdmissionPolicyandValidatingAdmissionPolicyBindingHelm template intemplates/policies/bluegreen_admission_policy.yamlblueGreenAdmissionPolicyconfiguration section tovalues.yaml(disabled by default)docs/content/docs/operations/helm.mdincluding Helm values table entriestests/policies/bluegreen_admission_policy_test.yamlVerifying this change
This change added tests and can be verified as follows:
blueGreenAdmissionPolicy.create=falsefailurePolicyandvalidationActionsare appliedflinkdeploymentshelm templateand confirming the CEL expression correctly allows only the operator's service account to update FlinkDeployments owned by FlinkBlueGreenDeploymentDoes this pull request potentially affect one of the following parts:
CustomResourceDescriptors: noDocumentation