From 4b1cc3b579843c6f76bd23f8633fe747053e4548 Mon Sep 17 00:00:00 2001 From: shubhajyoti-bagchi-groww <114666956+shubhajyoti-bagchi-groww@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:32:52 +0530 Subject: [PATCH 1/5] fix(controller): prevent negative vsvc weights on a replica scaledown following a canary abort for istio trafficrouting (#3467) * chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.36.1 to 1.36.3 (#3452) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch Bumps [github.com/aws/aws-sdk-go-v2/service/cloudwatch](https://github.com/aws/aws-sdk-go-v2) from 1.36.1 to 1.36.3. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ec2/v1.36.1...service/ssm/v1.36.3) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudwatch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: shubhajyoti-bagchi-groww * controller: Fixed negative canary weight bug for istio trafficrouting Signed-off-by: shubhajyoti-bagchi-groww * Added e2e test to validate the fix Signed-off-by: shubhajyoti-bagchi-groww * Removed local changes Signed-off-by: shubhajyoti-bagchi-groww * linted as per golangci-lint run Signed-off-by: shubhajyoti-bagchi-groww * docs: typo in BlueGreen (#3463) Signed-off-by: shubhajyoti-bagchi-groww * chore(deps): bump slsa-framework/slsa-github-generator from 1.9.1 to 1.10.0 (#3462) chore(deps): bump slsa-framework/slsa-github-generator Bumps [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) from 1.9.1 to 1.10.0. - [Release notes](https://github.com/slsa-framework/slsa-github-generator/releases) - [Changelog](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md) - [Commits](https://github.com/slsa-framework/slsa-github-generator/compare/v1.9.1...v1.10.0) --- updated-dependencies: - dependency-name: slsa-framework/slsa-github-generator dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: shubhajyoti-bagchi-groww * chore(deps): bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 from 1.30.3 to 1.30.4 (#3461) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 Bumps [github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2](https://github.com/aws/aws-sdk-go-v2) from 1.30.3 to 1.30.4. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.30.3...service/s3/v1.30.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: shubhajyoti-bagchi-groww * Removed sleep and waited for 1 replicas Signed-off-by: shubhajyoti-bagchi-groww * Moved up canary weight test to match PR title Signed-off-by: shubhajyoti-bagchi-groww --------- Signed-off-by: dependabot[bot] Signed-off-by: shubhajyoti-bagchi-groww Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thanapat Chotipun <66824385+PatrickChoDev@users.noreply.github.com> --- rollout/trafficrouting.go | 2 +- ...n-stable-downscale-after-canary-abort.yaml | 101 ++++++++++++++++++ test/e2e/istio_test.go | 26 +++++ 3 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 test/e2e/istio/istio-subset-split-in-stable-downscale-after-canary-abort.yaml diff --git a/rollout/trafficrouting.go b/rollout/trafficrouting.go index 55121ecc7f..f8b01951a4 100644 --- a/rollout/trafficrouting.go +++ b/rollout/trafficrouting.go @@ -305,7 +305,7 @@ func (c *rolloutContext) calculateDesiredWeightOnAbortOrStableRollback() int32 { } // When using dynamic stable scaling, we must dynamically decreasing the weight to the canary // according to the availability of the stable (whatever it can support). - desiredWeight := weightutil.MaxTrafficWeight(c.rollout) - ((weightutil.MaxTrafficWeight(c.rollout) * c.stableRS.Status.AvailableReplicas) / *c.rollout.Spec.Replicas) + desiredWeight := maxInt(0, weightutil.MaxTrafficWeight(c.rollout)-((weightutil.MaxTrafficWeight(c.rollout)*c.stableRS.Status.AvailableReplicas) / *c.rollout.Spec.Replicas)) if c.rollout.Status.Canary.Weights != nil { // This ensures that if we are already at a lower weight, then we will not // increase the weight because stable availability is flapping (e.g. pod restarts) diff --git a/test/e2e/istio/istio-subset-split-in-stable-downscale-after-canary-abort.yaml b/test/e2e/istio/istio-subset-split-in-stable-downscale-after-canary-abort.yaml new file mode 100644 index 0000000000..2a67c5b5a9 --- /dev/null +++ b/test/e2e/istio/istio-subset-split-in-stable-downscale-after-canary-abort.yaml @@ -0,0 +1,101 @@ +apiVersion: v1 +kind: Service +metadata: + name: istio-subset-split-in-stable-downscale-after-canary-abort +spec: + ports: + - port: 80 + targetPort: http + protocol: TCP + name: http + selector: + app: istio-subset-split-in-stable-downscale-after-canary-abort + +--- +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: istio-subset-split-in-stable-downscale-after-canary-abort-vsvc +spec: + hosts: + - istio-subset-split-in-stable-downscale-after-canary-abort + http: + - route: + - destination: + host: istio-subset-split-in-stable-downscale-after-canary-abort + subset: stable + weight: 100 + - destination: + host: istio-subset-split-in-stable-downscale-after-canary-abort + subset: canary + weight: 0 + +--- +apiVersion: networking.istio.io/v1alpha3 +kind: DestinationRule +metadata: + name: istio-subset-split-in-stable-downscale-after-canary-abort-destrule +spec: + host: istio-subset-split-in-stable-downscale-after-canary-abort + subsets: + - name: stable + labels: + app: istio-subset-split-in-stable-downscale-after-canary-abort + - name: canary + labels: + app: istio-subset-split-in-stable-downscale-after-canary-abort + +--- +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: istio-subset-split-in-stable-downscale-after-canary-abort +spec: + replicas: 4 + strategy: + canary: + dynamicStableScale: true + trafficRouting: + istio: + virtualService: + name: istio-subset-split-in-stable-downscale-after-canary-abort-vsvc + destinationRule: + name: istio-subset-split-in-stable-downscale-after-canary-abort-destrule + canarySubsetName: canary + stableSubsetName: stable + canaryMetadata: + labels: + role: canary + stableMetadata: + labels: + role: stable + maxSurge: "25%" + maxUnavailable: "20%" + steps: + - setWeight: 10 + - pause: {} + - setWeight: 20 + - pause: {} + - setWeight: 30 + - pause: {} + - setWeight: 50 + - pause: {} + selector: + matchLabels: + app: istio-subset-split-in-stable-downscale-after-canary-abort + template: + metadata: + labels: + app: istio-subset-split-in-stable-downscale-after-canary-abort + spec: + containers: + - name: istio-subset-split-in-stable-downscale-after-canary-abort + image: nginx:1.19-alpine + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: + requests: + memory: 16Mi + cpu: 5m diff --git a/test/e2e/istio_test.go b/test/e2e/istio_test.go index 7ecbd66fdf..610feab03f 100644 --- a/test/e2e/istio_test.go +++ b/test/e2e/istio_test.go @@ -492,3 +492,29 @@ func (s *IstioSuite) TestIstioSubsetSplitExperimentStep() { s.TearDownSuite() } + +func (s *IstioSuite) TestIstioSubsetSplitInStableDownscaleAfterCanaryAbort() { + s.Given(). + RolloutObjects("@istio/istio-subset-split-in-stable-downscale-after-canary-abort.yaml"). + When(). + ApplyManifests(). + WaitForRolloutStatus("Healthy"). + PromoteRolloutFull(). + UpdateSpec(). + WaitForRolloutStatus("Paused"). + AbortRollout(). + WaitForRolloutStatus("Degraded"). + ScaleRollout(1). + WaitForRolloutReplicas(1). + Then(). + Assert(func(t *fixtures.Then) { + vsvc := t.GetVirtualService() + stableWeight := vsvc.Spec.HTTP[0].Route[0].Weight + canaryWeight := vsvc.Spec.HTTP[0].Route[1].Weight + + assert.Equal(s.T(), int64(0), canaryWeight) + assert.Equal(s.T(), int64(100), stableWeight) + }) + + s.TearDownSuite() +} From b42741572b54cbb49f7aa98f3197a3086cc64e27 Mon Sep 17 00:00:00 2001 From: Liming Liu Date: Tue, 26 Mar 2024 23:38:41 +0800 Subject: [PATCH 2/5] fix: fix the issue that when max weight is 100000000, and the replicas> 20, the trafficWeightToReplicas will return negative value. (#3474) fix: when max weight is 100000000, the replicas can be negative. Signed-off-by: Liming Liu --- utils/replicaset/canary.go | 2 +- utils/replicaset/canary_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/replicaset/canary.go b/utils/replicaset/canary.go index 89ba648cf2..cf41e6baa5 100755 --- a/utils/replicaset/canary.go +++ b/utils/replicaset/canary.go @@ -383,7 +383,7 @@ func CalculateReplicaCountsForTrafficRoutedCanary(rollout *v1alpha1.Rollout, wei // trafficWeightToReplicas returns the appropriate replicas given the full spec.replicas and a weight // Rounds up if not evenly divisible. func trafficWeightToReplicas(replicas, weight, maxWeight int32) int32 { - return int32(math.Ceil(float64(weight*replicas) / float64(maxWeight))) + return int32(math.Ceil(float64(weight) * float64(replicas) / float64(maxWeight))) } func max(left, right int32) int32 { diff --git a/utils/replicaset/canary_test.go b/utils/replicaset/canary_test.go index d1d49072e8..dbe4ce5a03 100755 --- a/utils/replicaset/canary_test.go +++ b/utils/replicaset/canary_test.go @@ -960,6 +960,7 @@ func TestTrafficWeightToReplicas(t *testing.T) { assert.Equal(t, int32(4), trafficWeightToReplicas(10, 33, 100)) assert.Equal(t, int32(10), trafficWeightToReplicas(10, 99, 100)) assert.Equal(t, int32(10), trafficWeightToReplicas(10, 100, 100)) + assert.Equal(t, int32(23), trafficWeightToReplicas(23, 100000000, 100000000)) } func TestGetOtherRSs(t *testing.T) { From 2ff3c8ff8b826e7c7ccdadb9bc690d566725cd5f Mon Sep 17 00:00:00 2001 From: Chetan Banavikalmutt Date: Tue, 26 Mar 2024 21:34:57 +0530 Subject: [PATCH 3/5] feat: display init container images on the rollout dashboard (#3473) Signed-off-by: Chetan Banavikalmutt --- pkg/apiclient/rollout/rollout.pb.go | 353 ++++++++++++------ pkg/apiclient/rollout/rollout.proto | 3 + pkg/apiclient/rollout/rollout.swagger.json | 12 + .../info/replicaset_info.go | 5 + .../info/rollout_info.go | 7 + ui/src/app/components/rollout/containers.tsx | 5 +- ui/src/app/components/rollout/revision.tsx | 6 +- ui/src/app/components/rollout/rollout.tsx | 96 +++-- ui/src/models/rollout/generated/api.ts | 12 + 9 files changed, 352 insertions(+), 147 deletions(-) diff --git a/pkg/apiclient/rollout/rollout.pb.go b/pkg/apiclient/rollout/rollout.pb.go index 54e4c099a2..f25c43ced0 100644 --- a/pkg/apiclient/rollout/rollout.pb.go +++ b/pkg/apiclient/rollout/rollout.pb.go @@ -727,6 +727,7 @@ type RolloutInfo struct { AnalysisRuns []*AnalysisRunInfo `protobuf:"bytes,18,rep,name=analysisRuns,proto3" json:"analysisRuns,omitempty"` Containers []*ContainerInfo `protobuf:"bytes,19,rep,name=containers,proto3" json:"containers,omitempty"` Steps []*v1alpha1.CanaryStep `protobuf:"bytes,20,rep,name=steps,proto3" json:"steps,omitempty"` + InitContainers []*ContainerInfo `protobuf:"bytes,21,rep,name=initContainers,proto3" json:"initContainers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -905,6 +906,13 @@ func (m *RolloutInfo) GetSteps() []*v1alpha1.CanaryStep { return nil } +func (m *RolloutInfo) GetInitContainers() []*ContainerInfo { + if m != nil { + return m.InitContainers + } + return nil +} + type ExperimentInfo struct { ObjectMeta *v1.ObjectMeta `protobuf:"bytes,1,opt,name=objectMeta,proto3" json:"objectMeta,omitempty"` Icon string `protobuf:"bytes,2,opt,name=icon,proto3" json:"icon,omitempty"` @@ -1017,6 +1025,7 @@ type ReplicaSetInfo struct { Pods []*PodInfo `protobuf:"bytes,14,rep,name=pods,proto3" json:"pods,omitempty"` Ping bool `protobuf:"varint,15,opt,name=ping,proto3" json:"ping,omitempty"` Pong bool `protobuf:"varint,16,opt,name=pong,proto3" json:"pong,omitempty"` + InitContainerImages []string `protobuf:"bytes,17,rep,name=initContainerImages,proto3" json:"initContainerImages,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1167,6 +1176,13 @@ func (m *ReplicaSetInfo) GetPong() bool { return false } +func (m *ReplicaSetInfo) GetInitContainerImages() []string { + if m != nil { + return m.InitContainerImages + } + return nil +} + type PodInfo struct { ObjectMeta *v1.ObjectMeta `protobuf:"bytes,1,opt,name=objectMeta,proto3" json:"objectMeta,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` @@ -1753,121 +1769,123 @@ func init() { } var fileDescriptor_99101d942e8912a7 = []byte{ - // 1821 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4f, 0x6f, 0x1c, 0x49, - 0x15, 0x57, 0x7b, 0x3c, 0xf6, 0xf8, 0x8d, 0xff, 0x96, 0xb3, 0xd9, 0xde, 0xd9, 0x60, 0x79, 0x7b, - 0x91, 0x70, 0x0c, 0x74, 0x3b, 0xde, 0x28, 0xcb, 0xf2, 0xe7, 0x60, 0x12, 0xcb, 0x1b, 0x94, 0xec, - 0x86, 0x36, 0xb0, 0x02, 0x09, 0xa2, 0x72, 0x4f, 0x79, 0xdc, 0x49, 0x4f, 0x57, 0xd3, 0x55, 0x3d, - 0x61, 0x64, 0xcd, 0x01, 0xbe, 0x00, 0x07, 0xbe, 0x02, 0x12, 0xe2, 0x84, 0x90, 0xb8, 0x70, 0xe0, - 0x8a, 0x38, 0x22, 0xf1, 0x05, 0x50, 0x84, 0x90, 0x38, 0x70, 0xe0, 0xc2, 0x19, 0xd5, 0xeb, 0xea, - 0xea, 0x3f, 0x1e, 0x27, 0x8e, 0x6c, 0x36, 0x39, 0x4d, 0xbf, 0xf7, 0xea, 0xbd, 0x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0xac, 0xa4, 0x0a, 0x87, 0xc2, 0xfa, 0x08, 0xe6, 0x75, 0x9b, 0xec, 0xdc, - 0x8a, 0x54, 0x9e, 0x02, 0x95, 0xf6, 0x9b, 0xf3, 0x36, 0xba, 0x5b, 0x23, 0x2b, 0x85, 0xbb, 0x51, - 0x2e, 0xfc, 0xf6, 0xfe, 0x5f, 0x9e, 0x6f, 0x58, 0x7f, 0x7d, 0xbe, 0x61, 0xfd, 0xfd, 0xf9, 0x86, - 0xf5, 0xa3, 0x0f, 0x2f, 0xfc, 0x87, 0x40, 0xfd, 0xef, 0x87, 0xa3, 0x39, 0x44, 0xf1, 0xc1, 0xff, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x35, 0xff, 0xe4, 0x9e, 0x18, 0x00, 0x00, + // 1848 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x5f, 0x6f, 0x1c, 0x49, + 0x11, 0xd7, 0x78, 0xbd, 0xf6, 0xba, 0xd6, 0x7f, 0xdb, 0x49, 0x6e, 0x6e, 0x2f, 0x58, 0xbe, 0x39, + 0x24, 0x1c, 0x03, 0x33, 0x8e, 0x2f, 0xca, 0x71, 0xfc, 0x93, 0x8c, 0x63, 0xf9, 0x82, 0x92, 0xbb, + 0x30, 0x06, 0x4e, 0x20, 0x41, 0xd4, 0x9e, 0x6d, 0xaf, 0x27, 0x99, 0x9d, 0x1e, 0xa6, 0x7b, 0x36, + 0xac, 0x2c, 0x3f, 0xc0, 0x17, 0xe0, 0x81, 0xaf, 0xc0, 0x03, 0x3c, 0x21, 0x24, 0x5e, 0x78, 0xe0, + 0x15, 0xf1, 0x88, 0xc4, 0x17, 0x40, 0x11, 0x02, 0xf1, 0xc0, 0x03, 0xdf, 0x00, 0x75, 0x4d, 0x4f, + 0xcf, 0x1f, 0xaf, 0x1d, 0x47, 0x36, 0xe4, 0x9e, 0x76, 0xaa,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7, + 0x35, 0x8f, 0x1d, 0x9c, 0xc7, 0xd7, 0x7a, 0xf7, 0x2f, 0x39, 0x8f, 0x2c, 0xee, 0x73, 0xef, 0xa4, + 0xb8, 0x9e, 0x9c, 0x16, 0xb1, 0x52, 0xed, 0x35, 0x56, 0x62, 0x65, 0x42, 0x0b, 0xf2, 0x8d, 0xc4, + 0x4a, 0xaa, 0x70, 0x28, 0xac, 0x4f, 0x60, 0x56, 0x37, 0xe6, 0xce, 0xad, 0x48, 0xe5, 0x29, 0x50, + 0x69, 0xf8, 0x39, 0x6f, 0xa1, 0xbb, 0x15, 0xb2, 0x54, 0xb8, 0x1b, 0xe5, 0xc2, 0x6f, 0xed, 0xfd, + 0xf9, 0xe5, 0x9a, 0xf5, 0x97, 0x97, 0x6b, 0xd6, 0xdf, 0x5e, 0xae, 0x59, 0x3f, 0xfc, 0xe0, 0xd2, + 0x7f, 0x41, 0xd4, 0xff, 0xf0, 0x38, 0x9c, 0x41, 0x14, 0xef, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, + 0x6c, 0x69, 0x4c, 0x07, 0x10, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2946,6 +2964,22 @@ func (m *RolloutInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.InitContainers) > 0 { + for iNdEx := len(m.InitContainers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.InitContainers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRollout(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } + } if len(m.Steps) > 0 { for iNdEx := len(m.Steps) - 1; iNdEx >= 0; iNdEx-- { { @@ -3246,6 +3280,17 @@ func (m *ReplicaSetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.InitContainerImages) > 0 { + for iNdEx := len(m.InitContainerImages) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.InitContainerImages[iNdEx]) + copy(dAtA[i:], m.InitContainerImages[iNdEx]) + i = encodeVarintRollout(dAtA, i, uint64(len(m.InitContainerImages[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + } if m.Pong { i-- if m.Pong { @@ -4218,6 +4263,12 @@ func (m *RolloutInfo) Size() (n int) { n += 2 + l + sovRollout(uint64(l)) } } + if len(m.InitContainers) > 0 { + for _, e := range m.InitContainers { + l = e.Size() + n += 2 + l + sovRollout(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -4332,6 +4383,12 @@ func (m *ReplicaSetInfo) Size() (n int) { if m.Pong { n += 3 } + if len(m.InitContainerImages) > 0 { + for _, s := range m.InitContainerImages { + l = len(s) + n += 2 + l + sovRollout(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -6608,6 +6665,40 @@ func (m *RolloutInfo) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitContainers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRollout + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRollout + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRollout + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InitContainers = append(m.InitContainers, &ContainerInfo{}) + if err := m.InitContainers[len(m.InitContainers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRollout(dAtA[iNdEx:]) @@ -7336,6 +7427,38 @@ func (m *ReplicaSetInfo) Unmarshal(dAtA []byte) error { } } m.Pong = bool(v != 0) + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitContainerImages", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRollout + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRollout + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRollout + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InitContainerImages = append(m.InitContainerImages, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRollout(dAtA[iNdEx:]) diff --git a/pkg/apiclient/rollout/rollout.proto b/pkg/apiclient/rollout/rollout.proto index 7949baddd4..53cfbc8ab2 100644 --- a/pkg/apiclient/rollout/rollout.proto +++ b/pkg/apiclient/rollout/rollout.proto @@ -96,6 +96,8 @@ message RolloutInfo { repeated ContainerInfo containers = 19; repeated github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.CanaryStep steps = 20; + + repeated ContainerInfo initContainers = 21; } message ExperimentInfo { @@ -125,6 +127,7 @@ message ReplicaSetInfo { repeated PodInfo pods = 14; bool ping = 15; bool pong = 16; + repeated string initContainerImages = 17; } message PodInfo { diff --git a/pkg/apiclient/rollout/rollout.swagger.json b/pkg/apiclient/rollout/rollout.swagger.json index 014b6345b8..7279aea5e3 100755 --- a/pkg/apiclient/rollout/rollout.swagger.json +++ b/pkg/apiclient/rollout/rollout.swagger.json @@ -5990,6 +5990,12 @@ }, "pong": { "type": "boolean" + }, + "initContainerImages": { + "type": "array", + "items": { + "type": "string" + } } } }, @@ -6097,6 +6103,12 @@ "items": { "$ref": "#/definitions/github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.CanaryStep" } + }, + "initContainers": { + "type": "array", + "items": { + "$ref": "#/definitions/rollout.ContainerInfo" + } } } }, diff --git a/pkg/kubectl-argo-rollouts/info/replicaset_info.go b/pkg/kubectl-argo-rollouts/info/replicaset_info.go index 362261daef..4c1a3a1866 100644 --- a/pkg/kubectl-argo-rollouts/info/replicaset_info.go +++ b/pkg/kubectl-argo-rollouts/info/replicaset_info.go @@ -73,6 +73,11 @@ func GetReplicaSetInfo(ownerUID types.UID, ro *v1alpha1.Rollout, allReplicaSets for _, ctr := range rs.Spec.Template.Spec.Containers { rsInfo.Images = append(rsInfo.Images, ctr.Image) } + + for _, ctr := range rs.Spec.Template.Spec.InitContainers { + rsInfo.InitContainerImages = append(rsInfo.InitContainerImages, ctr.Image) + } + rsInfos = append(rsInfos, rsInfo) } sort.Slice(rsInfos[:], func(i, j int) bool { diff --git a/pkg/kubectl-argo-rollouts/info/rollout_info.go b/pkg/kubectl-argo-rollouts/info/rollout_info.go index 5732972852..37604aa03b 100644 --- a/pkg/kubectl-argo-rollouts/info/rollout_info.go +++ b/pkg/kubectl-argo-rollouts/info/rollout_info.go @@ -85,16 +85,23 @@ func NewRolloutInfo( roInfo.Containers = []*rollout.ContainerInfo{} var containerList []corev1.Container + var initContainerList []corev1.Container if workloadRef != nil { containerList = workloadRef.Spec.Template.Spec.Containers + initContainerList = workloadRef.Spec.Template.Spec.InitContainers } else { containerList = ro.Spec.Template.Spec.Containers + initContainerList = ro.Spec.Template.Spec.InitContainers } for _, c := range containerList { roInfo.Containers = append(roInfo.Containers, &rollout.ContainerInfo{Name: c.Name, Image: c.Image}) } + for _, c := range initContainerList { + roInfo.InitContainers = append(roInfo.InitContainers, &rollout.ContainerInfo{Name: c.Name, Image: c.Image}) + } + if ro.Status.RestartedAt != nil { roInfo.RestartedAt = ro.Status.RestartedAt.String() } else { diff --git a/ui/src/app/components/rollout/containers.tsx b/ui/src/app/components/rollout/containers.tsx index 552ac29a93..73eddc5139 100644 --- a/ui/src/app/components/rollout/containers.tsx +++ b/ui/src/app/components/rollout/containers.tsx @@ -9,6 +9,7 @@ import {faExclamationCircle, faPencilAlt, faSave, faTimes} from '@fortawesome/fr interface ContainersWidgetProps { containers: RolloutContainerInfo[]; images: ImageInfo[]; + name: string; interactive?: { editState: ReactStatePair; setImage: (container: string, image: string, tag: string) => void; @@ -16,7 +17,7 @@ interface ContainersWidgetProps { } export const ContainersWidget = (props: ContainersWidgetProps) => { - const {containers, images, interactive} = props; + const {containers, images, name, interactive} = props; const [editing, setEditing] = interactive?.editState || [null, null]; const inputMap: {[key: string]: string} = {}; for (const container of containers) { @@ -29,7 +30,7 @@ export const ContainersWidget = (props: ContainersWidgetProps) => {
- Containers + {name}
{interactive && diff --git a/ui/src/app/components/rollout/revision.tsx b/ui/src/app/components/rollout/revision.tsx index 394a3d09fe..62f31a0e76 100644 --- a/ui/src/app/components/rollout/revision.tsx +++ b/ui/src/app/components/rollout/revision.tsx @@ -3,7 +3,7 @@ import * as moment from 'moment'; import {RolloutAnalysisRunInfo, RolloutExperimentInfo, RolloutReplicaSetInfo} from '../../../models/rollout/generated'; import {IconForTag} from '../../shared/utils/utils'; import {ReplicaSets} from '../pods/pods'; -import {ImageInfo, parseImages} from './rollout'; +import {ImageInfo, parseImages, parseInitContainerImages} from './rollout'; import './rollout.scss'; import '../pods/pods.scss'; import {ConfirmButton} from '../confirm-button/confirm-button'; @@ -61,6 +61,8 @@ export const RevisionWidget = ({current, initCollapsed, revision, rollback}: Rev const [collapsed, setCollapsed] = React.useState(initCollapsed); const icon = collapsed ? faChevronCircleDown : faChevronCircleUp; const images = parseImages(revision.replicaSets ?? []); + const initContainerImages = parseInitContainerImages(revision.replicaSets ?? []); + const combinedImages = images.concat(initContainerImages); const hasPods = (revision.replicaSets || []).some((rs) => rs.pods?.length > 0); return ( @@ -81,7 +83,7 @@ export const RevisionWidget = ({current, initCollapsed, revision, rollback}: Rev
- +
{!collapsed && ( diff --git a/ui/src/app/components/rollout/rollout.tsx b/ui/src/app/components/rollout/rollout.tsx index f26b22a9a7..dfecde7e84 100644 --- a/ui/src/app/components/rollout/rollout.tsx +++ b/ui/src/app/components/rollout/rollout.tsx @@ -48,35 +48,23 @@ export const parseImages = (replicaSets: RolloutReplicaSetInfo[]): ImageInfo[] = const unknownImages: {[key: string]: boolean} = {}; (replicaSets || []).forEach((rs) => { (rs.images || []).forEach((img) => { - const tags: ImageTag[] = []; - - if (rs.canary) { - tags.push(ImageTag.Canary); - } - if (rs.stable) { - tags.push(ImageTag.Stable); - } - if (rs.active) { - tags.push(ImageTag.Active); - } - if (rs.preview) { - tags.push(ImageTag.Preview); - } + updateImageInfo(rs,img,images,unknownImages); + }); + }); - if (images[img]) { - images[img].tags = [...tags, ...images[img].tags]; - } else { - images[img] = { - image: img, - tags: tags, - }; - } + const imgArray = Object.values(images); + imgArray.sort((a, b) => { + return unknownImages[a.image] ? 1 : -1; + }); + return imgArray; +}; - if (images[img].tags.length === 0) { - unknownImages[img] = true; - } else { - unknownImages[img] = false; - } +export const parseInitContainerImages = (replicaSets: RolloutReplicaSetInfo[]): ImageInfo[] => { + const images: {[key: string]: ImageInfo} = {}; + const unknownImages: {[key: string]: boolean} = {}; + (replicaSets || []).forEach((rs) => { + (rs.initContainerImages || []).forEach((img) => { + updateImageInfo(rs,img,images,unknownImages); }); }); @@ -87,6 +75,38 @@ export const parseImages = (replicaSets: RolloutReplicaSetInfo[]): ImageInfo[] = return imgArray; }; +const updateImageInfo = (rs: RolloutReplicaSetInfo,img: string ,images: {[key: string]: ImageInfo},unknownImages:{[key: string]: boolean}) => { + const tags: ImageTag[] = []; + + if (rs.canary) { + tags.push(ImageTag.Canary); + } + if (rs.stable) { + tags.push(ImageTag.Stable); + } + if (rs.active) { + tags.push(ImageTag.Active); + } + if (rs.preview) { + tags.push(ImageTag.Preview); + } + + if (images[img]) { + images[img].tags = [...tags, ...images[img].tags]; + } else { + images[img] = { + image: img, + tags: tags, + }; + } + + if (images[img].tags.length === 0) { + unknownImages[img] = true; + } else { + unknownImages[img] = false; + } +}; + export type ReactStatePair = [boolean, React.Dispatch>]; export const RolloutWidget = (props: {rollout: RolloutRolloutInfo; interactive?: {editState: ReactStatePair; api: RolloutServiceApi; namespace: string}}) => { @@ -94,8 +114,10 @@ export const RolloutWidget = (props: {rollout: RolloutRolloutInfo; interactive?: const curStep = parseInt(rollout.step, 10) || (rollout.steps || []).length; const revisions = ProcessRevisions(rollout); - const images = parseImages(rollout?.replicaSets || []); + const initContainerEditState = React.useState(false); + const initContainerImages = parseInitContainerImages(rollout?.replicaSets || []); + const images = parseImages(rollout?.replicaSets || []); for (const img of images) { for (const container of rollout.containers || []) { if (img.image === container.image) { @@ -132,6 +154,7 @@ export const RolloutWidget = (props: {rollout: RolloutRolloutInfo; interactive?:
+ {rollout.initContainers &&
+ { + interactive.api.rolloutServiceSetRolloutImage({}, interactive.namespace, rollout.objectMeta?.name, container, image, tag); + }, + } + : null + } + /> +
}
diff --git a/ui/src/models/rollout/generated/api.ts b/ui/src/models/rollout/generated/api.ts index 2e657d455e..01e838622c 100755 --- a/ui/src/models/rollout/generated/api.ts +++ b/ui/src/models/rollout/generated/api.ts @@ -7361,6 +7361,12 @@ export interface RolloutReplicaSetInfo { * @memberof RolloutReplicaSetInfo */ pong?: boolean; + /** + * + * @type {Array} + * @memberof RolloutReplicaSetInfo + */ + initContainerImages?: Array; } /** * @@ -7526,6 +7532,12 @@ export interface RolloutRolloutInfo { * @memberof RolloutRolloutInfo */ steps?: Array; + /** + * + * @type {Array} + * @memberof RolloutRolloutInfo + */ + initContainers?: Array; } /** * From d108c59c215c97a50472570d666b1524db781ef1 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Tue, 26 Mar 2024 19:44:52 +0100 Subject: [PATCH 4/5] feat: ping pong support for istio (#3371) * feat: wip ping pong support for istio Signed-off-by: Zach Aller * feat: wip ping pong validation fixes Signed-off-by: Zach Aller * add istio ping pong e2e Signed-off-by: Zach Aller * add istio ping pong e2e Signed-off-by: Zach Aller * clean up comments Signed-off-by: Zach Aller * add ping pong and destRule both configred e2e test Signed-off-by: Zach Aller * cleanup not needed test Signed-off-by: Zach Aller * add docs Signed-off-by: Zach Aller * add new test instead of piggy backing of an old one Signed-off-by: Zach Aller * change test name Signed-off-by: Zach Aller --------- Signed-off-by: Zach Aller --- docs/features/traffic-management/istio.md | 12 ++ pkg/apis/rollouts/validation/validation.go | 10 +- .../rollouts/validation/validation_test.go | 17 +- rollout/trafficrouting/istio/istio.go | 18 +- rollout/trafficrouting/istio/istio_test.go | 176 +++++++++++++++++- .../e2e/istio/istio-host-split-ping-pong.yaml | 84 +++++++++ test/e2e/istio_test.go | 51 +++++ 7 files changed, 348 insertions(+), 20 deletions(-) create mode 100644 test/e2e/istio/istio-host-split-ping-pong.yaml diff --git a/docs/features/traffic-management/istio.md b/docs/features/traffic-management/istio.md index 415313841a..9d146d545c 100644 --- a/docs/features/traffic-management/istio.md +++ b/docs/features/traffic-management/istio.md @@ -473,6 +473,18 @@ help address this problem. The proposed solution is to introduce an annotation t indicates to Argo CD to respect and preserve the differences at a specified path, in order to allow other controllers (e.g. Argo Rollouts) controller manage them instead. +## Ping Pong + +!!! important + + Available since v1.7 + +Argo Rollouts also supports ping pong when using Istio this was added to support configuring both ALB and +Istio traffic routers at the same time. When using an ALB, ping-pong is generally a best practice especially with ALB readiness +gates enabled. However, when we change the service selectors when a rollout is aborted back to stable pod hash it causes a blip +of traffic outage because the ALB controller will set the pod readiness gates to false for a short while due to the label changes. +If we configure both ALB and Istio with ping-pong this selector change does not happen and hence we do not see any outages. + ## Alternatives Considered ### Rollout ownership over the Virtual Service diff --git a/pkg/apis/rollouts/validation/validation.go b/pkg/apis/rollouts/validation/validation.go index 76ab8d6c66..9bb3f24af6 100644 --- a/pkg/apis/rollouts/validation/validation.go +++ b/pkg/apis/rollouts/validation/validation.go @@ -81,8 +81,8 @@ const ( DuplicatedPingPongServicesMessage = "This rollout uses the same service for the ping and pong services, but two different services are required." // MissedAlbRootServiceMessage indicates that the rollout with ALB TrafficRouting and ping pong feature enabled must have root service provided MissedAlbRootServiceMessage = "Root service field is required for the configuration with ALB and ping-pong feature enabled" - // PingPongWithAlbOnlyMessage At this moment ping-pong feature works with the ALB traffic routing only - PingPongWithAlbOnlyMessage = "Ping-pong feature works with the ALB traffic routing only" + // PingPongWithRouterOnlyMessage At this moment ping-pong feature works with the ALB traffic routing only + PingPongWithRouterOnlyMessage = "Ping-pong feature works with the ALB and Istio traffic routers only" // InvalideStepRouteNameNotFoundInManagedRoutes A step has been configured that requires managedRoutes and the route name // is missing from managedRoutes InvalideStepRouteNameNotFoundInManagedRoutes = "Steps define a route that does not exist in spec.strategy.canary.trafficRouting.managedRoutes" @@ -241,7 +241,7 @@ func requireCanaryStableServices(rollout *v1alpha1.Rollout) bool { switch { case canary.TrafficRouting.ALB != nil && canary.PingPong == nil, - canary.TrafficRouting.Istio != nil && canary.TrafficRouting.Istio.DestinationRule == nil, + canary.TrafficRouting.Istio != nil && canary.TrafficRouting.Istio.DestinationRule == nil && canary.PingPong == nil, canary.TrafficRouting.SMI != nil, canary.TrafficRouting.Apisix != nil, canary.TrafficRouting.Ambassador != nil, @@ -262,8 +262,8 @@ func ValidateRolloutStrategyCanary(rollout *v1alpha1.Rollout, fldPath *field.Pat allErrs = append(allErrs, field.Invalid(fldPath.Child("stableService"), canary.StableService, DuplicatedServicesCanaryMessage)) } if canary.PingPong != nil { - if canary.TrafficRouting != nil && canary.TrafficRouting.ALB == nil { - allErrs = append(allErrs, field.Invalid(fldPath.Child("trafficRouting").Child("alb"), canary.TrafficRouting.ALB, PingPongWithAlbOnlyMessage)) + if canary.TrafficRouting != nil && canary.TrafficRouting.ALB == nil && canary.TrafficRouting.Istio == nil { + allErrs = append(allErrs, field.Invalid(fldPath.Child("trafficRouting").Child("alb"), canary.TrafficRouting.ALB, PingPongWithRouterOnlyMessage)) } if canary.PingPong.PingService == "" { allErrs = append(allErrs, field.Invalid(fldPath.Child("pingPong").Child("pingService"), canary.PingPong.PingService, InvalidPingPongProvidedMessage)) diff --git a/pkg/apis/rollouts/validation/validation_test.go b/pkg/apis/rollouts/validation/validation_test.go index 5d5c19be5e..c9fc9ad923 100644 --- a/pkg/apis/rollouts/validation/validation_test.go +++ b/pkg/apis/rollouts/validation/validation_test.go @@ -290,6 +290,21 @@ func TestValidateRolloutStrategyCanary(t *testing.T) { assert.Empty(t, allErrs) }) + t.Run("valid Istio with ping pong", func(t *testing.T) { + validRo := ro.DeepCopy() + validRo.Spec.Strategy.Canary.Steps[0].SetWeight = pointer.Int32(10) + validRo.Spec.Strategy.Canary.CanaryService = "" + validRo.Spec.Strategy.Canary.StableService = "" + validRo.Spec.Strategy.Canary.PingPong = &v1alpha1.PingPongSpec{ + PingService: "ping", + PongService: "pong", + } + validRo.Spec.Strategy.Canary.TrafficRouting.Istio = &v1alpha1.IstioTrafficRouting{DestinationRule: &v1alpha1.IstioDestinationRule{Name: "destination-rule"}} + validRo.Spec.Strategy.Canary.TrafficRouting.ALB = nil + allErrs := ValidateRolloutStrategyCanary(validRo, field.NewPath("")) + assert.Empty(t, allErrs) + }) + t.Run("valid PingPong missing canary and stable service", func(t *testing.T) { validRo := ro.DeepCopy() validRo.Spec.Strategy.Canary.Steps[0].SetWeight = pointer.Int32(10) @@ -368,7 +383,7 @@ func TestValidateRolloutStrategyCanary(t *testing.T) { Nginx: &v1alpha1.NginxTrafficRouting{StableIngress: "stable-ingress"}, } allErrs := ValidateRolloutStrategyCanary(invalidRo, field.NewPath("")) - assert.Equal(t, PingPongWithAlbOnlyMessage, allErrs[0].Detail) + assert.Equal(t, PingPongWithRouterOnlyMessage, allErrs[0].Detail) }) t.Run("invalid traffic routing", func(t *testing.T) { diff --git a/rollout/trafficrouting/istio/istio.go b/rollout/trafficrouting/istio/istio.go index dd44da7b25..5308d59a42 100644 --- a/rollout/trafficrouting/istio/istio.go +++ b/rollout/trafficrouting/istio/istio.go @@ -6,6 +6,8 @@ import ( "fmt" "strings" + "github.com/argoproj/argo-rollouts/rollout/trafficrouting" + jsonpatch "github.com/evanphx/json-patch/v5" "github.com/mitchellh/mapstructure" log "github.com/sirupsen/logrus" @@ -123,8 +125,7 @@ func (patches virtualServicePatches) patchVirtualService(httpRoutes []any, tlsRo } func (r *Reconciler) generateVirtualServicePatches(rolloutVsvcRouteNames []string, httpRoutes []VirtualServiceHTTPRoute, rolloutVsvcTLSRoutes []v1alpha1.TLSRoute, tlsRoutes []VirtualServiceTLSRoute, rolloutVsvcTCPRoutes []v1alpha1.TCPRoute, tcpRoutes []VirtualServiceTCPRoute, desiredWeight int64, additionalDestinations ...v1alpha1.WeightDestination) virtualServicePatches { - canarySvc := r.rollout.Spec.Strategy.Canary.CanaryService - stableSvc := r.rollout.Spec.Strategy.Canary.StableService + stableSvc, canarySvc := trafficrouting.GetStableAndCanaryServices(r.rollout) canarySubset := "" stableSubset := "" if r.rollout.Spec.Strategy.Canary.TrafficRouting.Istio.DestinationRule != nil { @@ -717,7 +718,7 @@ func (r *Reconciler) reconcileVirtualServiceHeaderRoutes(virtualService v1alpha1 return err } - canarySvc := r.rollout.Spec.Strategy.Canary.CanaryService + _, canarySvc := trafficrouting.GetStableAndCanaryServices(r.rollout) if destRuleHost != "" { canarySvc = destRuleHost } @@ -1022,8 +1023,7 @@ func searchTcpRoute(tcpRoute v1alpha1.TCPRoute, istioTcpRoutes []VirtualServiceT // ValidateHTTPRoutes ensures that all the routes in the rollout exist func ValidateHTTPRoutes(r *v1alpha1.Rollout, routeNames []string, httpRoutes []VirtualServiceHTTPRoute) error { - stableSvc := r.Spec.Strategy.Canary.StableService - canarySvc := r.Spec.Strategy.Canary.CanaryService + stableSvc, canarySvc := trafficrouting.GetStableAndCanaryServices(r) routeIndexesToPatch, err := getHttpRouteIndexesToPatch(routeNames, httpRoutes) if err != nil { @@ -1060,8 +1060,7 @@ func ValidateHTTPRoutes(r *v1alpha1.Rollout, routeNames []string, httpRoutes []V // ValidateTlsRoutes ensures that all the routes in the rollout exist and they only have two destinations func ValidateTlsRoutes(r *v1alpha1.Rollout, vsvcTLSRoutes []v1alpha1.TLSRoute, tlsRoutes []VirtualServiceTLSRoute) error { - stableSvc := r.Spec.Strategy.Canary.StableService - canarySvc := r.Spec.Strategy.Canary.CanaryService + stableSvc, canarySvc := trafficrouting.GetStableAndCanaryServices(r) routeIndexesToPatch, err := getTlsRouteIndexesToPatch(vsvcTLSRoutes, tlsRoutes) if err != nil { @@ -1082,8 +1081,7 @@ func ValidateTlsRoutes(r *v1alpha1.Rollout, vsvcTLSRoutes []v1alpha1.TLSRoute, t // ValidateTcpRoutes ensures that all the routes in the rollout exist and they only have two destinations func ValidateTcpRoutes(r *v1alpha1.Rollout, vsvcTCPRoutes []v1alpha1.TCPRoute, tcpRoutes []VirtualServiceTCPRoute) error { - stableSvc := r.Spec.Strategy.Canary.StableService - canarySvc := r.Spec.Strategy.Canary.CanaryService + stableSvc, canarySvc := trafficrouting.GetStableAndCanaryServices(r) routeIndexesToPatch, err := getTcpRouteIndexesToPatch(vsvcTCPRoutes, tcpRoutes) if err != nil { @@ -1191,7 +1189,7 @@ func (r *Reconciler) reconcileVirtualServiceMirrorRoutes(virtualService v1alpha1 if err != nil { return fmt.Errorf("[reconcileVirtualServiceMirrorRoutes] failed to get destination rule host: %w", err) } - canarySvc := r.rollout.Spec.Strategy.Canary.CanaryService + _, canarySvc := trafficrouting.GetStableAndCanaryServices(r.rollout) if destRuleHost != "" { canarySvc = destRuleHost } diff --git a/rollout/trafficrouting/istio/istio_test.go b/rollout/trafficrouting/istio/istio_test.go index c18cdedae5..c6c0f8d9a1 100644 --- a/rollout/trafficrouting/istio/istio_test.go +++ b/rollout/trafficrouting/istio/istio_test.go @@ -64,6 +64,31 @@ func rollout(stableSvc, canarySvc string, istioVirtualService *v1alpha1.IstioVir } } +func rolloutPingPong(istioVirtualService *v1alpha1.IstioVirtualService) *v1alpha1.Rollout { + return &v1alpha1.Rollout{ + ObjectMeta: metav1.ObjectMeta{ + Name: "rollout", + Namespace: "default", + }, + Spec: v1alpha1.RolloutSpec{ + Strategy: v1alpha1.RolloutStrategy{ + Canary: &v1alpha1.CanaryStrategy{ + PingPong: &v1alpha1.PingPongSpec{ + PingService: "ping", + PongService: "pong", + }, + TrafficRouting: &v1alpha1.RolloutTrafficRouting{ + Istio: &v1alpha1.IstioTrafficRouting{ + VirtualService: istioVirtualService, + }, + }, + }, + }, + }, + Status: v1alpha1.RolloutStatus{Canary: v1alpha1.CanaryStatus{StablePingPong: "ping"}}, + } +} + func rolloutWithHttpRoutes(stableSvc, canarySvc, vsvc string, httpRoutes []string) *v1alpha1.Rollout { istioVirtualService := &v1alpha1.IstioVirtualService{ Name: vsvc, @@ -98,6 +123,16 @@ func rolloutWithHttpAndTlsAndTcpRoutes(stableSvc, canarySvc, vsvc string, httpRo return rollout(stableSvc, canarySvc, istioVirtualService) } +func rolloutWithHttpAndTlsAndTcpRoutesPingPong(vsvc string, httpRoutes []string, tlsRoutes []v1alpha1.TLSRoute, tcpRoutes []v1alpha1.TCPRoute) *v1alpha1.Rollout { + istioVirtualService := &v1alpha1.IstioVirtualService{ + Name: vsvc, + Routes: httpRoutes, + TLSRoutes: tlsRoutes, + TCPRoutes: tcpRoutes, + } + return rolloutPingPong(istioVirtualService) +} + func checkDestination(t *testing.T, destinations []VirtualServiceRouteDestination, svc string, expectWeight int) { for _, destination := range destinations { if destination.Destination.Host == svc { @@ -263,6 +298,72 @@ spec: host: canary weight: 0` +const regularMixedVsvcPingPong = `apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: vsvc + namespace: default +spec: + gateways: + - istio-rollout-gateway + hosts: + - istio-rollout.dev.argoproj.io + http: + - name: primary + route: + - destination: + host: 'ping' + weight: 100 + - destination: + host: pong + weight: 0 + - name: secondary + route: + - destination: + host: 'ping' + weight: 100 + - destination: + host: pong + weight: 0 + tls: + - match: + - port: 3000 + route: + - destination: + host: 'ping' + weight: 100 + - destination: + host: pong + weight: 0 + - match: + - port: 3001 + route: + - destination: + host: 'ping' + weight: 100 + - destination: + host: pong + weight: 0 + tcp: + - match: + - port: 3000 + route: + - destination: + host: 'ping' + weight: 100 + - destination: + host: pong + weight: 0 + - match: + - port: 3001 + route: + - destination: + host: 'ping' + weight: 100 + - destination: + host: pong + weight: 0` + const regularMixedVsvcTwoHttpRoutes = `apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: @@ -597,6 +698,14 @@ func extractTcpRoutes(t *testing.T, modifiedObj *unstructured.Unstructured) []Vi } func assertTcpRouteWeightChanges(t *testing.T, tcpRoute VirtualServiceTCPRoute, portNum, canaryWeight, stableWeight int) { + assertTcpRouteWeightChangesBase(t, tcpRoute, portNum, canaryWeight, stableWeight, "stable", "canary") +} + +func assertTcpRouteWeightChangesPingPong(t *testing.T, tcpRoute VirtualServiceTCPRoute, portNum, canaryWeight, stableWeight int) { + assertTcpRouteWeightChangesBase(t, tcpRoute, portNum, canaryWeight, stableWeight, "ping", "pong") +} + +func assertTcpRouteWeightChangesBase(t *testing.T, tcpRoute VirtualServiceTCPRoute, portNum, canaryWeight, stableWeight int, stableSvc, canarySvc string) { portsMap := make(map[int64]bool) for _, routeMatch := range tcpRoute.Match { if routeMatch.Port != 0 { @@ -610,8 +719,8 @@ func assertTcpRouteWeightChanges(t *testing.T, tcpRoute VirtualServiceTCPRoute, if portNum != 0 { assert.Equal(t, portNum, port) } - checkDestination(t, tcpRoute.Route, "stable", stableWeight) - checkDestination(t, tcpRoute.Route, "canary", canaryWeight) + checkDestination(t, tcpRoute.Route, stableSvc, stableWeight) + checkDestination(t, tcpRoute.Route, canarySvc, canaryWeight) } func extractHttpRoutes(t *testing.T, modifiedObj *unstructured.Unstructured) []VirtualServiceHTTPRoute { @@ -643,6 +752,14 @@ func extractTlsRoutes(t *testing.T, modifiedObj *unstructured.Unstructured) []Vi } func assertTlsRouteWeightChanges(t *testing.T, tlsRoute VirtualServiceTLSRoute, snis []string, portNum, canaryWeight, stableWeight int) { + assertTlsRouteWeightChangesBase(t, tlsRoute, snis, portNum, canaryWeight, stableWeight, "stable", "canary") +} + +func assertTlsRouteWeightChangesPingPong(t *testing.T, tlsRoute VirtualServiceTLSRoute, snis []string, portNum, canaryWeight, stableWeight int) { + assertTlsRouteWeightChangesBase(t, tlsRoute, snis, portNum, canaryWeight, stableWeight, "ping", "pong") +} + +func assertTlsRouteWeightChangesBase(t *testing.T, tlsRoute VirtualServiceTLSRoute, snis []string, portNum, canaryWeight, stableWeight int, stableSvc, canarySvc string) { portsMap := make(map[int64]bool) sniHostsMap := make(map[string]bool) for _, routeMatch := range tlsRoute.Match { @@ -667,8 +784,8 @@ func assertTlsRouteWeightChanges(t *testing.T, tlsRoute VirtualServiceTLSRoute, if len(snis) != 0 { assert.Equal(t, evalUtils.Equal(snis, sniHosts), true) } - checkDestination(t, tlsRoute.Route, "stable", stableWeight) - checkDestination(t, tlsRoute.Route, "canary", canaryWeight) + checkDestination(t, tlsRoute.Route, stableSvc, stableWeight) + checkDestination(t, tlsRoute.Route, canarySvc, canaryWeight) } func TestHttpReconcileWeightsBaseCase(t *testing.T) { @@ -1104,6 +1221,57 @@ func TestReconcileWeightsBaseCase(t *testing.T) { assertTcpRouteWeightChanges(t, tcpRoutes[1], 3001, 0, 100) } +func TestReconcileWeightsPingPongBaseCase(t *testing.T) { + r := &Reconciler{ + rollout: rolloutWithHttpAndTlsAndTcpRoutesPingPong("vsvc", []string{"primary"}, + []v1alpha1.TLSRoute{ + { + Port: 3000, + }, + }, + []v1alpha1.TCPRoute{ + { + Port: 3000, + }, + }, + ), + } + obj := unstructuredutil.StrToUnstructuredUnsafe(regularMixedVsvcPingPong) + vsvcRoutes := r.rollout.Spec.Strategy.Canary.TrafficRouting.Istio.VirtualService.Routes + vsvcTLSRoutes := r.rollout.Spec.Strategy.Canary.TrafficRouting.Istio.VirtualService.TLSRoutes + vsvcTCPRoutes := r.rollout.Spec.Strategy.Canary.TrafficRouting.Istio.VirtualService.TCPRoutes + modifiedObj, _, err := r.reconcileVirtualService(obj, vsvcRoutes, vsvcTLSRoutes, vsvcTCPRoutes, 20) + assert.Nil(t, err) + assert.NotNil(t, modifiedObj) + + // HTTP Routes + httpRoutes := extractHttpRoutes(t, modifiedObj) + + // Assertions + assert.Equal(t, httpRoutes[0].Name, "primary") + checkDestination(t, httpRoutes[0].Route, "ping", 80) + checkDestination(t, httpRoutes[0].Route, "pong", 20) + + //assertHttpRouteWeightChanges(t, httpRoutes[1], "secondary", 0, 100) + assert.Equal(t, httpRoutes[1].Name, "secondary") + checkDestination(t, httpRoutes[1].Route, "ping", 100) + checkDestination(t, httpRoutes[1].Route, "pong", 0) + + // TLS Routes + tlsRoutes := extractTlsRoutes(t, modifiedObj) + // + // Assestions + assertTlsRouteWeightChangesPingPong(t, tlsRoutes[0], nil, 3000, 20, 80) + assertTlsRouteWeightChangesPingPong(t, tlsRoutes[1], nil, 3001, 0, 100) + // + // TCP Routes + tcpRoutes := extractTcpRoutes(t, modifiedObj) + + // Assestions + assertTcpRouteWeightChangesPingPong(t, tcpRoutes[0], 3000, 20, 80) + assertTcpRouteWeightChangesPingPong(t, tcpRoutes[1], 3001, 0, 100) +} + func TestReconcileUpdateVirtualService(t *testing.T) { ro := rolloutWithHttpRoutes("stable", "canary", "vsvc", []string{"primary"}) AssertReconcileUpdateVirtualService(t, regularVsvc, ro) diff --git a/test/e2e/istio/istio-host-split-ping-pong.yaml b/test/e2e/istio/istio-host-split-ping-pong.yaml new file mode 100644 index 0000000000..b9eb38ad37 --- /dev/null +++ b/test/e2e/istio/istio-host-split-ping-pong.yaml @@ -0,0 +1,84 @@ +apiVersion: v1 +kind: Service +metadata: + name: pong +spec: + ports: + - port: 80 + targetPort: http + protocol: TCP + name: http + selector: + app: istio-host-split + +--- +apiVersion: v1 +kind: Service +metadata: + name: ping +spec: + ports: + - port: 80 + targetPort: http + protocol: TCP + name: http + selector: + app: istio-host-split + +--- +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: istio-host-split-vsvc +spec: + hosts: + - istio-host-split + http: + - name: primary + route: + - destination: + host: ping + weight: 100 + - destination: + host: pong + weight: 0 + +--- +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: istio-host-split +spec: + strategy: + canary: + pingPong: + pingService: ping + pongService: pong + trafficRouting: + istio: + virtualService: + name: istio-host-split-vsvc + routes: + - primary + steps: + - setWeight: 25 + - pause: { duration: 5s } + selector: + matchLabels: + app: istio-host-split + template: + metadata: + labels: + app: istio-host-split + spec: + containers: + - name: istio-host-split + image: nginx:1.19-alpine + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: + requests: + memory: 16Mi + cpu: 5m diff --git a/test/e2e/istio_test.go b/test/e2e/istio_test.go index 610feab03f..9797b3e503 100644 --- a/test/e2e/istio_test.go +++ b/test/e2e/istio_test.go @@ -493,6 +493,57 @@ func (s *IstioSuite) TestIstioSubsetSplitExperimentStep() { s.TearDownSuite() } +func (s *IstioSuite) TestIstioPingPongUpdate() { + s.Given(). + RolloutObjects("@istio/istio-host-split-ping-pong.yaml"). + When().ApplyManifests().WaitForRolloutStatus("Healthy"). + Then(). + //Assert(assertWeights(s, "ping-service", "pong-service", 100, 0)). + Assert(func(t *fixtures.Then) { + vsvc := t.GetVirtualService() + assert.Equal(s.T(), int64(100), vsvc.Spec.HTTP[0].Route[0].Weight) + assert.Equal(s.T(), int64(0), vsvc.Spec.HTTP[0].Route[1].Weight) + }). + // Update 1. Test the weight switch from ping => pong + When().UpdateSpec(). + WaitForRolloutCanaryStepIndex(1).Sleep(1 * time.Second).Then(). + //Assert(assertWeights(s, "ping-service", "pong-service", 75, 25)). + Assert(func(t *fixtures.Then) { + vsvc := t.GetVirtualService() + assert.Equal(s.T(), int64(75), vsvc.Spec.HTTP[0].Route[0].Weight) + assert.Equal(s.T(), int64(25), vsvc.Spec.HTTP[0].Route[1].Weight) + }). + When().PromoteRollout(). + WaitForRolloutStatus("Healthy"). + Sleep(1 * time.Second). + Then(). + //Assert(assertWeights(s, "ping-service", "pong-service", 0, 100)). + Assert(func(t *fixtures.Then) { + vsvc := t.GetVirtualService() + assert.Equal(s.T(), int64(0), vsvc.Spec.HTTP[0].Route[0].Weight) + assert.Equal(s.T(), int64(100), vsvc.Spec.HTTP[0].Route[1].Weight) + }). + // Update 2. Test the weight switch from pong => ping + When().UpdateSpec(). + WaitForRolloutCanaryStepIndex(1).Sleep(1 * time.Second).Then(). + //Assert(assertWeights(s, "ping-service", "pong-service", 25, 75)). + Assert(func(t *fixtures.Then) { + vsvc := t.GetVirtualService() + assert.Equal(s.T(), int64(25), vsvc.Spec.HTTP[0].Route[0].Weight) + assert.Equal(s.T(), int64(75), vsvc.Spec.HTTP[0].Route[1].Weight) + }). + When().PromoteRollout(). + WaitForRolloutStatus("Healthy"). + Sleep(1 * time.Second). + Then(). + //Assert(assertWeights(s, "ping-service", "pong-service", 100, 0)) + Assert(func(t *fixtures.Then) { + vsvc := t.GetVirtualService() + assert.Equal(s.T(), int64(100), vsvc.Spec.HTTP[0].Route[0].Weight) + assert.Equal(s.T(), int64(0), vsvc.Spec.HTTP[0].Route[1].Weight) + }) +} + func (s *IstioSuite) TestIstioSubsetSplitInStableDownscaleAfterCanaryAbort() { s.Given(). RolloutObjects("@istio/istio-subset-split-in-stable-downscale-after-canary-abort.yaml"). From 633819b8330cdd5f90d008562a4231f04cf0e05e Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov <19779+xnox@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:39:04 +0000 Subject: [PATCH 5/5] chore: set webpack hashFunction to modern sha256, remove legacy-provider. Fixes #2609 (#3475) Reference from https://stackoverflow.com/a/74999688 Fixes https://github.com/argoproj/argo-rollouts/issues/2609 Signed-off-by: Dimitri John Ledkov --- ui/package.json | 4 ++-- ui/src/app/webpack.common.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/package.json b/ui/package.json index 69eb7872cd..0a631d3773 100644 --- a/ui/package.json +++ b/ui/package.json @@ -26,8 +26,8 @@ "web-vitals": "^1.0.1" }, "scripts": { - "start": "NODE_OPTIONS=--openssl-legacy-provider webpack serve --config ./src/app/webpack.dev.js", - "build": "rm -rf dist && NODE_OPTIONS=--openssl-legacy-provider webpack --config ./src/app/webpack.prod.js", + "start": "webpack serve --config ./src/app/webpack.dev.js", + "build": "rm -rf dist && webpack --config ./src/app/webpack.prod.js", "test": "jest", "eject": "react-scripts eject", "protogen": "../hack/swagger-codegen.sh generate -i ../pkg/apiclient/rollout/rollout.swagger.json -l typescript-fetch -o src/models/rollout/generated" diff --git a/ui/src/app/webpack.common.js b/ui/src/app/webpack.common.js index 194af2c9b3..72d6d908ad 100644 --- a/ui/src/app/webpack.common.js +++ b/ui/src/app/webpack.common.js @@ -1,5 +1,9 @@ 'use strict;'; +const crypto = require("crypto"); +const crypto_orig_createHash = crypto.createHash; +crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm); + const CopyWebpackPlugin = require('copy-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');