Skip to content

Commit 4874b94

Browse files
ssanders1449Shlomo Sanderszachaller
authored
feat: Implement Issue argoproj#1779: add rollout.Spec.Strategy.Canary.MinPodsPerReplicaSet (argoproj#2448)
* add rollout.Spec.Strategy.Canary.MinPodsPerRS (for TrafficRoutedCanary only) Signed-off-by: Shlomo Sanders <[email protected]> * fix lint and test Signed-off-by: Shlomo Sanders <[email protected]> * fix codegen Signed-off-by: Shlomo Sanders <[email protected]> * rename MinPodsPerRS to MinPodsPerReplicaSet Signed-off-by: Shlomo Sanders <[email protected]> * fix lint and codegen Signed-off-by: Shlomo Sanders <[email protected]> * update specification.md Signed-off-by: Shlomo Sanders <[email protected]> * codegen Signed-off-by: zachaller <[email protected]> * codegen missed a file Signed-off-by: zachaller <[email protected]> Signed-off-by: Shlomo Sanders <[email protected]> Signed-off-by: zachaller <[email protected]> Co-authored-by: Shlomo Sanders <[email protected]> Co-authored-by: zachaller <[email protected]>
1 parent 91e491c commit 4874b94

File tree

13 files changed

+598
-488
lines changed

13 files changed

+598
-488
lines changed

docs/features/specification.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ spec:
212212
# traffic routing.
213213
scaleDownDelaySeconds: 30
214214

215+
# The minimum number of pods that will be requested for each ReplicaSet
216+
# when using traffic routed canary. This is to ensure high availability
217+
# of each ReplicaSet. Defaults to 1. +optional
218+
minPodsPerReplicaSet: 2
219+
215220
# Limits the number of old RS that can run at one time before getting
216221
# scaled down. Defaults to nil
217222
scaleDownDelayRevisionLimit: 2

manifests/crds/rollout-crd.yaml

100644100755
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ spec:
393393
- type: integer
394394
- type: string
395395
x-kubernetes-int-or-string: true
396+
minPodsPerReplicaSet:
397+
format: int32
398+
type: integer
396399
pingPong:
397400
properties:
398401
pingService:

manifests/install.yaml

100644100755
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11403,6 +11403,9 @@ spec:
1140311403
- type: integer
1140411404
- type: string
1140511405
x-kubernetes-int-or-string: true
11406+
minPodsPerReplicaSet:
11407+
format: int32
11408+
type: integer
1140611409
pingPong:
1140711410
properties:
1140811411
pingService:

manifests/namespace-install.yaml

100644100755
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11403,6 +11403,9 @@ spec:
1140311403
- type: integer
1140411404
- type: string
1140511405
x-kubernetes-int-or-string: true
11406+
minPodsPerReplicaSet:
11407+
format: int32
11408+
type: integer
1140611409
pingPong:
1140711410
properties:
1140811411
pingService:

pkg/apiclient/rollout/rollout.swagger.json

100644100755
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,11 @@
927927
"pingPong": {
928928
"$ref": "#/definitions/github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.PingPongSpec",
929929
"title": "PingPongSpec holds the ping and pong services"
930+
},
931+
"minPodsPerReplicaSet": {
932+
"type": "integer",
933+
"format": "int32",
934+
"title": "Assuming the desired number of pods in a stable or canary ReplicaSet is not zero, then make sure it is at least\nMinPodsPerReplicaSet for High Availability. Only applicable for TrafficRoutedCanary"
930935
}
931936
},
932937
"title": "CanaryStrategy defines parameters for a Replica Based Canary"

pkg/apis/rollouts/v1alpha1/generated.pb.go

Lines changed: 518 additions & 486 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/rollouts/v1alpha1/generated.proto

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/rollouts/v1alpha1/openapi_generated.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/rollouts/v1alpha1/types.go

100644100755
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ type CanaryStrategy struct {
310310
DynamicStableScale bool `json:"dynamicStableScale,omitempty" protobuf:"varint,14,opt,name=dynamicStableScale"`
311311
// PingPongSpec holds the ping and pong services
312312
PingPong *PingPongSpec `json:"pingPong,omitempty" protobuf:"varint,15,opt,name=pingPong"`
313+
// Assuming the desired number of pods in a stable or canary ReplicaSet is not zero, then make sure it is at least
314+
// MinPodsPerReplicaSet for High Availability. Only applicable for TrafficRoutedCanary
315+
MinPodsPerReplicaSet *int32 `json:"minPodsPerReplicaSet,omitempty" protobuf:"varint,16,opt,name=minPodsPerReplicaSet"`
313316
}
314317

315318
// PingPongSpec holds the ping and pong service name.

pkg/apis/rollouts/v1alpha1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)