qa/tasks/kubeadm: set up tigera resources via kubectl create#47854
qa/tasks/kubeadm: set up tigera resources via kubectl create#47854
Conversation
Fixes: https://tracker.ceph.com/issues/57268 The tigera operator for the calico CNI has some pretty large resource definitions. The length of the definitions can cause the "client side apply", the default mode for `kubectl apply ....`, to fail due to the length of the needed annotation that would result: ``` 2022-08-22T20:24:55.636 INFO:teuthology.orchestra.run.smithi087.stdout:clusterrolebinding.rbac.authorization.k8s.io/tigera-operator created 2022-08-22T20:24:55.670 INFO:teuthology.orchestra.run.smithi087.stdout:deployment.apps/tigera-operator created 2022-08-22T20:24:55.671 INFO:teuthology.orchestra.run.smithi087.stderr:The CustomResourceDefinition "installations.operator.tigera.io" is invalid: metadata.annotations: Too long: must have at most 262144 bytes 2022-08-22T20:24:55.674 DEBUG:teuthology.orchestra.run:got remote process result: 1 ``` There are two simple options for avoiding this error. One is to use `kubectl create`. The create command will not make this lengthy annotation. It will fail if any of the resources already exist. The other option is to use server-side apply, via the `kubectl apply --server-side ...` command. It is new in k8s 1.18. It will not create the annotation either. The block of code setting up the CNI already uses `kubectl create` to create the custom resources that configure the tigera operator. Therefore it should be safe to assume the block of code in question doesn't need to be idempotent and we can also use `kubectl create` elsewhere in the same block. Signed-off-by: John Mulligan <jmulligan@redhat.com>
|
jenkins test make check |
|
Do you think this would this also fix https://tracker.ceph.com/issues/57269? @phlogistonjohn |
|
jenkins test api |
|
https://pulpito.ceph.com/adking-2022-08-30_17:06:47-orch:cephadm-wip-adk-testing-2022-08-29-1644-distro-default-smithi/ Failures tracked by:
the only one that is new and surprising on this run were the iscsi test failures (https://tracker.ceph.com/issues/57371). As a result, I'm not going to merge any PRs in this run that seem related to iscsi. Other PRs I think will still be okay to merge though. |
none of that is really relevant to this specific PR. Scheduled a run with some rook jobs using calico using the same build that includes this PR https://pulpito.ceph.com/adking-2022-09-01_17:38:25-orch:rook-wip-adk-testing-2022-08-29-1644-distro-default-smithi/ |
|
@phlogistonjohn the tests seem to just be failing on the kubectl create rather than the apply BUT the error doesn't reference tigera. Do you think this is just another issue that was masked by the one being addressed in this PR? If so, we could still merge this and a new tracker could be opened for the new issue. |
|
there's another tracker for the rook podsecuritypolicy issue. https://tracker.ceph.com/issues/57311 |
Fixes: https://tracker.ceph.com/issues/57268
The tigera operator for the calico CNI has some pretty large resource
definitions. The length of the definitions can cause the "client side
apply", the default mode for
kubectl apply ...., to fail due to thelength of the needed annotation that would result:
There are two simple options for avoiding this error. One is to use
kubectl create. The create command will not make this lengthyannotation. It will fail if any of the resources already exist. The
other option is to use server-side apply, via the
kubectl apply --server-side ...command. It is new in k8s 1.18. It will not createthe annotation either.
The block of code setting up the CNI already uses
kubectl createtocreate the custom resources that configure the tigera operator.
Therefore it should be safe to assume the block of code in question
doesn't need to be idempotent and we can also use
kubectl createelsewhere in the same block.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows