Closed kaviankarimzadeh closed 2 hours ago
There are no sig labels on this issue. Please add an appropriate label by using one of the following commands:
/sig <group-name>
/wg <group-name>
/committee <group-name>
Please see the group list for a listing of the SIGs, working groups, and committees available.
This issue is currently awaiting triage.
If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
Wrong repo, just submitted same request in kubeadm repository.
What happened?
We have some args already added to our kube-system StaticPods like etcd, kube-apiserver that needs to be persist during upgrade. until now we were passing
--config
flag with a path to a file include ClusterConfiguration and all configs that must be persist. But some of these args likeencryption-provider-config
in apiserver orlisten-metrics-urls
in etcd gets removed when we run upgrade, so we need to manually add/update those values during upgrade process so the upgrade can continue. And also using--config
flags is not recommended for upgrade and soon it'll be deprecated.so we decided to use
--patches
flags, but it seems none of the patchStrategy (merge, strategic, json) are capable of adding args to the current args already exist in those StaticPods.here's an example with merge patchStrategy:
here's an example with json patchStrategy :
Upgrade command:
No args added to to the StaticPod yaml file.
What did you expect to happen?
We're expecting to add additional args to kube-system StaticPods during upgrade process while keeping what is already there in their specs. ( not overriding )
How can we reproduce it (as minimally and precisely as possible)?
here's an example with merge patchStrategy:
Anything else we need to know?
Here in this document an example provided to check available patchStrategy for PodSpec:
https://v1-29.docs.kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/#notes-on-the-strategic-merge-patch
But hew in OpemApi spec for args there's no patchStrategy provided: https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json
Kubernetes version
Current: 1.28.4 Upgrade to : 1.29.8
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
containerd://1.6.31
Related plugins (CNI, CSI, ...) and versions (if applicable)