-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
pkg/k8s: fix all structural issues with CNP validation #10727
Conversation
5fa5616
to
8cae230
Compare
test-me-please |
Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{ | ||
"SecurityGroupsIds": { | ||
"securityGroupsIds": { |
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.
Is there any meaningful potential impact with the case change here or are they seen as the same thing when upgrading schemas?
8cae230
to
b37c2b7
Compare
test-me-please |
I've managed to add this suggestion without changing any code. Please check the documentation changes. |
As Cilium might require to update its CRD validation schema it is important for the users to make sure all policies installed in their cluster are valid in the point of view the new CRD validation schema before performing an upgrade. Avoiding doing this validation might cause Cilium from updating its NodeStatus in those invalid Network Policies as well as in the worst case scenario it might give a false sense of security to the user if a policy is badly formatted and Cilium is not inforcing that policy due a bad validation. Signed-off-by: André Martins <[email protected]>
Signed-off-by: André Martins <[email protected]>
Signed-off-by: André Martins <[email protected]>
025bd5b
to
6c1835f
Compare
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.
There was a typo in the docs:
diff --git b/Documentation/install/upgrade.rst a/Documentation/install/upgrade.rst
index fb35dabae..2d4d02bac 100644
--- b/Documentation/install/upgrade.rst
+++ a/Documentation/install/upgrade.rst
@@ -66,7 +66,7 @@ file.
--set config.enabled=false \\
--set operator.enabled=false \\
--set global.k8sServiceHost=API_SERVER_IP \\
- --set global.k8sServicePort=API_SERVER_PORT
+ --set global.k8sServicePort=API_SERVER_PORT \\
> cilium-preflight.yaml
kubectl create cilium-preflight.yaml
I've fix it. Will merge the PR once the GH check for docs have passed. All other tests have passed before this typo was fixed.
CNP schema validation was incorrectly formatted for some fields which
could cause badly formatted yaml files to be accepted by kube-apiserver
bypassing the schema validation. This would later cause Cilium to print
errors and potentially avoid it from starting, as the invalid CNPs would
prevent Cilium from fully synchronize with kube-apiserver an operation
that is essential when starting Cilium.
This commit fixes all violations presented by kubernetes for the CCNP
and CNP validation which would then deny bad CNPs and / or CCNPs from
being accepted by kube-apiserver.
Signed-off-by: André Martins [email protected]
Fixes: #10643