Skip to content
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

ProwJob CRD is too large #181

Closed
maboehm opened this issue Jun 3, 2024 · 5 comments · Fixed by #196
Closed

ProwJob CRD is too large #181

maboehm opened this issue Jun 3, 2024 · 5 comments · Fixed by #196

Comments

@maboehm
Copy link
Contributor

maboehm commented Jun 3, 2024

Hi,

the prowJob CR just recently crossed the threshold of being too large, for example running against a kind cluster:

$ kind create cluster
...
$ kubectl version
Client Version: v1.30.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.0

# this is the last commit this still works on
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/prow/e67659d368fd013492a9ce038d801ba8998b7d10/config/prow/cluster/prowjob-crd/prowjob_customresourcedefinition.yaml --server-side
customresourcedefinition.apiextensions.k8s.io/prowjobs.prow.k8s.io serverside-applied

# latest version fails
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/prow/main/config/prow/cluster/prowjob-crd/prowjob_customresourcedefinition.yaml --server-side
Error from server: etcdserver: request is too large

Am I doing something wrong when applying?

In terms of solving this issue, the main problem is that there is a lot of repetition, e.g. the taskPodTemplate appears several times. It would be possible to have some fields as e.g. apiextension.JSON or runtime.RawExtension and defer validation to a validatingwebhook. Which makes the output of e.g. kubectl explain less helpful.

@matthyx
Copy link
Contributor

matthyx commented Jun 3, 2024

Hi @maboehm does it work if you kubectl create -f ... instead?
I think the main difference is that apply also saves the last applied configuration in the annotations, which doubles the size required and can more easily trigger the etcd limit.

@matthyx
Copy link
Contributor

matthyx commented Jun 3, 2024

kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/prow/main/config/prow/cluster/prowjob-crd/prowjob_customresourcedefinition.yaml --server-side

(apparently it doesn't, sorry)

@maboehm
Copy link
Contributor Author

maboehm commented Jun 4, 2024

Either way, since tools like Helm or Flux use apply the size should work for that as well.

@lentzi90
Copy link

lentzi90 commented Jun 5, 2024

I have been using apply --server-side=true to avoid the annotation. It looks like the CRD itself is finally too large. With server side apply it worked up until e67659d (including). From 6405295 it is no longer possible to apply.

The only way to avoid this is to reduce the size of the CRD or configure etcd to allow a larger size. 🙁

@matthyx
Copy link
Contributor

matthyx commented Jun 5, 2024

ok well I think we have to shrink it... @maboehm wanna have a try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants