fix(gateway-api): honor server_side_apply when installing Gateway API CRDs - #13448
fix(gateway-api): honor server_side_apply when installing Gateway API CRDs#13448mehrdadbn9 wants to merge 1 commit into
Conversation
… CRDs The Gateway API install task used the kube module, which always runs client-side kubectl apply. Users who enable server_side_apply expect server-side apply, but this task ignored the setting. Repeated client-side applies grow the last-applied-configuration annotation on the httproutes CRD past the 262144-byte etcd limit and the install fails with 'metadata.annotations: Too long'. Switch the task to kubectl apply --server-side=<var> (default false, matching repo convention in kubernetes-apps/utils/vars/main.yml), add retries, and detect changed state from kubectl output. Relates to issue 13086. Signed-off-by: Mehrdad Biukian Naeini <mehrdadbiukian@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mehrdadbn9 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @mehrdadbn9. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
What type of PR is this?
/kind bug
What this PR does / why we need it
The Gateway API CRD install task used the
kubemodule, which always runs client-sidekubectl apply. Theserver_side_applyvariable (repo convention inroles/kubernetes-apps/utils/vars/main.yml) is ignored by this task.When the Gateway API CRDs are re-applied across playbook runs (channel upgrades, re-runs), client-side apply keeps growing the
last-applied-configurationannotation on thehttproutes.gateway.networking.k8s.ioCRD. Once it passes the 262144-byte etcd annotation limit, apply fails:This leaves the cluster without HTTPRoute support, as reported.
This task now runs
kubectl apply --server-side={{ server_side_apply | default(false) | lower }}, honors the existing repo variable, adds retries, and derives changed state from kubectl output (configured/created/serverside-applied).Which issue(s) this PR fixes
Relates to #13086 (CRD annotation growth failure mode; full repro details in the issue).
Special notes for your reviewer
false, so existing behavior is unchanged for users who never set the variable; users who setserver_side_apply: truenow get SSA here like everywhere else.--force-conflicts: SSA on CRDs from a single controller should not conflict; can add if reviewers prefer.kubemodule usages elsewhere (metallb, cluster_roles, nvidia) have the same latent pattern but smaller/no CRD YAMLs; left untouched to keep this PR minimal.Does this PR introduce a user-facing change?