Commit fd3b5bea authored by ymqytw's avatar ymqytw

add retainKeys in patchStrategy

parent a64eeb47
...@@ -2489,8 +2489,8 @@ type PodSpec struct { ...@@ -2489,8 +2489,8 @@ type PodSpec struct {
// More info: https://kubernetes.io/docs/concepts/storage/volumes // More info: https://kubernetes.io/docs/concepts/storage/volumes
// +optional // +optional
// +patchMergeKey=name // +patchMergeKey=name
// +patchStrategy=merge // +patchStrategy=merge,retainKeys
Volumes []Volume `json:"volumes,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"` Volumes []Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"`
// List of initialization containers belonging to the pod. // List of initialization containers belonging to the pod.
// Init containers are executed in order prior to containers being started. If any // Init containers are executed in order prior to containers being started. If any
// init container fails, the pod is considered to have failed and is handled according // init container fails, the pod is considered to have failed and is handled according
......
...@@ -193,7 +193,8 @@ type DeploymentSpec struct { ...@@ -193,7 +193,8 @@ type DeploymentSpec struct {
// The deployment strategy to use to replace existing pods with new ones. // The deployment strategy to use to replace existing pods with new ones.
// +optional // +optional
Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"` // +patchStrategy=retainKeys
Strategy DeploymentStrategy `json:"strategy,omitempty" patchStrategy:"retainKeys" protobuf:"bytes,4,opt,name=strategy"`
// Minimum number of seconds for which a newly created pod should be ready // Minimum number of seconds for which a newly created pod should be ready
// without any of its container crashing, for it to be considered available. // without any of its container crashing, for it to be considered available.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment