-
Notifications
You must be signed in to change notification settings - Fork 107
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
validate_schema=false not working as expected #282
Comments
Have you tried with server apply?
…On Fri, 26 Jan 2024, 07:45 Alex Kuklin, ***@***.***> wrote:
While trying to wrap kafka operatior installation into terraform, I've got
CustomResourceDefinition.apiextensions.k8s.io "kafkaclusters.kafka.banzaicloud.io" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
tf code is
data "kubectl_path_documents" "crd" {
pattern = "./manifests/*.yaml"
}
resource "kubectl_manifest" "kafka-operator-crds" {
count = length(data.kubectl_path_documents.crd.documents)
yaml_body = element(data.kubectl_path_documents.crd.documents, count.index)
validate_schema = false
wait_for_rollout = true
}
kubectl gives same error if used without --validate=false. With
--validate=false it works fine.
—
Reply to this email directly, view it on GitHub
<#282>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACJ5V6TLBAUMS246XNFJUTYQNNINAVCNFSM6AAAAABCLXTNDOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEYDCNZUGEYDIMY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
It helped, thank you. Not very clear though. |
It's the same issue as with Prometheus. Basically, when you run a normal apply, it will try to construct the whole yaml document and add an annotation "last_applied_config" (or something similar). In case of CRD, it can be an issue because it will exceed the maximum length. If you are doing server side apply, it will only try to apply the fields within your yaml document ignoring everything else (and the diff will be calculated on the server side). Something along those lines. P.s. and just FIY since you have opened an issue on a pretty much dead project, once you switch to the kubernetes 1.27 and higher you are going to be hit with #270 I would strongly suggest to switch to my maintained fork ;) https://github.com/alekc/terraform-provider-kubectl/
|
Oops. |
While trying to wrap kafka operatior installation into terraform, I've got
tf code is
kubectl gives same error if used without
--validate=false
. With--validate=false
it works fine.The text was updated successfully, but these errors were encountered: