Open
Conversation
Update the CCNP/CNP CRD to add admision time validation preventing CCNP/CNP with neither `specs` nor `spec`. These resources could previously be created and would only lead agents to emit an `Invalid CiliumNetworkPolicy spec(s): empty policy` warning log on parse. Now the API server will reject the creation or update of such resources. This relies on [CRD Validation Rules](https://kubernetes.io/blog/2022/09/23/crd-validation-rules-beta/) which have been GA since kubernetes 1.29. Existing empty policies already present in the cluster are not affected, but any create or update that results in an empty policy will be rejected. Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
Member
Author
|
/test |
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.
Update the CCNP/CNP CRD to add admission time validation preventing CCNP/CNP with neither
specsnorspec. These resources could previously be created and would only lead agents to emit anInvalid CiliumNetworkPolicy spec(s): empty policywarning log on parse. Now the API server will reject the creation or update of such resources.This relies on CRD Validation Rules which have been GA since kubernetes 1.29.
Existing empty policies already present in the cluster are not affected, but any create or update that results in an empty policy will be rejected.