From 5bcf340a23be8691877ba2d522bac7c4e63e9e84 Mon Sep 17 00:00:00 2001 From: Taehong Kim Date: Tue, 8 Oct 2024 00:42:38 +0900 Subject: [PATCH 01/36] docs: Update specification document (#3877) doc: Update specification document about setCanaryScale Signed-off-by: kth496 --- docs/features/specification.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/features/specification.md b/docs/features/specification.md index 6ec9c65dd8..ebe8f4ac69 100644 --- a/docs/features/specification.md +++ b/docs/features/specification.md @@ -285,7 +285,8 @@ spec: - setCanaryScale: replicas: 3 - # set canary scale to a percentage of spec.replicas without changing traffic weight + # set canary scale to spec.Replica * (setweight / maxTrafficWeight) without changing traffic weight + # if maxTrafficWeight unspecified, it defaults to 100 # (supported only with trafficRouting) - setCanaryScale: weight: 25 From 50300e5525848e09c68d7e89c02cdc8fa022b414 Mon Sep 17 00:00:00 2001 From: Mate Gogiberidze <101423812+mategogiberidze@users.noreply.github.com> Date: Mon, 7 Oct 2024 19:42:55 +0400 Subject: [PATCH 02/36] docs: add TBC Bank to USERS.md (#3871) * docs: add TBC Bank to USERS.md Signed-off-by: Mate Gogiberidze * docs: reordered alpabethical Signed-off-by: Mate Gogiberidze --------- Signed-off-by: Mate Gogiberidze --- USERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/USERS.md b/USERS.md index aa6c4d5eb8..c6878dc90b 100644 --- a/USERS.md +++ b/USERS.md @@ -48,6 +48,7 @@ Organizations below are **officially** using Argo Rollouts. Please send a PR wit 1. [Skillz](https://www.skillz.com) 1. [Spotify](https://www.spotify.com/) 1. [Synamedia](https://www.synamedia.com) +1. [TBC Bank](https://tbcbank.ge/) 2. [Trustly](https://www.trustly.com/) 1. [Tuhu](https://www.tuhu.cn/) 1. [Twilio SendGrid](https://sendgrid.com) From e9dad9981079b2919464eab8517ed6f191878c80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 12:58:06 -0500 Subject: [PATCH 03/36] chore(deps): bump sigstore/cosign-installer from 3.6.0 to 3.7.0 (#3875) Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.6.0 to 3.7.0. - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](https://github.com/sigstore/cosign-installer/compare/4959ce089c160fddf62f7b42464195ba1a56d382...dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da) --- updated-dependencies: - dependency-name: sigstore/cosign-installer 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> --- .github/workflows/image-reuse.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index 5cf6809e61..e11f92306c 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -74,7 +74,7 @@ jobs: go-version: ${{ inputs.go-version }} - name: Install cosign - uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0 + uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0 with: cosign-release: 'v2.2.0' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4f7c5c9dea..8872b5470f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -168,7 +168,7 @@ jobs: go-version: ${{ env.GOLANG_VERSION }} - name: Install cosign - uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0 + uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0 with: cosign-release: 'v2.2.0' From d49b3fa1669f9996b7688d53feeec11c2770ff36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 12:58:23 -0500 Subject: [PATCH 04/36] chore(deps): bump github.com/newrelic/newrelic-client-go/v2 from 2.45.0 to 2.48.2 (#3874) chore(deps): bump github.com/newrelic/newrelic-client-go/v2 Bumps [github.com/newrelic/newrelic-client-go/v2](https://github.com/newrelic/newrelic-client-go) from 2.45.0 to 2.48.2. - [Release notes](https://github.com/newrelic/newrelic-client-go/releases) - [Changelog](https://github.com/newrelic/newrelic-client-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/newrelic/newrelic-client-go/compare/v2.45.0...v2.48.2) --- updated-dependencies: - dependency-name: github.com/newrelic/newrelic-client-go/v2 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> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ffdc6c870e..38ae8ea4f5 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 github.com/mitchellh/mapstructure v1.5.0 - github.com/newrelic/newrelic-client-go/v2 v2.45.0 + github.com/newrelic/newrelic-client-go/v2 v2.48.2 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.18.0 github.com/prometheus/client_model v0.6.1 diff --git a/go.sum b/go.sum index 6a6bd12f11..cf03833091 100644 --- a/go.sum +++ b/go.sum @@ -556,8 +556,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/newrelic/newrelic-client-go/v2 v2.45.0 h1:3zaJqE4V2n07b8Fx3byV+WeJSdeTeR4sW6yVSXrrNN4= -github.com/newrelic/newrelic-client-go/v2 v2.45.0/go.mod h1:pDFY24/6iIMEbPIdowTRrRn9YYwkXc3j+B+XpTb4oF4= +github.com/newrelic/newrelic-client-go/v2 v2.48.2 h1:Pd8/ADdidF/dISMCy9B2UHvcD11lnj4Use6j++OOEf4= +github.com/newrelic/newrelic-client-go/v2 v2.48.2/go.mod h1:pDFY24/6iIMEbPIdowTRrRn9YYwkXc3j+B+XpTb4oF4= github.com/nlopes/slack v0.5.0/go.mod h1:jVI4BBK3lSktibKahxBF74txcK2vyvkza1z/+rRnVAM= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= From 4afdb85224f6db05cfe033247cbec145bd777fc3 Mon Sep 17 00:00:00 2001 From: Ashu <11219262+ashutosh16@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:32:09 -0700 Subject: [PATCH 05/36] fix(dashboard): analysis modal crashed when value not valid (#3881) * handle the parse issue Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> * handle the parse error Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> * handle the parse error Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> * handle the parse error Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> --------- Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> --- .../analysis-modal/transforms.test.ts | 72 +++++++++++++++++-- .../components/analysis-modal/transforms.ts | 27 ++++--- ui/src/app/components/pods/pods.tsx | 3 + 3 files changed, 87 insertions(+), 15 deletions(-) diff --git a/ui/src/app/components/analysis-modal/transforms.test.ts b/ui/src/app/components/analysis-modal/transforms.test.ts index 5c2c2a667e..60f7b37a7e 100644 --- a/ui/src/app/components/analysis-modal/transforms.test.ts +++ b/ui/src/app/components/analysis-modal/transforms.test.ts @@ -5,6 +5,7 @@ import { GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1CloudWatchMetric, GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1MetricProvider, GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1MetricResult, + GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1Measurement, } from '../../../models/rollout/generated'; import { analysisEndTime, @@ -25,6 +26,7 @@ import { metricSubstatus, printableCloudWatchQuery, printableDatadogQuery, + transformMeasurements, } from './transforms'; import {AnalysisStatus, FunctionalStatus} from './types'; @@ -376,12 +378,12 @@ describe('analysis modal transforms', () => { }); test('interpolateQuery() for prometheus query and args', () => { expect(interpolateQuery(MOCK_QUERY_PROMETHEUS, MOCK_ARGS_PROMETHEUS)).toBe( - 'sum(irate(istio_requests_total{reporter="source",destination_service=~"istio-host-split-canary",response_code!~"5.*"}[5m])) / sum(irate(istio_requests_total{reporter="source",destination_service=~"istio-host-split-canary"}[5m]))' + 'sum(irate(istio_requests_total{reporter="source",destination_service=~"istio-host-split-canary",response_code!~"5.*"}[5m])) / sum(irate(istio_requests_total{reporter="source",destination_service=~"istio-host-split-canary"}[5m]))', ); }); test('interpolateQuery() for newrelic query and args', () => { expect(interpolateQuery(MOCK_QUERY_NEWRELIC, MOCK_ARGS_NEWRELIC)).toBe( - "FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode != 500) as successRate where appName = 'myApp'" + "FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode != 500) as successRate where appName = 'myApp'", ); }); test('interpolateQuery() for simple datadog query and args', () => { @@ -389,22 +391,22 @@ describe('analysis modal transforms', () => { }); test('interpolateQuery() for wavefront query and args', () => { expect(interpolateQuery(MOCK_QUERY_WAVEFRONT, MOCK_ARGS_WAVEFRONT)).toBe( - 'sum(rate(5m, ts("istio.requestcount.count", response_code!=500 and destination_service="istio-host-split-canary"))) / sum(rate(5m, ts("istio.requestcount.count", reporter=client and destination_service="istio-host-split-canary")))' + 'sum(rate(5m, ts("istio.requestcount.count", response_code!=500 and destination_service="istio-host-split-canary"))) / sum(rate(5m, ts("istio.requestcount.count", reporter=client and destination_service="istio-host-split-canary")))', ); }); test('interpolateQuery() for graphite query and args', () => { expect(interpolateQuery(MOCK_QUERY_GRAPHITE, MOCK_ARGS_GRAPHITE)).toBe( - "target=summarize(asPercent(sumSeries(stats.timers.httpServerRequests.app.istio-host-split-canary.exception.*.method.*.outcome.{CLIENT_ERROR,INFORMATIONAL,REDIRECTION,SUCCESS}.status.*.uri.*.count), sumSeries(stats.timers.httpServerRequests.app.istio-host-split-canary.exception.*.method.*.outcome.*.status.*.uri.*.count)),'5min','avg')" + "target=summarize(asPercent(sumSeries(stats.timers.httpServerRequests.app.istio-host-split-canary.exception.*.method.*.outcome.{CLIENT_ERROR,INFORMATIONAL,REDIRECTION,SUCCESS}.status.*.uri.*.count), sumSeries(stats.timers.httpServerRequests.app.istio-host-split-canary.exception.*.method.*.outcome.*.status.*.uri.*.count)),'5min','avg')", ); }); test('interpolateQuery() for influxdb query and args', () => { expect(interpolateQuery(MOCK_QUERY_INFLUXDB, MOCK_ARGS_INFLUXDB)).toBe( - 'from(bucket: "app_istio") range(start: -15m) filter(fn: (r) => r["destination_workload"] == "myApp")|> filter(fn: (r) => r["_measurement"] == "istio:istio_requests_errors_percentage:rate1m:5xx")' + 'from(bucket: "app_istio") range(start: -15m) filter(fn: (r) => r["destination_workload"] == "myApp")|> filter(fn: (r) => r["_measurement"] == "istio:istio_requests_errors_percentage:rate1m:5xx")', ); }); test('interpolateQuery() for skywalking query and args', () => { expect(interpolateQuery(MOCK_QUERY_SKYWALKING, MOCK_ARGS_SKYWALKING)).toBe( - 'query queryData($duration: Duration!) { service_apdex: readMetricsValues(condition: { name: "service_apdex", entity: { scope: Service, serviceName: "istio-host-split-canary", normal: true } }, duration: $duration) { label values { values { value } } } }' + 'query queryData($duration: Duration!) { service_apdex: readMetricsValues(condition: { name: "service_apdex", entity: { scope: Service, serviceName: "istio-host-split-canary", normal: true } }, duration: $duration) { label values { values { value } } } }', ); }); @@ -545,4 +547,62 @@ describe('analysis modal transforms', () => { tableValue: {latency: null, cpuUsage: null}, }); }); + const MOCK_MEASUREMENTS: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1Measurement[] = [{value: '[5]'}, {value: '[10]'}, {value: '[15]'}]; + const MOCK_MEASUREMENTS_WITH_NAN: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1Measurement[] = [{value: '[NaN]'}, {value: '[10]'}, {value: '[15]'}]; + const MOCK_MEASUREMENTS_WITH_STRING: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1Measurement[] = [{value: 'NaN'}, {value: '10'}, {value: '15'}]; + + it('transforms measurements correctly with valid numbers', () => { + expect(transformMeasurements(['0'], MOCK_MEASUREMENTS)).toEqual({ + chartable: true, + min: 0, + max: null, + measurements: [ + {value: '[5]', chartValue: {'0': 5}, tableValue: {'0': 5}}, + {value: '[10]', chartValue: {'0': 10}, tableValue: {'0': 10}}, + {value: '[15]', chartValue: {'0': 15}, tableValue: {'0': 15}}, + ], + }); + }); + it('transforms measurements correctly with NaN numbers in list', () => { + expect(transformMeasurements(['0'], MOCK_MEASUREMENTS_WITH_NAN)).toEqual({ + chartable: true, + min: 0, + max: null, + measurements: [ + {value: '[NaN]', chartValue: null, tableValue: null}, + {value: '[10]', chartValue: {'0': 10}, tableValue: {'0': 10}}, + {value: '[15]', chartValue: {'0': 15}, tableValue: {'0': 15}}, + ], + }); + }); + it('returns default values when measurements are undefined', () => { + expect(transformMeasurements(['0'])).toEqual({ + chartable: false, + min: 0, + max: null, + measurements: [], + }); + }); + + it('returns default values when measurements are empty', () => { + expect(transformMeasurements(['0'], [])).toEqual({ + chartable: false, + min: 0, + max: null, + measurements: [], + }); + }); + + it('handles measurements with string values', () => { + expect(transformMeasurements(['0'], MOCK_MEASUREMENTS_WITH_STRING)).toEqual({ + chartable: true, + min: 0, + max: 15, + measurements: [ + {value: 'NaN', chartValue: null, tableValue: null}, + {value: '10', chartValue: 10, tableValue: 10}, + {value: '15', chartValue: 15, tableValue: 15}, + ], + }); + }); }); diff --git a/ui/src/app/components/analysis-modal/transforms.ts b/ui/src/app/components/analysis-modal/transforms.ts index 6d869328ae..63459e4e5c 100644 --- a/ui/src/app/components/analysis-modal/transforms.ts +++ b/ui/src/app/components/analysis-modal/transforms.ts @@ -1,5 +1,4 @@ // eslint-disable-file @typescript-eslint/ban-ts-comment -import JSON5 from 'json5' import * as moment from 'moment'; import { @@ -132,7 +131,7 @@ const PROVIDER_CONDITION_SUPPORT: { export const conditionDetails = ( condition?: string, args: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1Argument[] = [], - provider?: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1MetricProvider + provider?: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1MetricProvider, ): { label: string | null; thresholds: number[]; @@ -209,7 +208,7 @@ export const chartMax = (valueMax: number, failThresholds: number[] | null, succ * @param phase analysis phase * @returns analysis phase adjusted to render the UI status with a more accurate functional status */ -export const getAdjustedMetricPhase = (phase?: AnalysisStatus): AnalysisStatus => (phase === AnalysisStatus.Error ? AnalysisStatus.Failed : phase ?? AnalysisStatus.Unknown); +export const getAdjustedMetricPhase = (phase?: AnalysisStatus): AnalysisStatus => (phase === AnalysisStatus.Error ? AnalysisStatus.Failed : (phase ?? AnalysisStatus.Unknown)); /** * @@ -379,7 +378,7 @@ export const interpolateQuery = (query?: string, args?: GithubComArgoprojArgoRol */ export const printableDatadogQuery = ( datadog: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1DatadogMetric, - args: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1Argument[] + args: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1Argument[], ): string[] | undefined => { if ((datadog.apiVersion ?? '').toLowerCase() === 'v1' && 'query' in datadog) { return [interpolateQuery(datadog.query, args)]; @@ -418,7 +417,7 @@ export const printableCloudWatchQuery = (cloudWatch: GithubComArgoprojArgoRollou */ export const metricQueries = ( provider?: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1MetricProvider | null, - args: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1Argument[] = [] + args: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1Argument[] = [], ): string[] | undefined => { if (provider === undefined || provider === null) { return undefined; @@ -468,7 +467,7 @@ export const transformMeasurements = (conditionKeys: string[], measurements?: Gi return measurements.reduce( ( acc: {chartable: boolean; min: number; max: number | null; measurements: TransformedMeasurement[]}, - currMeasurement: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1Measurement + currMeasurement: GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1Measurement, ) => { const transformedValue = transformMeasurementValue(conditionKeys, currMeasurement.value); const {canChart, tableValue} = transformedValue; @@ -488,7 +487,7 @@ export const transformMeasurements = (conditionKeys: string[], measurements?: Gi ], }; }, - {chartable: true, min: 0, max: null, measurements: [] as TransformedMeasurement[]} + {chartable: true, min: 0, max: null, measurements: [] as TransformedMeasurement[]}, ); }; @@ -508,7 +507,7 @@ type FormattedMeasurementValue = number | string | null; */ export const formattedValue = (value: any): FormattedMeasurementValue => { const isNum = isFiniteNumber(value); - return isNum ? roundNumber(Number(value)) : value?.toString() ?? null; + return isNum ? roundNumber(Number(value)) : (value?.toString() ?? null); }; /** @@ -534,6 +533,7 @@ const formatNumberMeasurement = (value: number): MeasurementValueInfo => { export const formatSingleItemArrayMeasurement = (value: FormattedMeasurementValue[], accessor: number): MeasurementValueInfo => { if (isFiniteNumber(accessor)) { const measurementValue = value?.[accessor] ?? null; + // if it's a number or null, chart it if (isFiniteNumber(measurementValue) || measurementValue === null) { const displayValue = formattedValue(measurementValue); @@ -618,7 +618,16 @@ const transformMeasurementValue = (conditionKeys: string[], value?: string): Mea }; } - const parsedValue = JSON5.parse(value); + let parsedValue; + try { + parsedValue = JSON.parse(value); + } catch { + return { + canChart: true, + chartValue: null, + tableValue: null, + }; + } // single number measurement value if (isFiniteNumber(parsedValue)) { diff --git a/ui/src/app/components/pods/pods.tsx b/ui/src/app/components/pods/pods.tsx index 5e7005fcbd..6b44aa3d41 100644 --- a/ui/src/app/components/pods/pods.tsx +++ b/ui/src/app/components/pods/pods.tsx @@ -21,6 +21,9 @@ export enum PodStatus { } const isPodReady = (ready: string) => { + if (!ready) { + return false; + } // Ready is a string in the format "0/1", "1/1", etc. const [current, total] = ready.split('/'); return current === total; From 9f182220f5bc616f394a525bb415ab42453b6c33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:52:05 -0500 Subject: [PATCH 06/36] chore(deps): bump codecov/codecov-action from 4.5.0 to 4.6.0 (#3865) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.5.0 to 4.6.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/e28ff129e5465c2c0dcc6f003fc735cb6ae0c673...b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238) --- updated-dependencies: - dependency-name: codecov/codecov-action 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> --- .github/workflows/testing.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 7c4282bea7..7122e8308b 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -184,7 +184,7 @@ jobs: run: | go tool covdata textfmt -i=coverage-output-unit/,coverage-output-e2e/ -o full-coverage.out - name: Upload code coverage information to codecov.io - uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 + uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 with: file: full-coverage.out fail_ci_if_error: false From b0d74e5def390e8d7f33fb98c7450519037d30be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:04:58 -0500 Subject: [PATCH 07/36] chore(deps): bump golang.org/x/oauth2 from 0.22.0 to 0.23.0 (#3841) Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/oauth2/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/oauth2 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> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 38ae8ea4f5..2f8f3c195f 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 - golang.org/x/oauth2 v0.22.0 + golang.org/x/oauth2 v0.23.0 google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 google.golang.org/grpc v1.66.2 google.golang.org/protobuf v1.34.2 diff --git a/go.sum b/go.sum index cf03833091..1613b1752c 100644 --- a/go.sum +++ b/go.sum @@ -878,8 +878,8 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From 785ea175630e7621d4434262c969a2d6b3c40835 Mon Sep 17 00:00:00 2001 From: Youssef Rabie Date: Tue, 15 Oct 2024 05:00:33 +0300 Subject: [PATCH 08/36] fix(metricprovider): fix handling null values in datadog (#3893) Signed-off-by: Youssef Rabie --- metricproviders/datadog/datadog.go | 6 +++--- metricproviders/datadog/datadogV2_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/metricproviders/datadog/datadog.go b/metricproviders/datadog/datadog.go index 8778b51827..021731dd62 100644 --- a/metricproviders/datadog/datadog.go +++ b/metricproviders/datadog/datadog.go @@ -67,7 +67,7 @@ type datadogResponseV2 struct { Data struct { Attributes struct { Columns []struct { - Values []float64 + Values []*float64 } } Errors string @@ -320,7 +320,7 @@ func (p *Provider) parseResponseV2(metric v1alpha1.Metric, response *http.Respon } // Handle an empty query result - if reflect.ValueOf(res.Data.Attributes).IsZero() || len(res.Data.Attributes.Columns) == 0 || len(res.Data.Attributes.Columns[0].Values) == 0 { + if reflect.ValueOf(res.Data.Attributes).IsZero() || len(res.Data.Attributes.Columns) == 0 || len(res.Data.Attributes.Columns[0].Values) == 0 || res.Data.Attributes.Columns[0].Values[0] == nil { var nilFloat64 *float64 status, err := evaluate.EvaluateResult(nilFloat64, metric, p.logCtx) @@ -343,7 +343,7 @@ func (p *Provider) parseResponseV2(metric v1alpha1.Metric, response *http.Respon // Handle a populated query result column := res.Data.Attributes.Columns[0] - value := column.Values[0] + value := *column.Values[0] status, err := evaluate.EvaluateResult(value, metric, p.logCtx) return strconv.FormatFloat(value, 'f', -1, 64), status, err } diff --git a/metricproviders/datadog/datadogV2_test.go b/metricproviders/datadog/datadogV2_test.go index 9723580340..b370e5c371 100644 --- a/metricproviders/datadog/datadogV2_test.go +++ b/metricproviders/datadog/datadogV2_test.go @@ -248,7 +248,7 @@ func TestRunSuiteV2(t *testing.T) { }, expectedIntervalSeconds: 300, expectedPhase: v1alpha1.AnalysisPhaseError, - expectedErrorMessage: "Could not parse JSON body: json: cannot unmarshal string into Go struct field .Data.Attributes.Columns.Values of type []float64", + expectedErrorMessage: "Could not parse JSON body: json: cannot unmarshal string into Go struct field .Data.Attributes.Columns.Values of type []*float64", useEnvVarForKeys: false, }, From 6c61ed2a22c626252bc47c7f59cc1bb7fd65cfaa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:49:57 -0500 Subject: [PATCH 09/36] chore(deps): bump google.golang.org/protobuf from 1.34.2 to 1.35.1 (#3887) Bumps google.golang.org/protobuf from 1.34.2 to 1.35.1. --- updated-dependencies: - dependency-name: google.golang.org/protobuf 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> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2f8f3c195f..b82730fc5f 100644 --- a/go.mod +++ b/go.mod @@ -43,7 +43,7 @@ require ( golang.org/x/oauth2 v0.23.0 google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 google.golang.org/grpc v1.66.2 - google.golang.org/protobuf v1.34.2 + google.golang.org/protobuf v1.35.1 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.29.3 k8s.io/apiextensions-apiserver v0.29.3 diff --git a/go.sum b/go.sum index 1613b1752c..b3a0f9d4fb 100644 --- a/go.sum +++ b/go.sum @@ -1145,8 +1145,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= From ac5a0d736863c19ed01892bfb433a2595cafeb96 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:50:14 -0500 Subject: [PATCH 10/36] chore(deps): bump github.com/aws/aws-sdk-go-v2 from 1.31.0 to 1.32.2 (#3886) Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.31.0 to 1.32.2. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.31.0...v1.32.2) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 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> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index b82730fc5f..f329ccd199 100644 --- a/go.mod +++ b/go.mod @@ -8,11 +8,11 @@ require ( github.com/antonmedv/expr v1.15.5 github.com/argoproj/notifications-engine v0.4.1-0.20240219110818-7a069766e954 github.com/argoproj/pkg v0.13.6 - github.com/aws/aws-sdk-go-v2 v1.31.0 + github.com/aws/aws-sdk-go-v2 v1.32.2 github.com/aws/aws-sdk-go-v2/config v1.27.38 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.40.8 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3 - github.com/aws/smithy-go v1.21.0 + github.com/aws/smithy-go v1.22.0 github.com/blang/semver v3.5.1+incompatible github.com/bombsimon/logrusr/v4 v4.1.0 github.com/evanphx/json-patch/v5 v5.9.0 diff --git a/go.sum b/go.sum index b3a0f9d4fb..762bbb19f1 100644 --- a/go.sum +++ b/go.sum @@ -96,8 +96,8 @@ github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= -github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= +github.com/aws/aws-sdk-go-v2 v1.32.2 h1:AkNLZEyYMLnx/Q/mSKkcMqwNFXMAvFto9bNsHqcTduI= +github.com/aws/aws-sdk-go-v2 v1.32.2/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= github.com/aws/aws-sdk-go-v2/config v1.27.38 h1:mMVyJJuSUdbD4zKXoxDgWrgM60QwlFEg+JhihCq6wCw= github.com/aws/aws-sdk-go-v2/config v1.27.38/go.mod h1:6xOiNEn58bj/64MPKx89r6G/el9JZn8pvVbquSqTKK4= github.com/aws/aws-sdk-go-v2/credentials v1.17.36 h1:zwI5WrT+oWWfzSKoTNmSyeBKQhsFRJRv+PGW/UZW+Yk= @@ -126,8 +126,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.2 h1:3gb6pYhYLjo8rB1h2Tqs61wp github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.2/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= github.com/aws/aws-sdk-go-v2/service/sts v1.31.2 h1:O6tyji8mXmBGsHvTCB0VIhrDw19lGTUSbKIyjnw79s8= github.com/aws/aws-sdk-go-v2/service/sts v1.31.2/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= -github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= -github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= +github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= From 806d07cca172090e9ba7c9dd101af89b6e8957c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:50:37 +0000 Subject: [PATCH 11/36] chore(deps): bump github.com/aws/smithy-go from 1.21.0 to 1.22.0 (#3885) Bumps [github.com/aws/smithy-go](https://github.com/aws/smithy-go) from 1.21.0 to 1.22.0. - [Release notes](https://github.com/aws/smithy-go/releases) - [Changelog](https://github.com/aws/smithy-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws/smithy-go/compare/v1.21.0...v1.22.0) --- updated-dependencies: - dependency-name: github.com/aws/smithy-go 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> From 060566cbf0ae510667178f78928e3c8b00de2660 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 21:05:19 -0500 Subject: [PATCH 12/36] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.40.8 to 1.42.2 (#3901) 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.40.8 to 1.42.2. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/athena/v1.40.8...service/s3/v1.42.2) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudwatch 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> --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index f329ccd199..74d60f9ad4 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.32.2 github.com/aws/aws-sdk-go-v2/config v1.27.38 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.40.8 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.2 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3 github.com/aws/smithy-go v1.22.0 github.com/blang/semver v3.5.1+incompatible @@ -85,8 +85,8 @@ require ( github.com/aws/aws-sdk-go v1.44.116 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.36 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect diff --git a/go.sum b/go.sum index 762bbb19f1..0bb5eed3f6 100644 --- a/go.sum +++ b/go.sum @@ -104,14 +104,14 @@ github.com/aws/aws-sdk-go-v2/credentials v1.17.36 h1:zwI5WrT+oWWfzSKoTNmSyeBKQhs github.com/aws/aws-sdk-go-v2/credentials v1.17.36/go.mod h1:3AG/sY1rc9NJrNWcN/3KPU4SIDPGTrd/qegKB0TnFdE= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 h1:UAsR3xA31QGf79WzpG/ixT9FZvQlh5HY1NRqSHBNOCk= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21/go.mod h1:JNr43NFf5L9YaG3eKTm7HQzls9J+A9YYcGI5Quh1r2Y= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 h1:6jZVETqmYCadGFvrYEQfC5fAQmlo80CeL5psbno6r0s= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21/go.mod h1:1SR0GbLlnN3QUmYaflZNiH1ql+1qrSiB2vwcJ+4UM60= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.40.8 h1:+TC6bH5yzGSJPDQ+NKmbXpy2r346JGJb5QT0Mpe4xLE= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.40.8/go.mod h1:HeDvLYJALo05N6wCx3Ufa1rHGL1mz9ON312O2yVclIs= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.2 h1:eMh+iBTF1CbpHMfiRvIaVm+rzrH1DOzuSFaR55O+bBo= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.2/go.mod h1:/A4zNqF1+RS5RV+NNLKIzUX1KtK5SoWgf/OpiqrwmBo= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3 h1:Avh8YS+sgb2OKRht0wdNwY8tqtsCzVrmc8dG8Wfy9LI= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3/go.mod h1:HbtHaw/hnNPaiqcyYnheILVyn81wOZiX9n2gYF5tPmM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= From de827d41446303d3a260a09cb6f79dd46f9c140b Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Thu, 17 Oct 2024 10:49:48 -0500 Subject: [PATCH 13/36] fix: check isScalingEvent only on stable and newRS (#3883) * test Signed-off-by: Zach Aller * add comments Signed-off-by: Zach Aller * comments Signed-off-by: Zach Aller * add test Signed-off-by: Zach Aller * no need to check length, same in both versions Signed-off-by: Zach Aller * add active filter back Signed-off-by: Zach Aller * rename vars add comments Signed-off-by: Zach Aller * remove comment Signed-off-by: Zach Aller --------- Signed-off-by: Zach Aller --- rollout/sync.go | 5 +++- rollout/sync_test.go | 64 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/rollout/sync.go b/rollout/sync.go index 3585612197..c0d394a74b 100644 --- a/rollout/sync.go +++ b/rollout/sync.go @@ -324,7 +324,10 @@ func (c *rolloutContext) isScalingEvent() (bool, error) { return false, fmt.Errorf("failed to getAllReplicaSetsAndSyncRevision in isScalingEvent: %w", err) } - for _, rs := range controller.FilterActiveReplicaSets(c.allRSs) { + // We only care about scaling events on the newRS and stableRS because these are the only replicasets that we ever + // adjust the replicas counts on as well as the desired annotation. When we have stacked rollouts going the middle + // replicasets will never have the desired annotation updated this can cause a tight loop of isScalingEvent -> syncReplicasOnly -> isScalingEvent + for _, rs := range controller.FilterActiveReplicaSets([]*appsv1.ReplicaSet{c.newRS, c.stableRS}) { desired, ok := annotations.GetDesiredReplicasAnnotation(rs) if !ok { continue diff --git a/rollout/sync_test.go b/rollout/sync_test.go index 7b2552e6c9..d71bb9e496 100644 --- a/rollout/sync_test.go +++ b/rollout/sync_test.go @@ -1,6 +1,7 @@ package rollout import ( + "encoding/json" "strconv" "testing" "time" @@ -639,3 +640,66 @@ func TestScaleDownDeploymentOnSuccess(t *testing.T) { assert.NotNil(t, err) } + +// This tests validates that when there are old replicasets that have miss matched desired-count annotations aka they do +// not match the spec.replicas field. When this happens we get stuck in a reconcile loop of only trying to scale replicasets +// only because of a supposed scaling event. This test validates that we do not get stuck in this loop by checking that status.replicas +// and status.readyreplicas are updated because those will not be updated in that loop. +func TestIsScalingEventMissMatchedDesiredOldReplicas(t *testing.T) { + f := newFixture(t) + defer f.Close() + + // these steps should be ignored + steps := []v1alpha1.CanaryStep{ + { + SetWeight: int32Ptr(10), + }, + { + Pause: &v1alpha1.RolloutPause{ + Duration: v1alpha1.DurationFromInt(60), + }, + }, + } + + r0 := newCanaryRollout("foo", 10, int32Ptr(4), steps, int32Ptr(0), intstr.FromInt(10), intstr.FromInt(0)) + r0.Annotations[annotations.RevisionAnnotation] = "1" + oldRs := newReplicaSetWithStatus(r0, 3, 3) + oldRs.Annotations[annotations.DesiredReplicasAnnotation] = "2" + + r1 := bumpVersion(r0) + + // Desired rs will be created during reconcile + stableRs := newReplicaSetWithStatus(r1, 10, 10) + r1.Status.StableRS = stableRs.Labels[v1alpha1.DefaultRolloutUniqueLabelKey] + r2 := bumpVersion(r1) + r2.Annotations[annotations.RevisionAnnotation] = "2" + + f.rolloutLister = append(f.rolloutLister, r2) + f.objects = append(f.objects, r2) + f.kubeobjects = append(f.kubeobjects, oldRs, stableRs) + f.replicaSetLister = append(f.replicaSetLister, oldRs, stableRs) + + f.expectUpdateRolloutAction(r2) // update rollout revision + f.expectUpdateRolloutStatusAction(r2) + updatedROIndex := f.expectPatchRolloutAction(r2) + createdRS2Index := f.expectCreateReplicaSetAction(stableRs) + updatedRS2Index := f.expectUpdateReplicaSetAction(stableRs) + f.run(getKey(r2, t)) + + createdRS2 := f.getCreatedReplicaSet(createdRS2Index) + assert.Equal(t, int32(0), *createdRS2.Spec.Replicas) + updatedRS2 := f.getUpdatedReplicaSet(updatedRS2Index) + assert.Equal(t, int32(1), *updatedRS2.Spec.Replicas) + + updateRO := f.getPatchedRollout(updatedROIndex) + + //Will only contain status + roStatus := v1alpha1.Rollout{} + err := json.Unmarshal([]byte(updateRO), &roStatus) + assert.Nil(t, err) + + // We have two ReplicaSets, one with 3 pods and one with 10 + assert.Equal(t, int32(13), roStatus.Status.Replicas) + assert.Equal(t, int32(13), roStatus.Status.ReadyReplicas) + assert.Equal(t, int32(0), roStatus.Status.UpdatedReplicas) +} From 3cf177dbee7897dd261bd1ae36a3818cebe6f0a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:51:49 -0500 Subject: [PATCH 14/36] chore(deps): bump docker/setup-buildx-action from 3.6.1 to 3.7.1 (#3876) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.6.1 to 3.7.1. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/988b5a0280414f521da01fcc63a27aeeb4b104db...c47758b77c9736f4b2ef4073d4d51994fabfe349) --- updated-dependencies: - dependency-name: docker/setup-buildx-action 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> --- .github/workflows/image-reuse.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index e11f92306c..165873dec4 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -79,7 +79,7 @@ jobs: cosign-release: 'v2.2.0' - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - - uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 + - uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 - name: Setup tags for container image as a CSV type run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8872b5470f..d250e7f4e9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -98,7 +98,7 @@ jobs: uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 + uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 - name: Generate release artifacts run: | From b2a6844f2601bbde8d93c980d150b72f0f8f4d56 Mon Sep 17 00:00:00 2001 From: Li Wang Date: Thu, 17 Oct 2024 23:59:52 +0800 Subject: [PATCH 15/36] fix: rollout should skip timeout when paused (#3711) * fix: rollout should timeout when paused Signed-off-by: Li Wang * chore: add test cases for Rollout timeout when paused or aborted Signed-off-by: Li Wang --------- Signed-off-by: Li Wang --- utils/conditions/conditions.go | 2 +- utils/conditions/rollouts_test.go | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/utils/conditions/conditions.go b/utils/conditions/conditions.go index 2e62cb80fe..738f2120ab 100644 --- a/utils/conditions/conditions.go +++ b/utils/conditions/conditions.go @@ -346,7 +346,7 @@ func RolloutTimedOut(rollout *v1alpha1.Rollout, newStatus *v1alpha1.RolloutStatu // When a rollout is retried, the controller should not evaluate for a timeout based on the // aborted condition because the abort could have happened a while back and the rollout should // not enter degraded as a result of that - if condition == nil || condition.Reason == RolloutAbortedReason { + if condition == nil || condition.Reason == RolloutAbortedReason || condition.Reason == RolloutPausedReason { return false } diff --git a/utils/conditions/rollouts_test.go b/utils/conditions/rollouts_test.go index 842f01f594..289437d758 100644 --- a/utils/conditions/rollouts_test.go +++ b/utils/conditions/rollouts_test.go @@ -555,6 +555,22 @@ func TestRolloutTimedOut(t *testing.T) { }, expected: true, }, + { + name: "Rollout has not time out when paused", + progressDeadlineSeconds: 5, + newStatus: v1alpha1.RolloutStatus{ + Conditions: conditions(RolloutPausedReason, before), + }, + expected: false, + }, + { + name: "Rollout has not time out when aborted", + progressDeadlineSeconds: 5, + newStatus: v1alpha1.RolloutStatus{ + Conditions: conditions(RolloutAbortedReason, before), + }, + expected: false, + }, } for i := range tests { test := tests[i] From ee356d0aebdd04fe1b8b335040f3efd5a9cec0b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 08:38:55 -0500 Subject: [PATCH 16/36] chore(deps): bump google.golang.org/grpc from 1.66.2 to 1.67.1 (#3903) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.66.2 to 1.67.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.66.2...v1.67.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc 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> --- go.mod | 22 +++++++++++----------- go.sum | 52 ++++++++++++++++++++++++++-------------------------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/go.mod b/go.mod index 74d60f9ad4..d9f3a435e6 100644 --- a/go.mod +++ b/go.mod @@ -41,8 +41,8 @@ require ( github.com/tj/assert v0.0.3 github.com/valyala/fasttemplate v1.2.2 golang.org/x/oauth2 v0.23.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 - google.golang.org/grpc v1.66.2 + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 + google.golang.org/grpc v1.67.1 google.golang.org/protobuf v1.35.1 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.29.3 @@ -62,7 +62,7 @@ require ( ) require ( - cloud.google.com/go/compute/metadata v0.3.0 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect github.com/PagerDuty/go-pagerduty v1.7.0 // indirect github.com/bradleyfalzon/ghinstallation/v2 v2.5.0 // indirect github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1 // indirect @@ -118,7 +118,7 @@ require ( github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/golang/glog v1.2.1 // indirect + github.com/golang/glog v1.2.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/btree v1.1.2 // indirect github.com/google/cel-go v0.17.7 // indirect @@ -201,21 +201,21 @@ require ( go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.19.0 // indirect - golang.org/x/crypto v0.24.0 // indirect + golang.org/x/crypto v0.26.0 // indirect golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gomodules.xyz/envconfig v1.3.1-0.20190308184047-426f31af0d45 // indirect gomodules.xyz/notify v0.1.1 // indirect google.golang.org/api v0.162.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index 0bb5eed3f6..0a1fc4a86b 100644 --- a/go.sum +++ b/go.sum @@ -20,8 +20,8 @@ cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUM cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -166,8 +166,8 @@ github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtM github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b h1:ga8SEFjZ60pxLcmhnThWgvH2wg8376yUJmPhEH4H3kw= -github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20 h1:N+3sFI5GUjRKBi+i0TxYVST9h4Ie192jJWpHvthBBgg= +github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= @@ -202,8 +202,8 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM= +github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= @@ -284,8 +284,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= -github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -783,8 +783,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -869,8 +869,8 @@ golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -893,8 +893,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -961,8 +961,8 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -971,8 +971,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -985,8 +985,8 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1112,10 +1112,10 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:+rdxYoE3E5htTEWIe15GlN6IfvbURM//Jt0mmkmm6ZU= -google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1130,8 +1130,8 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= -google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 1264f8d9b31c53177b666a9145bdb02476f271ad Mon Sep 17 00:00:00 2001 From: Alexandre Gaudreault Date: Sat, 19 Oct 2024 14:25:06 -0400 Subject: [PATCH 17/36] chore: add step plugin proposal (#3480) step plugin proposal Signed-off-by: Alexandre Gaudreault --- docs/proposals/step-plugin.md | 334 ++++++++++++++++++++++++++++++++++ 1 file changed, 334 insertions(+) create mode 100644 docs/proposals/step-plugin.md diff --git a/docs/proposals/step-plugin.md b/docs/proposals/step-plugin.md new file mode 100644 index 0000000000..0c170b7fe7 --- /dev/null +++ b/docs/proposals/step-plugin.md @@ -0,0 +1,334 @@ +--- +title: Step Plugin +authors: + - '@agaudreault' +sponsors: + - '@zaller' +creation-date: 2024-03-27 +--- + +# Step Plugin + +Step plugins can be used to call code built outside of argo-rollout's codebase to execute actions during a canary rollout. + +This document provides technical implementation proposals to avoid implementing rollout steps in Argo Rollout’s codebase. + +## Summary + +Rollout steps need to be implemented natively in Argo Rollout source code. +It makes it difficult for the community to add new rollout steps because their implementation +is coupled with Rollout release cycle. The Rollout maintainers also have to acquire +knowledge on the different technologies used in the steps and validate them on each release. + +## Motivation + +This section is for explicitly listing the motivation, goals and non-goals of this proposal. +Describe why the change is important and the benefits to users. + +### Goals + +The goals of this proposal are: + +- Update steps outside Rollout’s release cycle +- Allow the community experts to maintain their steps +- Allow for a faster step development iteration +- Allow for more features without increasing complexity on the controller +- Allow users to use proprietary steps with Argo Rollouts + +### Non-Goals + +Implement plugins. + +## Proposal + +Rollout already has a plugin mechanism for metric providers and traffic routers as +documented in https://argoproj.github.io/argo-rollouts/plugins/. The implementation is based on [hashicorp/go-plugin](https://github.com/hashicorp/go-plugin). +This mechanism can be extended to support the steps plugin. + +- Consistent with existing behavior. +- Add a `stepPluginStatuses` array to the `.status.canary` field. +- Users can consult the Rollout object after the execution to get details on their status. + +### Use cases + +More details in https://github.com/argoproj/argo-rollouts/issues/2685 + +### Implementation Details/Notes/Constraints + +#### Configuration + +The plugin will be configured alongside existing plugins. + +```yaml +kind: ConfigMap +metadata: + name: argo-rollouts-config +data: + metricProviderPlugins: |- + - name: "argoproj-labs/metrics" + location: "file:///tmp/argo-rollouts/metric-plugin" + args: + - "--log-level" + - "debug" + stepPlugins: |- + - name: "argoproj-labs/curl/v2" + disabled: false + location: "file:///tmp/argo-rollouts/step-plugin" + sha256: "08f588b1c799a37bbe8d0fc74cc1b1492dd70abc" + args: + - "--log-level" + - "debug" +``` + +#### Interface + +_The interface implementation details related to go-plugin and rpc calls have been omitted for clarity._ + +```go +type Phase string + +const ( + PhaseRunning Phase = "Running" + PhaseSuccessful Phase = "Successful" + PhaseFailed Phase = "Failed" + PhaseError Phase = "Error" +) + +type StepContext struct { + PluginName string + Config map[string]interface{} + Status map[string]interface{} +} + +type StepStatus struct { + Index int + Name string + Phase Phase + Message string + StartedAt Time + FinishedAt Time + Status map[string]interface{} +} + +type StepResult struct { + Phase Phase + Message string + RequeueAfter Duration + Status map[string]interface{} +} + +type StepPlugin interface { + Init() error + Run(Rollout, StepContext) (StepResult, error) + Terminate(Rollout, StepContext) (StepResult, error) + Abort(Rollout, StepContext) (StepResult, error) +} +``` + +#### Rollout object (plugin input) + +The step will provide rollout specific configuration defined by the users +as a map of key value pairs allowing the user to pass any declarative configs to the plugin. + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: example-rollout +spec: + strategy: + canary: + ... + steps: + - setWeight: 20 + - plugin: + name: argoproj/curl + abortOnFailure: false # <--- example + progressDeadline: 30s # <--- example + config: + url: https://example.com/ + some_key: some_value + - pause: {} + - setWeight: 40 + +``` + +#### Rollout Status (plugin output) + +The controller will write a new object to the status. +This object will be used to persist the plugin state after the step execution and to allow other steps to use it. + +```yaml +status: + canary: + stepPluginStatuses: + - index: 2 + name: argoproj/curl + message: Call completed with status code 302 + phase: Successful + startedAt: '2024-02-15T20:05:40Z' + finishedAt: '2024-02-15T20:21:40Z' + status: {} + - index: 4 + name: argoproj/async-task + message: Waiting for result + phase: Running + startedAt: '2024-02-15T20:05:40Z' + finishedAt: null + status: + id: 12 + path: /an/example/property + validated: false +``` + +### Detailed execution flow + +1. **At initialization** + + The plugins are loaded based on configuration and started as processes with the provided arguments in the configuration. + The `Init()` method is called for plugins to perform one-time initialization such as creating clients and establishing connections. + +2. **A rollout reach the plugin step for the first time** + + During the rollout, the controller will use the `currentStepIndex` to find the step to run. + If the step is a plugin, the controller will create a StepContext object based + on the configuration on the Rollout’s step object. + + The controller will try to retrieve the value of the current `stepPluginStatuses`, + and if it matches the current step index, it will add the persisted state to the context. + + It will create a StepStatus object otherwise, set the name and index to the current step, + set the startedAt value to the current time and the phase as Running. + +3. **Running the step plugin** + + The plugin `Run()` method is called with the StepContext. + The plugin implementation will use the StepContext to perform the necessary logic. + +4. **Status is updated** + + Based on the return of the Run command, the StepStatus object is updated. + Then, the StepStatus is assigned to the stepPluginStatuses property. + + The status is persisted in the object. + +5. **Validate step completed** + + If the controller current step is of type plugin, the controller will check if the phase is successful, + and if so, go to the next step. + + If the step is still running, the controller will requeue a reconcile operation based on the value of `RequeueAfter`. + + If the phase is failed, it will update the status and conditions, **aborting** the rollout. + +#### Scenarios + +##### Step plugin completes successfully + +The `stepPluginStatuses` will not contain any object for the current step index, the plugin will perform the desired action successfully and return a successful state. + +The state will be persisted and the controller wil execute the next step. + +##### Step plugin completes with failed phase + +If the step plugin returns a failed phase, the controller will set the rollout to **aborted** and persist the state. + +The user will receive the feedback based on the Progressing condition status. This behavior is consistent with existing mechanisms aborting a rollout. + +##### Step plugin completes with running phase + +If the step plugin returns a running phase, the controller will persist the state, but will not increment the current step index. + +The controller will requeue a reconcile operation based on the value of `RequeueAfter` and terminate the current reconciliation. + +On the next reconciliation, the persisted state will be passed to the plugin `Run()` method. + +##### Step plugin is called multiple times + +If an external error happens causing the controller to crash after it called the `Run()` method and before it could persist the status, +the controller will replay the current plugin step, with a new context, like if it was the first time it is called. + +> **A step plugin can be called multiple times and operations should be idempotent.** + +##### Rollout is fully promoted during a step plugin + +If a Rollout is forcefully considered fully promoted while the current step is in a Running phase, +the plugin will call the `Terminate()` method with the current context on the next reconciliation and update the status based on the result. + +##### Rollout aborted during a step plugin + +If a Rollout is aborted while the current step is in a Running phase, the plugin will call the `Abort()` method with the current context on the next reconciliation. +The controller will call the `Abort()` operation for each step that were executed in the reverse order. +The steps may or may not perform any action during the Abort. +The result of the abort will be saved in the status, overriding the state persisted during the `Run()`. +If the Abort operation has an error, the error is propagated to the controller. +The controller has the responsibility to retry the Abort operation, and eventually proceed with the next step if it never succeeds. + +##### The step plugin reports an error + +Before returning the error, the status is persisted with the error phase and message. Other properties of the current status remain unmodified so the step can be re-executed with the last known valid status. + +For an expected retryable error, the plugin should return a Running phase with a RequeueAfter value to retry the execution. +For an expected un-retryable error, the plugin should return a Failed status. +After the state is persisted, the error is propagated to the controller and the controller error-handling logic will handle the error. + +##### The step plugin uses Rollout information + +The step plugin may need to have access to the current state of the Rollout. The step plugin will receive a deep copy of the rollout object in parameter. + +##### I can investigate my step plugin execution + +A user wants to know what happened during their custom step plugin after the execution. They can use the status in the Rollout object. + +##### State is shared between plugins + +A user wants to use an API to publish information about the rollout. The plugin first calls the API that returns a conversation ID. +Other steps need to use the conversationID during their execution. +The plugin step receives in parameters the full rollout object and the pluginName. This information can be used to retrieve the status of other plugin execution. + +An utility function such as `PluginHelper.GetStatuses(rollout, pluginName)` can be implemented and made available to the plugins. + +##### I want my rollout to continue event if my plugin failed + +A parameter such as `abortOnFailure` can be added to the Rollout plugin step configuration object. +When specified, the controller can use the value to modify the default logic. + +##### I dont want my plugin execution time to count towards the progress deadline + +A parameter such as `ignoreProgressDeadline` can be added to the Rollout plugin step configuration object. +When specified, the controller can use the value to modify the default logic. + +### Security Considerations + +- Plugins binary can be validated with the configured `sha256`. + +### Risks and Mitigations + +- Rollout status size can grow more than expected based on plugins hygiene. + - Object size can be validated with `unsafe.Sizeof(struct)` and a size limit can be imposed. +- Plugins that are failing or causing problems cannot be removed without updating all the Rollouts. + - A `disabled` config can be added globally and ignore the plugin execution if true. + +### Upgrade / Downgrade Strategy + +It is expected that plugins will be compiled with different versions than the running argo-rollout controller. The plugins version could be either newer or older than the controller. + +The hashicorp/go-plugin uses gob encoding with rpc. + +> “The source and destination values/types need not correspond exactly. For structs, fields (identified by name) that are in the source but absent from the receiving variable will be ignored. Fields that are in the receiving variable but missing from the transmitted type or value will be ignored in the destination. If a field with the same name is present in both, their types must be compatible. Both the receiver and transmitter will do all necessary indirection and dereferencing to convert between gobs and actual Go values.” - package [encoding/gob](https://pkg.go.dev/encoding/gob) + +Plugins should validate the objects they receive in parameters such as the `Rollout` and user confiuguration. If they expect a property to be set and it is not, it is highly probably that the controller's object version does not have that property. + +For breaking changes, hashicorp/go-plugin has a `ProtocolVersion` property that can be used in the future. + +Plugins can also be added with different names, which would require update to the Rollout CR objects as well. + +## Drawbacks + +- Gives a lot of power to the plugin and bad plugins could destabilize the rollouts +- If plugins need more permission, the access needs to be given using the Rollout service account. + +## Alternatives + +- Only implement vetted code in the argo-rollout codebase. +- Create a plugin that calls other containers From 8ac6be847a8b1aba96b33cd8a3c07e2f6f04f14d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sel=C3=A7uk=20Usta?= Date: Tue, 29 Oct 2024 17:21:03 +0300 Subject: [PATCH 18/36] docs(analysis): new plugin is added to the documentation (#3915) USERS.md is modified & new plugin is added to the documentation Signed-off-by: selcukusta --- USERS.md | 4 +++- docs/analysis/plugins.md | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/USERS.md b/USERS.md index c6878dc90b..0cd5f2c882 100644 --- a/USERS.md +++ b/USERS.md @@ -1,4 +1,5 @@ ## Who uses Argo Rollouts? + Organizations below are **officially** using Argo Rollouts. Please send a PR with your organization name if you are using Argo Rollouts. 1. [Ada](https://www.ada.cx) @@ -25,6 +26,7 @@ Organizations below are **officially** using Argo Rollouts. Please send a PR wit 1. [Gllue](https://gllue.com) 1. [Groww](https://groww.in/) 1. [HashiCorp](https://www.hashicorp.com/) +1. [Hepsiburada](https://hepsiburada.com/) 1. [Ibotta](https://home.ibotta.com/) 1. [Intuit](https://www.intuit.com/) 1. [New Relic](https://newrelic.com/) @@ -49,7 +51,7 @@ Organizations below are **officially** using Argo Rollouts. Please send a PR wit 1. [Spotify](https://www.spotify.com/) 1. [Synamedia](https://www.synamedia.com) 1. [TBC Bank](https://tbcbank.ge/) -2. [Trustly](https://www.trustly.com/) +1. [Trustly](https://www.trustly.com/) 1. [Tuhu](https://www.tuhu.cn/) 1. [Twilio SendGrid](https://sendgrid.com) 1. [Ubie](https://ubie.life/) diff --git a/docs/analysis/plugins.md b/docs/analysis/plugins.md index a7fd159a4a..4f3387b53b 100644 --- a/docs/analysis/plugins.md +++ b/docs/analysis/plugins.md @@ -1,7 +1,7 @@ # Metric Plugins !!! important - Available since v1.5 - Status: Alpha +Available since v1.5 - Status: Alpha Argo Rollouts supports getting analysis metrics via 3rd party plugin system. This allows users to extend the capabilities of Rollouts to support metric providers that are not natively supported. Rollout's uses a plugin library called @@ -18,9 +18,9 @@ into the rollouts controller container. The second method is to use a HTTP(S) se There are a few ways to mount the plugin executable into the rollouts controller container. Some of these will depend on your particular infrastructure. Here are a few methods: -* Using an init container to download the plugin executable -* Using a Kubernetes volume mount with a shared volume such as NFS, EBS, etc. -* Building the plugin into the rollouts controller container +- Using an init container to download the plugin executable +- Using a Kubernetes volume mount with a shared volume such as NFS, EBS, etc. +- Building the plugin into the rollouts controller container Then you can use the configmap to point to the plugin executable file location. Example: @@ -68,7 +68,14 @@ responsibility of the Argo Rollouts administrator to define the plugin installat ## List of Available Plugins (alphabetical order) #### Add Your Plugin Here - * If you have created a plugin, please submit a PR to add it to this list. + +- If you have created a plugin, please submit a PR to add it to this list. + +#### [rollouts-plugin-metric-opensearch](https://github.com/selcukusta/rollouts-plugin-metric-opensearch) + +- The application is an OpenSearch plugin designed for use with the Argo Rollouts plugin system. This plugin enables the integration of OpenSearch metrics into Argo Rollouts, allowing for advanced metric analysis and monitoring during application rollouts. + #### [rollouts-plugin-metric-sample-prometheus](https://github.com/argoproj-labs/rollouts-plugin-metric-sample-prometheus) - * This is just a sample plugin that can be used as a starting point for creating your own plugin. -It is not meant to be used in production. It is based on the built-in prometheus provider. + +- This is just a sample plugin that can be used as a starting point for creating your own plugin. + It is not meant to be used in production. It is based on the built-in prometheus provider. From 79c445f48e2832677dfa65aa9cf9075798abb059 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:22:04 -0500 Subject: [PATCH 19/36] chore(deps): bump github.com/aws/aws-sdk-go-v2 from 1.32.2 to 1.32.3 (#3919) Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.32.2 to 1.32.3. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.32.2...v1.32.3) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 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> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d9f3a435e6..28d378427b 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/antonmedv/expr v1.15.5 github.com/argoproj/notifications-engine v0.4.1-0.20240219110818-7a069766e954 github.com/argoproj/pkg v0.13.6 - github.com/aws/aws-sdk-go-v2 v1.32.2 + github.com/aws/aws-sdk-go-v2 v1.32.3 github.com/aws/aws-sdk-go-v2/config v1.27.38 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.2 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3 diff --git a/go.sum b/go.sum index 0a1fc4a86b..4f4fa44aee 100644 --- a/go.sum +++ b/go.sum @@ -96,8 +96,8 @@ github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go-v2 v1.32.2 h1:AkNLZEyYMLnx/Q/mSKkcMqwNFXMAvFto9bNsHqcTduI= -github.com/aws/aws-sdk-go-v2 v1.32.2/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= +github.com/aws/aws-sdk-go-v2 v1.32.3 h1:T0dRlFBKcdaUPGNtkBSwHZxrtis8CQU17UpNBZYd0wk= +github.com/aws/aws-sdk-go-v2 v1.32.3/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= github.com/aws/aws-sdk-go-v2/config v1.27.38 h1:mMVyJJuSUdbD4zKXoxDgWrgM60QwlFEg+JhihCq6wCw= github.com/aws/aws-sdk-go-v2/config v1.27.38/go.mod h1:6xOiNEn58bj/64MPKx89r6G/el9JZn8pvVbquSqTKK4= github.com/aws/aws-sdk-go-v2/credentials v1.17.36 h1:zwI5WrT+oWWfzSKoTNmSyeBKQhsFRJRv+PGW/UZW+Yk= From 869687932a56293a7f53fd767964a9fb38c54b10 Mon Sep 17 00:00:00 2001 From: Ian Rudie Date: Tue, 29 Oct 2024 10:23:03 -0400 Subject: [PATCH 20/36] docs: GTW API support changed to Gloo Gateway instead of GloodMesh (#3914) correct GTW API support to state Gloo Gateway instead of GloodMesh Signed-off-by: Ian Rudie --- docs/features/traffic-management/plugins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features/traffic-management/plugins.md b/docs/features/traffic-management/plugins.md index 7f8d8e1b11..fe0dc22b19 100644 --- a/docs/features/traffic-management/plugins.md +++ b/docs/features/traffic-management/plugins.md @@ -80,4 +80,4 @@ responsibility of the Argo Rollouts administrator to define the plugin installat * This is a plugin that allows argo-rollouts to work with contour's resource: HTTPProxy. It enables traffic shaping patterns such as canary releases and more. #### [Gateway API](https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/) -* Provide support for Gateway API, which includes Kuma, Traefix, cilium, Contour, GloodMesh, HAProxy, and [many others](https://gateway-api.sigs.k8s.io/implementations/#implementation-status). \ No newline at end of file +* Provide support for Gateway API, which includes Kuma, Traefix, cilium, Contour, Gloo Gateway, HAProxy, and [many others](https://gateway-api.sigs.k8s.io/implementations/#implementation-status). From 8503baa8fe6231d0a923b3e49690af0ec9aa8224 Mon Sep 17 00:00:00 2001 From: Maksim Bezsaznyj Date: Tue, 29 Oct 2024 10:46:58 -0400 Subject: [PATCH 21/36] fix(controller): weighted experiment validation should allow delegating to trafficRouter plugins (#3909) Signed-off-by: Maksim Bezsaznyj --- pkg/apis/rollouts/validation/validation.go | 4 ++-- pkg/apis/rollouts/validation/validation_test.go | 13 ++++++++++++- pkg/kubectl-argo-rollouts/cmd/lint/lint_test.go | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pkg/apis/rollouts/validation/validation.go b/pkg/apis/rollouts/validation/validation.go index 6b4ddb45e2..d9c31a37f1 100644 --- a/pkg/apis/rollouts/validation/validation.go +++ b/pkg/apis/rollouts/validation/validation.go @@ -387,8 +387,8 @@ func ValidateRolloutStrategyCanary(rollout *v1alpha1.Rollout, fldPath *field.Pat if template.Weight != nil { if canary.TrafficRouting == nil { allErrs = append(allErrs, field.Invalid(stepFldPath.Child("experiment").Child("templates").Index(tmplIndex).Child("weight"), *canary.Steps[i].Experiment.Templates[tmplIndex].Weight, InvalidCanaryExperimentTemplateWeightWithoutTrafficRouting)) - } else if canary.TrafficRouting.ALB == nil && canary.TrafficRouting.SMI == nil && canary.TrafficRouting.Istio == nil { - allErrs = append(allErrs, field.Invalid(stepFldPath.Child("experiment").Child("templates").Index(tmplIndex).Child("weight"), *canary.Steps[i].Experiment.Templates[tmplIndex].Weight, "Experiment template weight is only available for TrafficRouting with SMI, ALB, and Istio at this time")) + } else if canary.TrafficRouting.ALB == nil && canary.TrafficRouting.SMI == nil && canary.TrafficRouting.Istio == nil && len(canary.TrafficRouting.Plugins) == 0 { + allErrs = append(allErrs, field.Invalid(stepFldPath.Child("experiment").Child("templates").Index(tmplIndex).Child("weight"), *canary.Steps[i].Experiment.Templates[tmplIndex].Weight, "Experiment template weight is only available for TrafficRouting with SMI, ALB, Istio and Plugins at this time")) } } } diff --git a/pkg/apis/rollouts/validation/validation_test.go b/pkg/apis/rollouts/validation/validation_test.go index c9fc9ad923..84fc93b5dd 100644 --- a/pkg/apis/rollouts/validation/validation_test.go +++ b/pkg/apis/rollouts/validation/validation_test.go @@ -17,7 +17,7 @@ import ( ) const ( - errTrafficRoutingWithExperimentSupport = "Experiment template weight is only available for TrafficRouting with SMI, ALB, and Istio at this time" + errTrafficRoutingWithExperimentSupport = "Experiment template weight is only available for TrafficRouting with SMI, ALB, Istio and Plugins at this time" ) func TestValidateRollout(t *testing.T) { @@ -1094,4 +1094,15 @@ func TestCanaryExperimentStepWithWeight(t *testing.T) { assert.Equal(t, 1, len(allErrs)) assert.Equal(t, errTrafficRoutingWithExperimentSupport, allErrs[0].Detail) }) + + t.Run("success - Plugins", func(t *testing.T) { + invalidRo := ro.DeepCopy() + invalidRo.Spec.Strategy.Canary.TrafficRouting = &v1alpha1.RolloutTrafficRouting{ + Plugins: map[string]json.RawMessage{ + "any/plugin": {}, + }, + } + allErrs := ValidateRolloutStrategyCanary(invalidRo, field.NewPath("")) + assert.Equal(t, 0, len(allErrs)) + }) } diff --git a/pkg/kubectl-argo-rollouts/cmd/lint/lint_test.go b/pkg/kubectl-argo-rollouts/cmd/lint/lint_test.go index e9b66fd2ed..6f6d86a610 100644 --- a/pkg/kubectl-argo-rollouts/cmd/lint/lint_test.go +++ b/pkg/kubectl-argo-rollouts/cmd/lint/lint_test.go @@ -85,7 +85,7 @@ func TestLintInvalidRollout(t *testing.T) { }, { filename: "testdata/invalid-nginx-canary.yml", - errmsg: "Error: spec.strategy.steps[1].experiment.templates[0].weight: Invalid value: 20: Experiment template weight is only available for TrafficRouting with SMI, ALB, and Istio at this time\n", + errmsg: "Error: spec.strategy.steps[1].experiment.templates[0].weight: Invalid value: 20: Experiment template weight is only available for TrafficRouting with SMI, ALB, Istio and Plugins at this time\n", }, } From cb86d48e57d76ce51ed9765ac53e9bdd47028ca2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:47:20 -0500 Subject: [PATCH 22/36] chore(deps): bump actions/setup-go from 5.0.2 to 5.1.0 (#3912) Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.2 to 5.1.0. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v5.0.2...v5.1.0) --- updated-dependencies: - dependency-name: actions/setup-go 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> --- .github/workflows/gh-pages.yaml | 2 +- .github/workflows/go.yml | 6 +++--- .github/workflows/image-reuse.yaml | 2 +- .github/workflows/release.yaml | 4 ++-- .github/workflows/testing.yaml | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index bc0cb4d810..d2ef3a1c96 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -24,7 +24,7 @@ jobs: with: python-version: 3.x - name: Set up Go - uses: actions/setup-go@v5.0.2 + uses: actions/setup-go@v5.1.0 with: go-version: '1.22' - name: build diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b64dba1556..290d0f216a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go - uses: actions/setup-go@v5.0.2 + uses: actions/setup-go@v5.1.0 with: go-version: ${{ env.GOLANG_VERSION }} - name: Checkout code @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go - uses: actions/setup-go@v5.0.2 + uses: actions/setup-go@v5.1.0 with: go-version: ${{ env.GOLANG_VERSION }} id: go @@ -72,7 +72,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - name: Setup Golang - uses: actions/setup-go@v5.0.2 + uses: actions/setup-go@v5.1.0 with: go-version: ${{ env.GOLANG_VERSION }} # k8s codegen generates files into GOPATH location instead of the GitHub git checkout location diff --git a/.github/workflows/image-reuse.yaml b/.github/workflows/image-reuse.yaml index 165873dec4..ad43e96f6d 100644 --- a/.github/workflows/image-reuse.yaml +++ b/.github/workflows/image-reuse.yaml @@ -69,7 +69,7 @@ jobs: if: ${{ github.ref_type != 'tag'}} - name: Setup Golang - uses: actions/setup-go@v5.0.2 # v3.5.0 + uses: actions/setup-go@v5.1.0 # v3.5.0 with: go-version: ${{ inputs.go-version }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d250e7f4e9..6b0cca9833 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -90,7 +90,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Golang - uses: actions/setup-go@v5.0.2 # v4.0.1 + uses: actions/setup-go@v5.1.0 # v4.0.1 with: go-version: ${{ env.GOLANG_VERSION }} @@ -163,7 +163,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Golang - uses: actions/setup-go@v5.0.2 # v4.0.0 + uses: actions/setup-go@v5.1.0 # v4.0.0 with: go-version: ${{ env.GOLANG_VERSION }} diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 7122e8308b..d3b3d561f9 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -41,7 +41,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go - uses: actions/setup-go@v5.0.2 + uses: actions/setup-go@v5.1.0 with: go-version: ${{ env.GOLANG_VERSION }} id: go @@ -91,7 +91,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go - uses: actions/setup-go@v5.0.2 + uses: actions/setup-go@v5.1.0 with: go-version: '1.22' - uses: actions/checkout@v4 @@ -165,7 +165,7 @@ jobs: - test-e2e steps: - name: Set up Go - uses: actions/setup-go@v5.0.2 + uses: actions/setup-go@v5.1.0 with: go-version: ${{ env.GOLANG_VERSION }} id: go From 51b02adaba803ca6e4b43896006cb2adab85f7f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:47:46 -0500 Subject: [PATCH 23/36] chore(deps): bump github.com/hashicorp/go-plugin from 1.6.1 to 1.6.2 (#3908) Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.6.1 to 1.6.2. - [Release notes](https://github.com/hashicorp/go-plugin/releases) - [Changelog](https://github.com/hashicorp/go-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/go-plugin/compare/v1.6.1...v1.6.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-plugin 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> --- go.mod | 3 +-- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 28d378427b..2abf3b6eda 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/golang/protobuf v1.5.4 github.com/google/uuid v1.6.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-plugin v1.6.1 + github.com/hashicorp/go-plugin v1.6.2 github.com/influxdata/influxdb-client-go/v2 v2.14.0 github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 @@ -154,7 +154,6 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/go-testing-interface v1.0.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/spdystream v0.2.0 // indirect diff --git a/go.sum b/go.sum index 4f4fa44aee..058d99aa60 100644 --- a/go.sum +++ b/go.sum @@ -414,8 +414,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-plugin v1.6.1 h1:P7MR2UP6gNKGPp+y7EZw2kOiq4IR9WiqLvp0XOsVdwI= -github.com/hashicorp/go-plugin v1.6.1/go.mod h1:XPHFku2tFo3o3QKFgSYo+cghcUhw1NA1hZyMK0PWAw0= +github.com/hashicorp/go-plugin v1.6.2 h1:zdGAEd0V1lCaU0u+MxWQhtSDQmahpkwOun8U8EiRVog= +github.com/hashicorp/go-plugin v1.6.2/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q= github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= @@ -525,8 +525,6 @@ github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFW github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= From 9ea0de1f6e046a6f143434e4c6f7339a373a2612 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:57:17 +0000 Subject: [PATCH 24/36] chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.27.38 to 1.28.1 (#3917) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.38 to 1.28.1. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.38...config/v1.28.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config 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> --- go.mod | 20 ++++++++++---------- go.sum | 40 ++++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/go.mod b/go.mod index 2abf3b6eda..54f3b12878 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/argoproj/notifications-engine v0.4.1-0.20240219110818-7a069766e954 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.32.3 - github.com/aws/aws-sdk-go-v2/config v1.27.38 + github.com/aws/aws-sdk-go-v2/config v1.28.1 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.2 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3 github.com/aws/smithy-go v1.22.0 @@ -83,17 +83,17 @@ require ( github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.36 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.42 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.3 // indirect github.com/aws/aws-sdk-go-v2/service/sqs v1.29.7 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.23.2 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.31.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.32.3 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect diff --git a/go.sum b/go.sum index 058d99aa60..8bc2a57919 100644 --- a/go.sum +++ b/go.sum @@ -98,34 +98,34 @@ github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WN github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.32.3 h1:T0dRlFBKcdaUPGNtkBSwHZxrtis8CQU17UpNBZYd0wk= github.com/aws/aws-sdk-go-v2 v1.32.3/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= -github.com/aws/aws-sdk-go-v2/config v1.27.38 h1:mMVyJJuSUdbD4zKXoxDgWrgM60QwlFEg+JhihCq6wCw= -github.com/aws/aws-sdk-go-v2/config v1.27.38/go.mod h1:6xOiNEn58bj/64MPKx89r6G/el9JZn8pvVbquSqTKK4= -github.com/aws/aws-sdk-go-v2/credentials v1.17.36 h1:zwI5WrT+oWWfzSKoTNmSyeBKQhsFRJRv+PGW/UZW+Yk= -github.com/aws/aws-sdk-go-v2/credentials v1.17.36/go.mod h1:3AG/sY1rc9NJrNWcN/3KPU4SIDPGTrd/qegKB0TnFdE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 h1:UAsR3xA31QGf79WzpG/ixT9FZvQlh5HY1NRqSHBNOCk= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21/go.mod h1:JNr43NFf5L9YaG3eKTm7HQzls9J+A9YYcGI5Quh1r2Y= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 h1:6jZVETqmYCadGFvrYEQfC5fAQmlo80CeL5psbno6r0s= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21/go.mod h1:1SR0GbLlnN3QUmYaflZNiH1ql+1qrSiB2vwcJ+4UM60= +github.com/aws/aws-sdk-go-v2/config v1.28.1 h1:oxIvOUXy8x0U3fR//0eq+RdCKimWI900+SV+10xsCBw= +github.com/aws/aws-sdk-go-v2/config v1.28.1/go.mod h1:bRQcttQJiARbd5JZxw6wG0yIK3eLeSCPdg6uqmmlIiI= +github.com/aws/aws-sdk-go-v2/credentials v1.17.42 h1:sBP0RPjBU4neGpIYyx8mkU2QqLPl5u9cmdTWVzIpHkM= +github.com/aws/aws-sdk-go-v2/credentials v1.17.42/go.mod h1:FwZBfU530dJ26rv9saAbxa9Ej3eF/AK0OAY86k13n4M= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18 h1:68jFVtt3NulEzojFesM/WVarlFpCaXLKaBxDpzkQ9OQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18/go.mod h1:Fjnn5jQVIo6VyedMc0/EhPpfNlPl7dHV916O6B+49aE= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 h1:Jw50LwEkVjuVzE1NzkhNKkBf9cRN7MtE1F/b2cOKTUM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22/go.mod h1:Y/SmAyPcOTmpeVaWSzSKiILfXTVJwrGmYZhcRbhWuEY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 h1:981MHwBaRZM7+9QSR6XamDzF/o7ouUGxFzr+nVSIhrs= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22/go.mod h1:1RA1+aBEfn+CAB/Mh0MB6LsdCYCnjZm7tKXtnk499ZQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.2 h1:eMh+iBTF1CbpHMfiRvIaVm+rzrH1DOzuSFaR55O+bBo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.2/go.mod h1:/A4zNqF1+RS5RV+NNLKIzUX1KtK5SoWgf/OpiqrwmBo= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3 h1:Avh8YS+sgb2OKRht0wdNwY8tqtsCzVrmc8dG8Wfy9LI= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3/go.mod h1:HbtHaw/hnNPaiqcyYnheILVyn81wOZiX9n2gYF5tPmM= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.3 h1:qcxX0JYlgWH3hpPUnd6U0ikcl6LLA9sLkXE2w1fpMvY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.3/go.mod h1:cLSNEmI45soc+Ef8K/L+8sEA3A3pYFEYf5B5UI+6bH4= github.com/aws/aws-sdk-go-v2/service/sqs v1.29.7 h1:tRNrFDGRm81e6nTX5Q4CFblea99eAfm0dxXazGpLceU= github.com/aws/aws-sdk-go-v2/service/sqs v1.29.7/go.mod h1:8GWUDux5Z2h6z2efAtr54RdHXtLm8sq7Rg85ZNY/CZM= -github.com/aws/aws-sdk-go-v2/service/sso v1.23.2 h1:yzi/y/vKlLyzOfG7pSu5ONNGRxHIgLeDrV4w2AMRCo0= -github.com/aws/aws-sdk-go-v2/service/sso v1.23.2/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.2 h1:3gb6pYhYLjo8rB1h2Tqs61wpjRd3rQymYcVq/pp0yxI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.2/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= -github.com/aws/aws-sdk-go-v2/service/sts v1.31.2 h1:O6tyji8mXmBGsHvTCB0VIhrDw19lGTUSbKIyjnw79s8= -github.com/aws/aws-sdk-go-v2/service/sts v1.31.2/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.3 h1:UTpsIf0loCIWEbrqdLb+0RxnTXfWh2vhw4nQmFi4nPc= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.3/go.mod h1:FZ9j3PFHHAR+w0BSEjK955w5YD2UwB/l/H0yAK3MJvI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.3 h1:2YCmIXv3tmiItw0LlYf6v7gEHebLY45kBEnPezbUKyU= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.3/go.mod h1:u19stRyNPxGhj6dRm+Cdgu6N75qnbW7+QN0q0dsAk58= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.3 h1:wVnQ6tigGsRqSWDEEyH6lSAJ9OyFUsSnbaUWChuSGzs= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.3/go.mod h1:VZa9yTFyj4o10YGsmDO4gbQJUvvhY72fhumT8W4LqsE= github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= From 68afdbf9b06e4626bcd693cedc489b218b124098 Mon Sep 17 00:00:00 2001 From: Alexandre Gaudreault Date: Tue, 29 Oct 2024 10:08:32 -0700 Subject: [PATCH 25/36] docs: document canary step plugin (alpha) (#3906) * docs(plugins): document canary step plugin (alpha) Signed-off-by: Alexandre Gaudreault * add docs for step plugins Signed-off-by: Alexandre Gaudreault * mkdocs Signed-off-by: Alexandre Gaudreault * spell check Signed-off-by: Alexandre Gaudreault * review Signed-off-by: Alexandre Gaudreault --------- Signed-off-by: Alexandre Gaudreault --- docs/analysis/plugins.md | 44 +-- docs/features/{canary.md => canary/index.md} | 82 +++-- docs/features/canary/plugins.md | 168 ++++++++++ docs/features/specification.md | 335 ++++++++++--------- docs/features/traffic-management/plugins.md | 66 ++-- docs/plugins.md | 82 ++++- mkdocs.yml | 3 +- 7 files changed, 512 insertions(+), 268 deletions(-) rename docs/features/{canary.md => canary/index.md} (81%) create mode 100644 docs/features/canary/plugins.md diff --git a/docs/analysis/plugins.md b/docs/analysis/plugins.md index 4f3387b53b..46e2ee124f 100644 --- a/docs/analysis/plugins.md +++ b/docs/analysis/plugins.md @@ -1,14 +1,16 @@ # Metric Plugins -!!! important -Available since v1.5 - Status: Alpha +!!! warning "Alpha Feature (Since 1.5.0)" -Argo Rollouts supports getting analysis metrics via 3rd party plugin system. This allows users to extend the capabilities of Rollouts + This is an experimental, [alpha-quality](https://github.com/argoproj/argoproj/blob/main/community/feature-status.md#alpha) + feature that allows you to support metric providers that are not natively supported. + +Argo Rollouts supports getting analysis metrics via 3rd party [plugin system](../plugins.md). This allows users to extend the capabilities of Rollouts to support metric providers that are not natively supported. Rollout's uses a plugin library called [go-plugin](https://github.com/hashicorp/go-plugin) to do this. You can find a sample plugin here: [rollouts-plugin-metric-sample-prometheus](https://github.com/argoproj-labs/rollouts-plugin-metric-sample-prometheus) -## Using a Metric Plugin +## Installing There are two methods of installing and using an argo rollouts plugin. The first method is to mount up the plugin executable into the rollouts controller container. The second method is to use a HTTP(S) server to host the plugin executable. @@ -37,6 +39,19 @@ data: ### Using a HTTP(S) server to host the plugin executable +!!! warning "Installing a plugin with http(s)" + + Depending on which method you use to install and the plugin, there are some things to be aware of. + The rollouts controller will not start if it can not download or find the plugin executable. This means that if you are using + a method of installation that requires a download of the plugin and the server hosting the plugin for some reason is not available and the rollouts + controllers pod got deleted while the server was down or is coming up for the first time, it will not be able to start until + the server hosting the plugin is available again. + + Argo Rollouts will download the plugin at startup only once but if the pod is deleted it will need to download the plugin again on next startup. Running + Argo Rollouts in HA mode can help a little with this situation because each pod will download the plugin at startup. So if a single pod gets + deleted during a server outage, the other pods will still be able to take over because there will already be a plugin executable available to it. It is the + responsibility of the Argo Rollouts administrator to define the plugin installation method considering the risks of each approach. + Argo Rollouts supports downloading the plugin executable from a HTTP(S) server. To use this method, you will need to configure the controller via the `argo-rollouts-config` configmap and set `pluginLocation` to a http(s) url. Example: @@ -52,30 +67,15 @@ data: sha256: "dac10cbf57633c9832a17f8c27d2ca34aa97dd3d" #optional sha256 checksum of the plugin executable ``` -## Some words of caution - -Depending on which method you use to install and the plugin, there are some things to be aware of. -The rollouts controller will not start if it can not download or find the plugin executable. This means that if you are using -a method of installation that requires a download of the plugin and the server hosting the plugin for some reason is not available and the rollouts -controllers pod got deleted while the server was down or is coming up for the first time, it will not be able to start until -the server hosting the plugin is available again. - -Argo Rollouts will download the plugin at startup only once but if the pod is deleted it will need to download the plugin again on next startup. Running -Argo Rollouts in HA mode can help a little with this situation because each pod will download the plugin at startup. So if a single pod gets -deleted during a server outage, the other pods will still be able to take over because there will already be a plugin executable available to it. It is the -responsibility of the Argo Rollouts administrator to define the plugin installation method considering the risks of each approach. - ## List of Available Plugins (alphabetical order) -#### Add Your Plugin Here - -- If you have created a plugin, please submit a PR to add it to this list. +If you have created a plugin, please submit a PR to add it to this list. -#### [rollouts-plugin-metric-opensearch](https://github.com/selcukusta/rollouts-plugin-metric-opensearch) +### [rollouts-plugin-metric-opensearch](https://github.com/selcukusta/rollouts-plugin-metric-opensearch) - The application is an OpenSearch plugin designed for use with the Argo Rollouts plugin system. This plugin enables the integration of OpenSearch metrics into Argo Rollouts, allowing for advanced metric analysis and monitoring during application rollouts. -#### [rollouts-plugin-metric-sample-prometheus](https://github.com/argoproj-labs/rollouts-plugin-metric-sample-prometheus) +### [rollouts-plugin-metric-sample-prometheus](https://github.com/argoproj-labs/rollouts-plugin-metric-sample-prometheus) - This is just a sample plugin that can be used as a starting point for creating your own plugin. It is not meant to be used in production. It is based on the built-in prometheus provider. diff --git a/docs/features/canary.md b/docs/features/canary/index.md similarity index 81% rename from docs/features/canary.md rename to docs/features/canary/index.md index 4e3dab50c8..d14967ae69 100644 --- a/docs/features/canary.md +++ b/docs/features/canary/index.md @@ -1,15 +1,19 @@ # Canary Deployment Strategy + A canary rollout is a deployment strategy where the operator releases a new version of their application to a small percentage of the production traffic. ## Overview + Since there is no agreed upon standard for a canary deployment, the rollouts controller allows users to outline how they want to run their canary deployment. Users can define a list of steps the controller uses to manipulate the ReplicaSets when there is a change to the `.spec.template`. Each step will be evaluated before the new ReplicaSet is promoted to the stable version, and the old version is completely scaled down. -Each step can have one of two fields. The `setWeight` field dictates the percentage of traffic that should be sent to the canary, and the `pause` struct instructs the rollout to pause. When the controller reaches a `pause` step for a rollout, it will add a `PauseCondition` struct to the `.status.PauseConditions` field. If the `duration` field within the `pause` struct is set, the rollout will not progress to the next step until it has waited for the value of the `duration` field. Otherwise, the rollout will wait indefinitely until that Pause condition is removed. By using the `setWeight` and the `pause` fields, a user can declaratively describe how they want to progress to the new version. Below is an example of a canary strategy. +There are multiple steps available, the most basic ones are `setWeight` and `pause`. The `setWeight` field dictates the percentage of traffic that should be sent to the canary, and the `pause` step instructs the rollout to pause. When the controller reaches a `pause` step for a rollout, it will add a `PauseCondition` struct to the `.status.PauseConditions` field. If the `duration` field within the `pause` struct is set, the rollout will not progress to the next step until it has waited for the value of the `duration` field. Otherwise, the rollout will wait indefinitely until that Pause condition is removed. By using the `setWeight` and the `pause` fields, a user can declaratively describe how they want to progress to the new version. Below is an example of a canary strategy. !!! important - If the canary Rollout does not use [traffic management](traffic-management/index.md), the Rollout makes a best effort attempt to achieve the percentage listed in the last `setWeight` step between the new and old version. For example, if a Rollout has 10 Replicas and 10% for the first `setWeight` step, the controller will scale the new desired ReplicaSet to 1 replicas and the old stable ReplicaSet to 9. In the case where the setWeight is 41%, the Rollout attempts to get there by finding the whole number with the smallest delta, rounding up the calculation if the deltas are equals (i.e. the new ReplicaSet has 4 pods since 41% of 10 is closer to 4/10 than 5/10, and the old ReplicaSet has 6 pods). If a user wants to have more fine-grained control of the percentages without a large number of Replicas, that user should use the [traffic management](#trafficrouting) functionality. + + If the canary Rollout does not use [traffic management](traffic-management/index.md), the Rollout makes a best effort attempt to achieve the percentage listed in the last `setWeight` step between the new and old version. For example, if a Rollout has 10 Replicas and 10% for the first `setWeight` step, the controller will scale the new desired ReplicaSet to 1 replicas and the old stable ReplicaSet to 9. In the case where the setWeight is 41%, the Rollout attempts to get there by finding the whole number with the smallest delta, rounding up the calculation if the deltas are equals (i.e. the new ReplicaSet has 4 pods since 41% of 10 is closer to 4/10 than 5/10, and the old ReplicaSet has 6 pods). If a user wants to have more fine-grained control of the percentages without a large number of Replicas, that user should use the [traffic management](#trafficrouting) functionality. ## Example + ```yaml apiVersion: argoproj.io/v1alpha1 kind: Rollout @@ -26,25 +30,26 @@ spec: app: nginx spec: containers: - - name: nginx - image: nginx:1.15.4 - ports: - - containerPort: 80 + - name: nginx + image: nginx:1.15.4 + ports: + - containerPort: 80 minReadySeconds: 30 revisionHistoryLimit: 3 strategy: canary: #Indicates that the rollout should use the Canary strategy - maxSurge: "25%" + maxSurge: '25%' maxUnavailable: 0 steps: - - setWeight: 10 - - pause: - duration: 1h # 1 hour - - setWeight: 20 - - pause: {} # pause indefinitely + - setWeight: 10 + - pause: + duration: 1h # 1 hour + - setWeight: 20 + - pause: {} # pause indefinitely ``` ## Pause Duration + Pause duration can be specified with an optional time unit suffix. Valid time units are "s", "m", "h". Defaults to "s" if not specified. ```yaml @@ -52,11 +57,11 @@ spec: strategy: canary: steps: - - pause: { duration: 10 } # 10 seconds + - pause: { duration: 10 } # 10 seconds - pause: { duration: 10s } # 10 seconds - pause: { duration: 10m } # 10 minutes - pause: { duration: 10h } # 10 hours - - pause: {} # pause indefinitely + - pause: {} # pause indefinitely ``` If no `duration` is specified for a pause step, the rollout will be paused indefinitely. To unpause, use the [argo kubectl plugin](kubectl-plugin.md) `promote` command. @@ -81,31 +86,31 @@ match the traffic weight. Some use cases for this: the canary, while setWeight is still set to 0. 3. You wish to scale the canary up to 100%, in order to facilitate traffic shadowing. - !!! important + Setting canary scale is only available when using the canary strategy with a traffic router, since the basic canary needs to control canary scale in order to approximate canary weight. To control canary scales and weights during steps, use the `setCanaryScale` step and indicate which scale the the canary should use: -* explicit replica count without changing traffic weight (`replicas`) -* explicit weight percentage of total spec.replicas without changing traffic weight(`weight`) -* to or not to match current canary's `setWeight` step (`matchTrafficWeight: true or false`) +- explicit replica count without changing traffic weight (`replicas`) +- explicit weight percentage of total spec.replicas without changing traffic weight(`weight`) +- to or not to match current canary's `setWeight` step (`matchTrafficWeight: true or false`) ```yaml spec: strategy: canary: steps: - # explicit count - - setCanaryScale: - replicas: 3 - # a percentage of spec.replicas - - setCanaryScale: - weight: 25 - # matchTrafficWeight returns to the default behavior of matching the canary traffic weight - - setCanaryScale: - matchTrafficWeight: true + # explicit count + - setCanaryScale: + replicas: 3 + # a percentage of spec.replicas + - setCanaryScale: + weight: 25 + # matchTrafficWeight returns to the default behavior of matching the canary traffic weight + - setCanaryScale: + matchTrafficWeight: true ``` When using `setCanaryScale` with explicit values for either replicas or weight, one must be careful @@ -119,12 +124,12 @@ spec: strategy: canary: steps: - # 1 canary pod (10% of spec.replicas) - - setCanaryScale: - weight: 10 - # 90% of traffic to the 1 canary pod - - setWeight: 90 - - pause: {} + # 1 canary pod (10% of spec.replicas) + - setCanaryScale: + weight: 10 + # 90% of traffic to the 1 canary pod + - setWeight: 90 + - pause: {} ``` The above situation is caused by the changed behvaior of `setWeight` after `setCanaryScale`. To reset, set `matchTrafficWeight: true` and the `setWeight` behavior will be restored, i.e., subsequent `setWeight` will create canary replicas matching the traffic weight. @@ -132,6 +137,7 @@ The above situation is caused by the changed behvaior of `setWeight` after `setC ## Dynamic Stable Scale (with Traffic Routing) !!! important + Available since v1.1 When using traffic routing, by default the stable ReplicaSet is left scaled to 100% during the update. @@ -167,11 +173,12 @@ spec: abortScaleDownDelaySeconds: 600 ``` - ## Mimicking Rolling Update + If the `steps` field is omitted, the canary strategy will mimic the rolling update behavior. Similar to the deployment, the canary strategy has the `maxSurge` and `maxUnavailable` fields to configure how the Rollout should progress to the new version. ## Other Configurable Features + Here are the optional fields that will modify the behavior of canary strategy: ```yaml @@ -188,36 +195,43 @@ spec: ``` ### analysis + Configure the background [Analysis](analysis.md) to execute during the rollout. If the analysis is unsuccessful the rollout will be aborted. Defaults to nil ### antiAffinity + Check out the [Anti Affinity document](anti-affinity/anti-affinity.md) document for more information. Defaults to nil ### canaryService + `canaryService` references a Service that will be modified to send traffic to only the canary ReplicaSet. This allows users to only hit the canary ReplicaSet. Defaults to an empty string ### stableService + `stableService` the name of a Service which selects pods with stable version and doesn't select any pods with canary version. This allows users to only hit the stable ReplicaSet. Defaults to an empty string ### maxSurge + `maxSurge` defines the maximum number of replicas the rollout can create to move to the correct ratio set by the last setWeight. Max Surge can either be an integer or percentage as a string (i.e. "20%") Defaults to "25%". ### maxUnavailable + The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxSurge is 0. Defaults to 25% ### trafficRouting + The [traffic management](traffic-management/index.md) rules to apply to control the flow of traffic between the active and canary versions. If not set, the default weighted pod replica based routing will be used. Defaults to nil diff --git a/docs/features/canary/plugins.md b/docs/features/canary/plugins.md new file mode 100644 index 0000000000..a344801c40 --- /dev/null +++ b/docs/features/canary/plugins.md @@ -0,0 +1,168 @@ +# Canary Step Plugins + +!!! warning "Alpha Feature (Since 1.8.0)" + + This is an experimental, [alpha-quality](https://github.com/argoproj/argoproj/blob/main/community/feature-status.md#alpha) + feature that allows you to execute plugins during canary steps. + +Argo Rollouts supports getting step plugins via 3rd party [plugin system](../../plugins.md). This allows users to extend the capabilities of Rollouts +to support executing arbitrary steps during the canary. Rollout's uses a plugin library called +[go-plugin](https://github.com/hashicorp/go-plugin) to do this. + +## Installing + +There are two methods of installing and using an Argo Rollouts plugin. The first method is to mount up the plugin executable +into the rollouts controller container. The second method is to use a HTTP(S) server to host the plugin executable. + +### Mounting the plugin executable into the rollouts controller container + +There are a few ways to mount the plugin executable into the rollouts controller container. Some of these will depend on your +particular infrastructure. Here are a few methods: + +- Using an init container to download the plugin executable +- Using a Kubernetes volume mount with a shared volume such as NFS, EBS, etc. +- Building the plugin into the rollouts controller container + +Then you can use the ConfigMap to point to the plugin executable file location. Example: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: argo-rollouts-config +data: + stepPlugins: |- + - name: "argoproj-labs/sample-step" # name of the plugin, it must match the name required by the plugin so it can find it's configuration + location: "file://./my-custom-plugin" # supports http(s):// urls and file:// +``` + +### Using a HTTP(S) server to host the plugin executable + +!!! warning "Installing a plugin with http(s)" + + Depending on which method you use to install and the plugin, there are some things to be aware of. + The rollouts controller will not start if it can not download or find the plugin executable. This means that if you are using + a method of installation that requires a download of the plugin and the server hosting the plugin for some reason is not available and the rollouts + controllers pod got deleted while the server was down or is coming up for the first time, it will not be able to start until + the server hosting the plugin is available again. + + Argo Rollouts will download the plugin at startup only once but if the pod is deleted it will need to download the plugin again on next startup. Running + Argo Rollouts in HA mode can help a little with this situation because each pod will download the plugin at startup. So if a single pod gets + deleted during a server outage, the other pods will still be able to take over because there will already be a plugin executable available to it. It is the + responsibility of the Argo Rollouts administrator to define the plugin installation method considering the risks of each approach. + +Argo Rollouts supports downloading the plugin executable from a HTTP(S) server. To use this method, you will need to +configure the controller via the `argo-rollouts-config` ConfigMap and set `pluginLocation` to a http(s) url. Example: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: argo-rollouts-config +data: + stepPlugins: |- + - name: "argoproj-labs/sample-nginx" # name of the plugin, it must match the name required by the plugin so it can find it's configuration + location: "https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-sample-nginx/releases/download/v0.0.1/metric-plugin-linux-amd64" # supports http(s):// urls and file:// + sha256: "08f588b1c799a37bbe8d0fc74cc1b1492dd70b2c" # optional sha256 checksum of the plugin executable +``` + +### Disabling a plugin + +A step plugin that will execute during your Rollouts will fail the canary deployment whenever there is an unhandled error. +If a step plugin is used in multiple rollouts and is suddenly unstable, none of the rollouts will be able to progress. +To make the plugin less disruptive and the upgrades easier, you can use the `disabled` flag in the plugin configuration to +disable it globally. This will skip the plugin execution in every Rollout where it is configured, and progress to the next canary step. + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: argo-rollouts-config +data: + stepPlugins: |- + - name: "argoproj-labs/sample-nginx" + location: "https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-sample-nginx/releases/download/v0.0.1/metric-plugin-linux-amd64" + disabled: true # Skip all canary steps using this plugin because it may be faulty. +``` + +## Usage + +You can execute a configured step plugin at any point during your canary steps. +The plugin will be executed and the rollout step will be progressing until the plugin execution returns a status of +`Successful`, `Failed` or `Error`. Once completed, the rollout will progress to the next configured step. + +For the available plugin `config`, refer to each specific plugin documentation. + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: example-plugin-ro +spec: + strategy: + canary: + steps: + - plugin: + name: argoproj-labs/step-exec + config: + command: echo "hello world" +``` + +### Plugin Statuses + +To know the result of your plugin, you can use the `status.stepPluginStatuses[]` property to find the status that correspond to +your execution. Each status item is unique by `index`, `name` and `operation`. The `operation` can be one of the following: + +- `Run`: The main operation that execute the plugin. +- `Terminate`: The operation called on your plugin when the `Run` operation is still ongoing, but your rollout is aborted. +- `Abort`: The operation called on your plugin when it is aborted. This will be called for every `Successful` `Run` operation. + +## Implementation + +As a plugin developer, your step plugin should follow some conventions to make it predictable and easier to use. + +### Run operation + +The run operation is the method called on your plugin when executed. The operation can be called +**multiple times**. It is the responsibility of the plugin's implementation to validate if the desired +plugin actions were already taken or not. + +#### Long-running operations + +If the plugin needs to execute an operation that may take a long time, or poll for a result, it can return +early with a `Running` phase and a `RequeueAfter` duration. The controller will requeue the rollout and call the `Run` operation +again after the `RequeueAfter` has expired. The `Status` property on the return object can hold any information that would be +necessary to retrieve the state in subsequent executions. + +### Terminate operation + +If the `Run` operation returns with a `Running` phase and the rollout needs to cancel the execution, the controller will call the plugin's terminate method +with the state of the ongoing `Running` operation. The plugin can use this method to cancel any ongoing information. +This is often called if the rollout is fully promoted during a plugin execution. + +If the terminate operation has an error and fails, it will not be retried. The plugin should have a mechanism to cancel +suspiciously long-running operations if necessary. + +### Abort operation + +The abort operation will be called whenever a rollout is aborted and plugin step `Run` operation was `Successful` or currently `Running`. +The operation will be called in the reverse execution order with the existing state of the operation it is aborting. + +If the abort operation has an error and fails, it will not be retried. The plugin should have a mechanism to cancel +suspiciously long-running operations if necessary. + +### Returning errors + +The plugin can return an error for unhandled operations. In that case, the rollout will handle that error and apply a +backoff mechanism to retry the execution of the plugin until it returns `Successful` or `Failed` phase. When an error happens, the +`Status` returned by the plugin is not persisted, allowing it to retry later on the last known valid status. + +The controller will keep retrying until it succeeds, or the rollout is aborted. + +## List of Available Plugins (alphabetical order) + +If you have created a plugin, please submit a PR to add it to this list. + +### [plugin-name](#plugin-name) + +- Brief plugin description diff --git a/docs/features/specification.md b/docs/features/specification.md index ebe8f4ac69..c4e7b3c1d0 100644 --- a/docs/features/specification.md +++ b/docs/features/specification.md @@ -15,7 +15,7 @@ spec: # limits the number of successful analysis runs and experiments to be stored in a history # Defaults to 5. successfulRunHistoryLimit: 10 - # limits the number of unsuccessful analysis runs and experiments to be stored in a history. + # limits the number of unsuccessful analysis runs and experiments to be stored in a history. # Stages for unsuccessful: "Error", "Failed", "Inconclusive" # Defaults to 5. unsuccessfulRunHistoryLimit: 10 @@ -27,9 +27,9 @@ spec: matchLabels: app: guestbook - # WorkloadRef holds a references to a workload that provides Pod template + # WorkloadRef holds a references to a workload that provides Pod template # (e.g. Deployment). If used, then do not use Rollout template property. - workloadRef: + workloadRef: apiVersion: apps/v1 kind: Deployment name: rollout-ref-deployment @@ -42,12 +42,12 @@ spec: scaleDown: never|onsuccess|progressively # Template describes the pods that will be created. Same as deployment. - # If used, then do not use Rollout workloadRef property. + # If used, then do not use Rollout workloadRef property. template: spec: containers: - - name: guestbook - image: argoproj/rollouts-demo:blue + - name: guestbook + image: argoproj/rollouts-demo:blue # 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. @@ -83,7 +83,7 @@ spec: # its pods. Used by the `kubectl argo rollouts restart ROLLOUT` command. # The controller will ensure all pods have a creationTimestamp greater # than or equal to this value. - restartAt: "2020-03-30T21:19:35Z" + restartAt: '2020-03-30T21:19:35Z' # The rollback window provides a way to fast track deployments to # previously deployed versions. @@ -92,10 +92,8 @@ spec: revisions: 3 strategy: - # Blue-green update strategy blueGreen: - # Reference to service that the rollout modifies as the active service. # Required. activeService: active-service @@ -104,19 +102,19 @@ spec: # cutover. +optional prePromotionAnalysis: templates: - - templateName: success-rate + - templateName: success-rate args: - - name: service-name - value: guestbook-svc.default.svc.cluster.local + - name: service-name + value: guestbook-svc.default.svc.cluster.local # Post-promotion analysis run which performs analysis after the service # cutover. +optional postPromotionAnalysis: templates: - - templateName: success-rate + - templateName: success-rate args: - - name: service-name - value: guestbook-svc.default.svc.cluster.local + - name: service-name + value: guestbook-svc.default.svc.cluster.local # Name of the service that the rollout modifies as the preview service. # +optional @@ -158,13 +156,13 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: {} preferredDuringSchedulingIgnoredDuringExecution: weight: 1 # Between 1 - 100 - + # activeMetadata will be merged and updated in-place into the ReplicaSet's spec.template.metadata # of the active pods. +optional activeMetadata: labels: role: active - + # Metadata which will be attached to the preview pods only during their preview phase. # +optional previewMetadata: @@ -173,7 +171,6 @@ spec: # Canary update strategy canary: - # Reference to a service which the controller will update to select # canary pods. Required for traffic routing. canaryService: canary-service @@ -220,7 +217,7 @@ spec: # killed, new RC can be scaled up further, ensuring that total number # of pods running at any time during the update is at most 130% of # original pods. +optional - maxSurge: "20%" + maxSurge: '20%' # Adds a delay before scaling down the previous ReplicaSet when the # canary strategy is used with traffic routing (default 30 seconds). @@ -244,136 +241,141 @@ spec: # initial deploy of a rollout. +optional analysis: templates: - - templateName: success-rate + - templateName: success-rate args: - - name: service-name - value: guestbook-svc.default.svc.cluster.local - - # valueFrom.podTemplateHashValue is a convenience to supply the - # rollouts-pod-template-hash value of either the Stable ReplicaSet - # or the Latest ReplicaSet - - name: stable-hash - valueFrom: - podTemplateHashValue: Stable - - name: latest-hash - valueFrom: - podTemplateHashValue: Latest - - # valueFrom.fieldRef allows metadata about the rollout to be - # supplied as arguments to analysis. - - name: region - valueFrom: - fieldRef: - fieldPath: metadata.labels['region'] + - name: service-name + value: guestbook-svc.default.svc.cluster.local + + # valueFrom.podTemplateHashValue is a convenience to supply the + # rollouts-pod-template-hash value of either the Stable ReplicaSet + # or the Latest ReplicaSet + - name: stable-hash + valueFrom: + podTemplateHashValue: Stable + - name: latest-hash + valueFrom: + podTemplateHashValue: Latest + + # valueFrom.fieldRef allows metadata about the rollout to be + # supplied as arguments to analysis. + - name: region + valueFrom: + fieldRef: + fieldPath: metadata.labels['region'] # Steps define sequence of steps to take during an update of the # canary. Skipped upon initial deploy of a rollout. +optional steps: - - # Sets the ratio of canary ReplicaSet to 20% - - setWeight: 20 - - # Pauses the rollout for an hour. Supported units: s, m, h - - pause: - duration: 1h - - # Pauses indefinitely until manually resumed - - pause: {} - - # set canary scale to a explicit count without changing traffic weight - # (supported only with trafficRouting) - - setCanaryScale: - replicas: 3 - - # set canary scale to spec.Replica * (setweight / maxTrafficWeight) without changing traffic weight - # if maxTrafficWeight unspecified, it defaults to 100 - # (supported only with trafficRouting) - - setCanaryScale: - weight: 25 - - # set canary scale to match the canary traffic weight (default behavior) - - setCanaryScale: - matchTrafficWeight: true - - # Sets header based route with specified header values - # Setting header based route will send all traffic to the canary for the requests - # with a specified header, in this case request header "version":"2" - # (supported only with trafficRouting, for Istio only at the moment) - - setHeaderRoute: - # Name of the route that will be created by argo rollouts this must also be configured - # in spec.strategy.canary.trafficRouting.managedRoutes - name: "header-route-1" - # The matching rules for the header route, if this is missing it acts as a removal of the route. - match: - # headerName The name of the header to apply the match rules to. - - headerName: "version" - # headerValue must contain exactly one field of exact, regex, or prefix. Not all traffic routers support - # all types - headerValue: - # Exact will only match if the header value is exactly the same - exact: "2" - # Will match the rule if the regular expression matches - regex: "2.0.(.*)" - # prefix will be a prefix match of the header value - prefix: "2.0" - - # Sets up a mirror/shadow based route with the specified match rules - # The traffic will be mirrored at the configured percentage to the canary service - # during the rollout + # Sets the ratio of canary ReplicaSet to 20% + - setWeight: 20 + + # Pauses the rollout for an hour. Supported units: s, m, h + - pause: + duration: 1h + + # Pauses indefinitely until manually resumed + - pause: {} + + # set canary scale to a explicit count without changing traffic weight + # (supported only with trafficRouting) + - setCanaryScale: + replicas: 3 + + # set canary scale to spec.Replica * (setweight / maxTrafficWeight) without changing traffic weight + # if maxTrafficWeight unspecified, it defaults to 100 + # (supported only with trafficRouting) + - setCanaryScale: + weight: 25 + + # set canary scale to match the canary traffic weight (default behavior) + - setCanaryScale: + matchTrafficWeight: true + + # executes the configured plugin by name with the provided configuration + - plugin: + name: example + config: + key: value + + # Sets header based route with specified header values + # Setting header based route will send all traffic to the canary for the requests + # with a specified header, in this case request header "version":"2" # (supported only with trafficRouting, for Istio only at the moment) - - setMirrorRoute: - # Name of the route that will be created by argo rollouts this must also be configured - # in spec.strategy.canary.trafficRouting.managedRoutes - name: "header-route-1" - # The percentage of the matched traffic to mirror to the canary - percentage: 100 - # The matching rules for the header route, if this is missing it acts as a removal of the route. - # All conditions inside a single match block have AND semantics, while the list of match blocks have OR semantics. - # Each type within a match (method, path, headers) must have one and only one match type (exact, regex, prefix) - # Not all match types (exact, regex, prefix) will be supported by all traffic routers. - match: - - method: # What HTTP method to match - exact: "GET" - regex: "P.*" - prefix: "POST" - path: # What HTTP url paths to match. - exact: "/test" - regex: "/test/.*" - prefix: "/" - headers: - agent-1b: # What HTTP header name to use in the match. - exact: "firefox" - regex: "firefox2(.*)" - prefix: "firefox" - - # an inline analysis step - - analysis: - templates: - - templateName: success-rate - - # an inline experiment step - - experiment: - duration: 1h - templates: - - name: baseline - specRef: stable - # optional, creates a service for the experiment if set - service: - # optional, service: {} is also acceptable if name is not included - name: test-service - - name: canary - specRef: canary - # optional, set the weight of traffic routed to this version - weight: 10 - analyses: - - name : mann-whitney - templateName: mann-whitney - # Metadata which will be attached to the AnalysisRun. - analysisRunMetadata: - labels: - app.service.io/analysisType: smoke-test - annotations: - link.argocd.argoproj.io/external-link: http://my-loggin-platform.com/pre-generated-link + - setHeaderRoute: + # Name of the route that will be created by argo rollouts this must also be configured + # in spec.strategy.canary.trafficRouting.managedRoutes + name: 'header-route-1' + # The matching rules for the header route, if this is missing it acts as a removal of the route. + match: + # headerName The name of the header to apply the match rules to. + - headerName: 'version' + # headerValue must contain exactly one field of exact, regex, or prefix. Not all traffic routers support + # all types + headerValue: + # Exact will only match if the header value is exactly the same + exact: '2' + # Will match the rule if the regular expression matches + regex: '2.0.(.*)' + # prefix will be a prefix match of the header value + prefix: '2.0' + + # Sets up a mirror/shadow based route with the specified match rules + # The traffic will be mirrored at the configured percentage to the canary service + # during the rollout + # (supported only with trafficRouting, for Istio only at the moment) + - setMirrorRoute: + # Name of the route that will be created by argo rollouts this must also be configured + # in spec.strategy.canary.trafficRouting.managedRoutes + name: 'header-route-1' + # The percentage of the matched traffic to mirror to the canary + percentage: 100 + # The matching rules for the header route, if this is missing it acts as a removal of the route. + # All conditions inside a single match block have AND semantics, while the list of match blocks have OR semantics. + # Each type within a match (method, path, headers) must have one and only one match type (exact, regex, prefix) + # Not all match types (exact, regex, prefix) will be supported by all traffic routers. + match: + - method: # What HTTP method to match + exact: 'GET' + regex: 'P.*' + prefix: 'POST' + path: # What HTTP url paths to match. + exact: '/test' + regex: '/test/.*' + prefix: '/' + headers: + agent-1b: # What HTTP header name to use in the match. + exact: 'firefox' + regex: 'firefox2(.*)' + prefix: 'firefox' + + # an inline analysis step + - analysis: + templates: + - templateName: success-rate + + # an inline experiment step + - experiment: + duration: 1h + templates: + - name: baseline + specRef: stable + # optional, creates a service for the experiment if set + service: + # optional, service: {} is also acceptable if name is not included + name: test-service + - name: canary + specRef: canary + # optional, set the weight of traffic routed to this version + weight: 10 + analyses: + - name: mann-whitney + templateName: mann-whitney + # Metadata which will be attached to the AnalysisRun. + analysisRunMetadata: + labels: + app.service.io/analysisType: smoke-test + annotations: + link.argocd.argoproj.io/external-link: http://my-loggin-platform.com/pre-generated-link # Anti-affinity configuration between desired and previous ReplicaSet. # Only one must be specified. @@ -393,7 +395,7 @@ spec: # This is a list of routes that Argo Rollouts has the rights to manage it is currently only required for # setMirrorRoute and setHeaderRoute. The order of managedRoutes array also sets the precedence of the route # in the traffic router. Argo Rollouts will place these routes in the order specified above any routes already - # defined in the used traffic router if something exists. The names here must match the names from the + # defined in the used traffic router if something exists. The names here must match the names from the # setHeaderRoute and setMirrorRoute steps. managedRoutes: - name: set-header @@ -401,18 +403,18 @@ spec: # Istio traffic routing configuration istio: # Either virtualService or virtualServices can be configured. - virtualService: - name: rollout-vsvc # required - routes: - - primary # optional if there is a single route in VirtualService, required otherwise - virtualServices: - # One or more virtualServices can be configured - - name: rollouts-vsvc1 # required + virtualService: + name: rollout-vsvc # required routes: - primary # optional if there is a single route in VirtualService, required otherwise - - name: rollouts-vsvc2 # required - routes: - - secondary # optional if there is a single route in VirtualService, required otherwise + virtualServices: + # One or more virtualServices can be configured + - name: rollouts-vsvc1 # required + routes: + - primary # optional if there is a single route in VirtualService, required otherwise + - name: rollouts-vsvc2 # required + routes: + - secondary # optional if there is a single route in VirtualService, required otherwise # NGINX Ingress Controller routing configuration nginx: @@ -423,16 +425,16 @@ spec: - secondary-ingress - tertiary-ingress annotationPrefix: customingress.nginx.ingress.kubernetes.io # optional - additionalIngressAnnotations: # optional + additionalIngressAnnotations: # optional canary-by-header: X-Canary canary-by-header-value: iwantsit - canaryIngressAnnotations: # optional + canaryIngressAnnotations: # optional my-custom-annotation.mygroup.com/key: value # ALB Ingress Controller routing configuration alb: - ingress: ingress # required - servicePort: 443 # required + ingress: ingress # required + servicePort: 443 # required annotationPrefix: custom.alb.ingress.kubernetes.io # optional # Service Mesh Interface routing configuration @@ -447,16 +449,17 @@ spec: status: pauseConditions: - - reason: StepPause - startTime: 2019-10-00T1234 - - reason: BlueGreenPause - startTime: 2019-10-00T1234 - - reason: AnalysisRunInconclusive - startTime: 2019-10-00T1234 + - reason: StepPause + startTime: 2019-10-00T1234 + - reason: BlueGreenPause + startTime: 2019-10-00T1234 + - reason: AnalysisRunInconclusive + startTime: 2019-10-00T1234 ``` + ## Examples You can find examples of Rollouts at: - * The [example directory](https://github.com/argoproj/argo-rollouts/tree/master/examples) - * The [Argo Rollouts Demo application](https://github.com/argoproj/rollouts-demo) +- The [example directory](https://github.com/argoproj/argo-rollouts/tree/master/examples) +- The [Argo Rollouts Demo application](https://github.com/argoproj/rollouts-demo) diff --git a/docs/features/traffic-management/plugins.md b/docs/features/traffic-management/plugins.md index fe0dc22b19..51d982417a 100644 --- a/docs/features/traffic-management/plugins.md +++ b/docs/features/traffic-management/plugins.md @@ -1,14 +1,16 @@ # Traffic Router Plugins -!!! important - Available since v1.5 - Status: Alpha +!!! warning "Alpha Feature (Since 1.5.0)" -Argo Rollouts supports getting analysis metrics via 3rd party plugin system. This allows users to extend the capabilities of Rollouts -to support metric providers that are not natively supported. Rollout's uses a plugin library called + This is an experimental, [alpha-quality](https://github.com/argoproj/argoproj/blob/main/community/feature-status.md#alpha) + feature that allows you to supporttraffic router that are not natively supported. + +Argo Rollouts supports getting traffic router via 3rd party [plugin system](../../plugins.md). This allows users to extend the capabilities of Rollouts +to support traffic router that are not natively supported. Rollout's uses a plugin library called [go-plugin](https://github.com/hashicorp/go-plugin) to do this. You can find a sample plugin here: [rollouts-plugin-trafficrouter-sample-nginx](https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-sample-nginx) -## Using a Traffic Router Plugin +## Installing There are two methods of installing and using an argo rollouts plugin. The first method is to mount up the plugin executable into the rollouts controller container. The second method is to use a HTTP(S) server to host the plugin executable. @@ -18,9 +20,9 @@ into the rollouts controller container. The second method is to use a HTTP(S) se There are a few ways to mount the plugin executable into the rollouts controller container. Some of these will depend on your particular infrastructure. Here are a few methods: -* Using an init container to download the plugin executable -* Using a Kubernetes volume mount with a shared volume such as NFS, EBS, etc. -* Building the plugin into the rollouts controller container +- Using an init container to download the plugin executable +- Using a Kubernetes volume mount with a shared volume such as NFS, EBS, etc. +- Building the plugin into the rollouts controller container Then you can use the configmap to point to the plugin executable file location. Example: @@ -37,6 +39,19 @@ data: ### Using a HTTP(S) server to host the plugin executable +!!! warning "Installing a plugin with http(s)" + + Depending on which method you use to install and the plugin, there are some things to be aware of. + The rollouts controller will not start if it can not download or find the plugin executable. This means that if you are using + a method of installation that requires a download of the plugin and the server hosting the plugin for some reason is not available and the rollouts + controllers pod got deleted while the server was down or is coming up for the first time, it will not be able to start until + the server hosting the plugin is available again. + + Argo Rollouts will download the plugin at startup only once but if the pod is deleted it will need to download the plugin again on next startup. Running + Argo Rollouts in HA mode can help a little with this situation because each pod will download the plugin at startup. So if a single pod gets + deleted during a server outage, the other pods will still be able to take over because there will already be a plugin executable available to it. It is the + responsibility of the Argo Rollouts administrator to define the plugin installation method considering the risks of each approach. + Argo Rollouts supports downloading the plugin executable from a HTTP(S) server. To use this method, you will need to configure the controller via the `argo-rollouts-config` configmap and set `pluginLocation` to a http(s) url. Example: @@ -52,32 +67,23 @@ data: sha256: "08f588b1c799a37bbe8d0fc74cc1b1492dd70b2c" #optional sha256 checksum of the plugin executable ``` -## Some words of caution - -Depending on which method you use to install and the plugin, there are some things to be aware of. -The rollouts controller will not start if it can not download or find the plugin executable. This means that if you are using -a method of installation that requires a download of the plugin and the server hosting the plugin for some reason is not available and the rollouts -controllers pod got deleted while the server was down or is coming up for the first time, it will not be able to start until -the server hosting the plugin is available again. +## List of Available Plugins (alphabetical order) -Argo Rollouts will download the plugin at startup only once but if the pod is deleted it will need to download the plugin again on next startup. Running -Argo Rollouts in HA mode can help a little with this situation because each pod will download the plugin at startup. So if a single pod gets -deleted during a server outage, the other pods will still be able to take over because there will already be a plugin executable available to it. It is the -responsibility of the Argo Rollouts administrator to define the plugin installation method considering the risks of each approach. +If you have created a plugin, please submit a PR to add it to this list. -## List of Available Plugins (alphabetical order) +### [rollouts-plugin-trafficrouter-sample-nginx](https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-sample-nginx) -#### Add Your Plugin Here -* If you have created a plugin, please submit a PR to add it to this list. -#### [rollouts-plugin-trafficrouter-sample-nginx](https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-sample-nginx) -* This is just a sample plugin that can be used as a starting point for creating your own plugin. +- This is just a sample plugin that can be used as a starting point for creating your own plugin. It is not meant to be used in production. It is based on the built-in prometheus provider. -#### [Consul](https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-consul) -* This is a plugin that allows argo-rollouts to work with Consul's service mesh for traffic shaping patterns. +### [Consul](https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-consul) + +- This is a plugin that allows argo-rollouts to work with Consul's service mesh for traffic shaping patterns. + +### [Contour](https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-contour) + +- This is a plugin that allows argo-rollouts to work with contour's resource: HTTPProxy. It enables traffic shaping patterns such as canary releases and more. -#### [Contour](https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-contour) -* This is a plugin that allows argo-rollouts to work with contour's resource: HTTPProxy. It enables traffic shaping patterns such as canary releases and more. +### [Gateway API](https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/) -#### [Gateway API](https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/) -* Provide support for Gateway API, which includes Kuma, Traefix, cilium, Contour, Gloo Gateway, HAProxy, and [many others](https://gateway-api.sigs.k8s.io/implementations/#implementation-status). +- Provide support for Gateway API, which includes Kuma, Traefix, cilium, Contour, GloodMesh, HAProxy, and [many others](https://gateway-api.sigs.k8s.io/implementations/#implementation-status). diff --git a/docs/plugins.md b/docs/plugins.md index 901bc79878..bc6eca7d1e 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -11,7 +11,6 @@ Here is an overview of how plugins are loaded: [![Loading of plugins](contributing-assets/plugin-loading.png)](contributing-assets/plugin-loading.png) - The communication protocol uses golang built in net/rpc library so plugins have to be written in golang. ## Plugin Repository @@ -28,7 +27,7 @@ types to exist such as `/nginx` and `/nginx`. These names could be b as `argoproj-labs/rollouts-plugin-metric-sample-prometheus` but it is not a requirement. There will also be a standard for naming repositories under argoproj-labs in the form of `rollouts-plugin--` -where `` is say `metric`, or `trafficrouter` and `` is the software the plugin is for say nginx. +where `` is one of `metric`, `step`, or `trafficrouter` and `` is the software the plugin is for, say nginx. ## Plugin Name @@ -55,13 +54,28 @@ data: args: - "--log-level" - "debug" + stepPlugins: |- + - name: "argoproj-labs/canary-step" + location: "file:///tmp/argo-rollouts/canary-step-plugin" + disabled: false + args: + - "--log-level" + - "debug" ``` -As you can see there is a field called `name:` under both `metrics` or `trafficrouters` this is the first place where your +As you can see there is a field called `name:` under each plugin type. This is the first place where your end users will need to configure the name of the plugin. The second `location` is either in the rollout object or the analysis template which you can see the examples below. The third `args` holds the command line arguments of the plugin. -#### AnalysisTemplate Example +### Configuration Examples + +#### AnalysisTemplate + +You can see that we use the plugin name under `spec.metrics[].provider.plugin` for analysis template. + +You, as a plugin author, can then put any configuration you need under `argoproj-labs/metrics` and you will be able to +look up that config in your plugin via the plugin name key. You will also want to document what configuration options your plugin supports. + ```yaml apiVersion: argoproj.io/v1alpha1 kind: AnalysisTemplate @@ -77,7 +91,13 @@ spec: address: http://prometheus.local ``` -#### Traffic Router Example +#### Traffic Router + +You can see that we use the plugin name under `spec.strategy.canary.trafficRouting.plugins` for traffic routers. + +You, as a plugin author, can then put any configuration you need under `argoproj-labs/metrics` and you will be able to +look up that config in your plugin via the plugin name key. You will also want to document what configuration options your plugin supports. + ```yaml apiVersion: argoproj.io/v1alpha1 kind: Rollout @@ -94,18 +114,36 @@ spec: stableIngress: canary-demo ``` -You can see that we use the plugin name under `spec.metrics[].provider.plugin` for analysis template and `spec.strategy.canary.trafficRouting.plugins` -for traffic routers. You as a plugin author can then put any configuration you need under `argoproj-labs/nginx` and you will be able to -look up that config in your plugin via the plugin name key. You will also want to document what configuration options your plugin supports. +#### Step Plugin + +You can see that we use the plugin name under `spec.strategy.canary.steps[].plugin.name` for canary steps. + +You, as a plugin author, can then put any configuration you need in the plugin object under `config` property and you will receive it +as an arguments when your plugin is called. You will also want to document what configuration options your plugin supports. + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: example-plugin-ro +spec: + strategy: + canary: + steps: + - plugin: + name: argoproj-labs/step-exec + config: + command: echo "hello world" +``` ## Plugin Interfaces -Argo Rollouts currently supports two plugin systems as a plugin author your end goal is to implement these interfaces as -a hashicorp go-plugin. The two interfaces are `MetricsPlugin` and `TrafficRouterPlugin` for each of the respective plugins: +Argo Rollouts currently supports three plugin systems. As a plugin author, your end goal is to implement at least one of these interfaces as +a hashicorp go-plugin. The interfaces are `MetricsPlugin`, `TrafficRouterPlugin` and `StepPlugin` for each of the respective plugins: ```go type MetricProviderPlugin interface { - // InitPlugin initializes the traffic router plugin this gets called once when the plugin is loaded. + // InitPlugin initializes the traffic router plugin. This gets called once when the plugin is loaded. InitPlugin() RpcError // Run start a new external system call for a measurement // Should be idempotent and do nothing if a call has already been started @@ -124,7 +162,7 @@ type MetricProviderPlugin interface { } type TrafficRouterPlugin interface { - // InitPlugin initializes the traffic router plugin this gets called once when the plugin is loaded. + // InitPlugin initializes the traffic router plugin. This gets called once when the plugin is loaded. InitPlugin() RpcError // UpdateHash informs a traffic routing reconciler about new canary, stable, and additionalDestination(s) pod hashes UpdateHash(rollout *v1alpha1.Rollout, canaryHash, stableHash string, additionalDestinations []v1alpha1.WeightDestination) RpcError @@ -142,6 +180,19 @@ type TrafficRouterPlugin interface { // Type returns the type of the traffic routing reconciler Type() string } + +type StepPlugin interface { + // InitPlugin initializes the canary step plugin. This gets called once when the plugin is loaded. + InitPlugin() RpcError + // Run executes a step plugin for the RpcStepContext and returns the result to the controller or an RpcError for unexpeted failures + Run(*v1alpha1.Rollout, *RpcStepContext) (RpcStepResult, RpcError) + // Terminate stops an uncompleted operation started by the Run operation + Terminate(*v1alpha1.Rollout, *RpcStepContext) (RpcStepResult, RpcError) + // Abort reverts the actions performed during the Run operation if necessary + Abort(*v1alpha1.Rollout, *RpcStepContext) (RpcStepResult, RpcError) + // Type returns the type of the step plugin + Type() string +} ``` ## Plugin Init Function @@ -161,7 +212,8 @@ for the plugin to use. This will probably affect traffic router plugins more tha ## Sample Plugins -There are two sample plugins within the argo-rollouts repo that you can use as a reference for creating your own plugin. +There are sample plugins within the argo-rollouts repo that you can use as a reference for creating your own plugin. -* [Metrics Plugin Sample](https://github.com/argoproj/argo-rollouts/tree/master/test/cmd/metrics-plugin-sample) -* [Traffic Router Plugin Sample](https://github.com/argoproj/argo-rollouts/tree/master/test/cmd/trafficrouter-plugin-sample) +- [Metrics Plugin Sample](https://github.com/argoproj/argo-rollouts/tree/master/test/cmd/metrics-plugin-sample) +- [Traffic Router Plugin Sample](https://github.com/argoproj/argo-rollouts/tree/master/test/cmd/trafficrouter-plugin-sample) +- [Step Plugin Sample](https://github.com/argoproj/argo-rollouts/tree/master/test/cmd/step-plugin-sample) diff --git a/mkdocs.yml b/mkdocs.yml index 71ed4e9f70..d0ef5b0cd9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -32,8 +32,9 @@ nav: - Rollout: - Deployment Strategies: - BlueGreen: features/bluegreen.md - - Canary: features/canary.md + - Canary: features/canary/index.md - Rollout Spec: features/specification.md + - Canary Step Plugin: features/canary/plugins.md - HPA: features/hpa-support.md - VPA: features/vpa-support.md - Ephemeral Metadata: features/ephemeral-metadata.md From 8bd36d813b6a813b09846d63304eb435005ecf52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sel=C3=A7uk=20Usta?= Date: Thu, 31 Oct 2024 15:42:36 +0300 Subject: [PATCH 26/36] docs(analysis): plugin url is changed and redirected to argoproj-labs project (#3922) update docs/analysis/plugins.md Signed-off-by: selcukusta --- docs/analysis/plugins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/analysis/plugins.md b/docs/analysis/plugins.md index 46e2ee124f..82f63183ad 100644 --- a/docs/analysis/plugins.md +++ b/docs/analysis/plugins.md @@ -71,7 +71,7 @@ data: If you have created a plugin, please submit a PR to add it to this list. -### [rollouts-plugin-metric-opensearch](https://github.com/selcukusta/rollouts-plugin-metric-opensearch) +### [rollouts-plugin-metric-opensearch](https://github.com/argoproj-labs/rollouts-plugin-metric-opensearch) - The application is an OpenSearch plugin designed for use with the Argo Rollouts plugin system. This plugin enables the integration of OpenSearch metrics into Argo Rollouts, allowing for advanced metric analysis and monitoring during application rollouts. From 7d3627d66918ecbbe769ae57c6cca9f8ff338051 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:04:02 -0500 Subject: [PATCH 27/36] chore(deps): bump softprops/action-gh-release from 2.0.8 to 2.0.9 (#3928) Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.0.8 to 2.0.9. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/c062e08bd532815e2082a85e87e3ef29c3e6d191...e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8) --- updated-dependencies: - dependency-name: softprops/action-gh-release 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> --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6b0cca9833..8f540af5bb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -107,7 +107,7 @@ jobs: make manifests IMAGE_TAG=${{ github.ref_name }} - name: Draft release - uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v0.1.15 + uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v0.1.15 with: tag_name: ${{ github.event.inputs.tag }} draft: true @@ -212,7 +212,7 @@ jobs: /tmp/sbom.tar.gz - name: Upload SBOM and signature assets - uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v0.1.15 + uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v0.1.15 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 3296d6d6519946ba2de253960dbe332949067577 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:04:26 -0500 Subject: [PATCH 28/36] chore(deps): bump github.com/newrelic/newrelic-client-go/v2 from 2.48.2 to 2.50.1 (#3924) chore(deps): bump github.com/newrelic/newrelic-client-go/v2 Bumps [github.com/newrelic/newrelic-client-go/v2](https://github.com/newrelic/newrelic-client-go) from 2.48.2 to 2.50.1. - [Release notes](https://github.com/newrelic/newrelic-client-go/releases) - [Changelog](https://github.com/newrelic/newrelic-client-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/newrelic/newrelic-client-go/compare/v2.48.2...v2.50.1) --- updated-dependencies: - dependency-name: github.com/newrelic/newrelic-client-go/v2 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> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 54f3b12878..84c6a09921 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 github.com/mitchellh/mapstructure v1.5.0 - github.com/newrelic/newrelic-client-go/v2 v2.48.2 + github.com/newrelic/newrelic-client-go/v2 v2.50.1 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.18.0 github.com/prometheus/client_model v0.6.1 diff --git a/go.sum b/go.sum index 8bc2a57919..0fd106cb69 100644 --- a/go.sum +++ b/go.sum @@ -554,8 +554,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/newrelic/newrelic-client-go/v2 v2.48.2 h1:Pd8/ADdidF/dISMCy9B2UHvcD11lnj4Use6j++OOEf4= -github.com/newrelic/newrelic-client-go/v2 v2.48.2/go.mod h1:pDFY24/6iIMEbPIdowTRrRn9YYwkXc3j+B+XpTb4oF4= +github.com/newrelic/newrelic-client-go/v2 v2.50.1 h1:xwRjfxXO1ZvQc4mvy52lNm60jsx4/YtIBxx9mvw7u38= +github.com/newrelic/newrelic-client-go/v2 v2.50.1/go.mod h1:+RRjI3nDGWT3kLm9Oi3QxpBm70uu8q1upEHBVWCZFpo= github.com/nlopes/slack v0.5.0/go.mod h1:jVI4BBK3lSktibKahxBF74txcK2vyvkza1z/+rRnVAM= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= From 15c723fd81a7d523a313995b4709ac52fb65dab1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:04:44 -0500 Subject: [PATCH 29/36] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.42.2 to 1.42.3 (#3923) 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.42.2 to 1.42.3. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.42.2...service/emr/v1.42.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> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 84c6a09921..8b70e89e26 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.32.3 github.com/aws/aws-sdk-go-v2/config v1.28.1 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.2 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.3 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3 github.com/aws/smithy-go v1.22.0 github.com/blang/semver v3.5.1+incompatible diff --git a/go.sum b/go.sum index 0fd106cb69..a9dec5fca6 100644 --- a/go.sum +++ b/go.sum @@ -110,8 +110,8 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 h1:981MHwBaRZM7+9QSR6 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22/go.mod h1:1RA1+aBEfn+CAB/Mh0MB6LsdCYCnjZm7tKXtnk499ZQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.2 h1:eMh+iBTF1CbpHMfiRvIaVm+rzrH1DOzuSFaR55O+bBo= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.2/go.mod h1:/A4zNqF1+RS5RV+NNLKIzUX1KtK5SoWgf/OpiqrwmBo= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.3 h1:C6oS3hSFIB1ydz3dhgkZ0HyzWV41qVjNxS/mA0AGLMQ= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.3/go.mod h1:OXYzq1k1XwhwghGdHASEDeFr0Ij8dyFRaIy6w0yrIms= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3 h1:Avh8YS+sgb2OKRht0wdNwY8tqtsCzVrmc8dG8Wfy9LI= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3/go.mod h1:HbtHaw/hnNPaiqcyYnheILVyn81wOZiX9n2gYF5tPmM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= From 53c4f12d66620e9224d3810489b94cfe8f35b054 Mon Sep 17 00:00:00 2001 From: Dylan Schlager <62440614+schlags@users.noreply.github.com> Date: Sat, 2 Nov 2024 18:50:29 -0700 Subject: [PATCH 30/36] fix: remove condition where header routes can stay directed at empty service in preemption (#3898) * fix: remove condition where header routes can stay directed at empty service in preemption Signed-off-by: Dylan Schlager * add unit test Signed-off-by: Dylan Schlager * lint Signed-off-by: Dylan Schlager --------- Signed-off-by: Dylan Schlager --- rollout/trafficrouting.go | 9 ++++ rollout/trafficrouting_test.go | 88 ++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) diff --git a/rollout/trafficrouting.go b/rollout/trafficrouting.go index 3ed2564760..eef25e1c1c 100644 --- a/rollout/trafficrouting.go +++ b/rollout/trafficrouting.go @@ -198,6 +198,15 @@ func (c *rolloutContext) reconcileTrafficRouting() error { } else if c.newRS == nil || c.newRS.Status.AvailableReplicas == 0 { // when newRS is not available or replicas num is 0. never weight to canary weightDestinations = append(weightDestinations, c.calculateWeightDestinationsFromExperiment()...) + // If a user changes their mind in the middle of an V1 -> V2 update, and then applies a V3 + // there might have been a V2 ReplicaSet that was scaled up, but is now defunct. + // During the V2 rollout, managed routes could have been setup and would continue + // to direct traffic to the canary service which is now in front of 0 available replicas. + // We want to remove these managed routes alongside the safety here of never weighting to the canary. + err := reconciler.RemoveManagedRoutes() + if err != nil { + return err + } } else if c.rollout.Status.PromoteFull { // on a promote full, desired stable weight should be 0 (100% to canary), // But we can only increase canary weight according to available replica counts of the canary. diff --git a/rollout/trafficrouting_test.go b/rollout/trafficrouting_test.go index bc8a0a7672..288430f7a6 100644 --- a/rollout/trafficrouting_test.go +++ b/rollout/trafficrouting_test.go @@ -33,8 +33,10 @@ import ( traefikMocks "github.com/argoproj/argo-rollouts/rollout/trafficrouting/traefik/mocks" testutil "github.com/argoproj/argo-rollouts/test/util" "github.com/argoproj/argo-rollouts/utils/conditions" + ingressutil "github.com/argoproj/argo-rollouts/utils/ingress" istioutil "github.com/argoproj/argo-rollouts/utils/istio" logutil "github.com/argoproj/argo-rollouts/utils/log" + replicasetutil "github.com/argoproj/argo-rollouts/utils/replicaset" timeutil "github.com/argoproj/argo-rollouts/utils/time" ) @@ -1343,3 +1345,89 @@ func TestDontWeightToZeroWhenDynamicallyRollingBackToStable(t *testing.T) { rs1Updated := f.getUpdatedReplicaSet(scaleUpIndex) assert.Equal(t, int32(10), *rs1Updated.Spec.Replicas) } + +// TestDontWeightOrHaveManagedRoutesDuringInterruptedUpdate builds off of TestCanaryDontScaleDownOldRsDuringInterruptedUpdate +// in canary_test when we scale down an intermediate V2 ReplicaSet when applying a V3 spec in the middle of updating. +// We want to make sure that traffic routing is cleared in both weight AND managed routes when the V2 rs is +// nil or has 0 available replicas. +func TestDontWeightOrHaveManagedRoutesDuringInterruptedUpdate(t *testing.T) { + f := newFixture(t) + defer f.Close() + + steps := []v1alpha1.CanaryStep{ + { + SetHeaderRoute: &v1alpha1.SetHeaderRoute{ + Name: "test-header", + Match: []v1alpha1.HeaderRoutingMatch{ + { + HeaderName: "test", + HeaderValue: &v1alpha1.StringMatch{ + Exact: "test", + }, + }, + }, + }, + }, + { + SetWeight: pointer.Int32(90), + }, + { + Pause: &v1alpha1.RolloutPause{}, + }, + } + r1 := newCanaryRollout("foo", 5, nil, steps, pointer.Int32Ptr(1), intstr.FromInt(1), intstr.FromInt(0)) + r1.Spec.Strategy.Canary.TrafficRouting = &v1alpha1.RolloutTrafficRouting{ + ALB: &v1alpha1.ALBTrafficRouting{ + Ingress: "test-ingress", + }, + ManagedRoutes: []v1alpha1.MangedRoutes{ + {Name: "test-header"}, + }, + } + + r1.Spec.Strategy.Canary.StableService = "stable-svc" + r1.Spec.Strategy.Canary.CanaryService = "canary-svc" + r2 := bumpVersion(r1) + r3 := bumpVersion(r2) + + stableSvc := newService("stable-svc", 80, map[string]string{v1alpha1.DefaultRolloutUniqueLabelKey: r1.Status.CurrentPodHash}, r1) + canarySvc := newService("canary-svc", 80, map[string]string{v1alpha1.DefaultRolloutUniqueLabelKey: r3.Status.CurrentPodHash}, r3) + r3.Status.StableRS = r1.Status.CurrentPodHash + + ingress := newIngress("test-ingress", canarySvc, stableSvc) + ingress.Spec.Rules[0].HTTP.Paths[0].Backend.ServiceName = stableSvc.Name + + rs1 := newReplicaSetWithStatus(r1, 5, 5) + rs2 := newReplicaSetWithStatus(r2, 5, 5) + rs3 := newReplicaSetWithStatus(r3, 5, 0) + r3.Status.Canary.Weights = &v1alpha1.TrafficWeights{ + Canary: v1alpha1.WeightDestination{ + PodTemplateHash: replicasetutil.GetPodTemplateHash(rs2), + }, + } + + f.objects = append(f.objects, r3) + f.kubeobjects = append(f.kubeobjects, rs1, rs2, rs3, canarySvc, stableSvc, ingress) + f.replicaSetLister = append(f.replicaSetLister, rs1, rs2, rs3) + f.serviceLister = append(f.serviceLister, canarySvc, stableSvc) + f.ingressLister = append(f.ingressLister, ingressutil.NewLegacyIngress(ingress)) + + f.expectPatchRolloutAction(r3) + f.run(getKey(r3, t)) + + r3.Status.Canary.Weights = &v1alpha1.TrafficWeights{ + Canary: v1alpha1.WeightDestination{ + PodTemplateHash: replicasetutil.GetPodTemplateHash(rs3), + }, + } + + f.expectUpdateReplicaSetAction(rs3) + f.run(getKey(r3, t)) + + // Make sure that our weight is zero + assert.Equal(t, int32(0), r3.Status.Canary.Weights.Canary.Weight) + assert.Equal(t, replicasetutil.GetPodTemplateHash(rs3), r3.Status.Canary.Weights.Canary.PodTemplateHash) + // Make sure that RemoveManagedRoutes was called + f.fakeTrafficRouting.AssertCalled(t, "RemoveManagedRoutes", mock.Anything, mock.Anything) + +} From e0968a9287773bc7afb61a1cee359b372d3a6a85 Mon Sep 17 00:00:00 2001 From: Yusuke Abe Date: Thu, 14 Nov 2024 14:32:23 +0900 Subject: [PATCH 31/36] chore: update the link of DCO in PR template (#3944) chore: update the link of DCO Signed-off-by: chansuke --- .github/pull_request_template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 33da74335a..384a49caf5 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,7 +2,7 @@ Checklist: * [ ] Either (a) I've created an [enhancement proposal](https://github.com/argoproj/argo-rollouts/issues/new/choose) and discussed it with the community, (b) this is a bug fix, or (c) this is a chore. * [ ] The title of the PR is (a) [conventional](https://www.conventionalcommits.org/en/v1.0.0/) with a list of types and scopes found [here](https://github.com/argoproj/argo-rollouts/blob/master/.github/workflows/pr-title-check.yml), (b) states what changed, and (c) suffixes the related issues number. E.g. `"fix(controller): Updates such and such. Fixes #1234"`. -* [ ] I've signed my commits with [DCO](https://github.com/argoproj/argoproj) +* [ ] I've signed my commits with [DCO](https://github.com/argoproj/argoproj/blob/main/community/CONTRIBUTING.md#legal) * [ ] I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged. * [ ] My builds are green. Try syncing with master if they are not. -* [ ] My organization is added to [USERS.md](https://github.com/argoproj/argo-rollouts/blob/master/USERS.md). \ No newline at end of file +* [ ] My organization is added to [USERS.md](https://github.com/argoproj/argo-rollouts/blob/master/USERS.md). From 7a63088ab27e10149d72f851f1fcd7231657dac0 Mon Sep 17 00:00:00 2001 From: Jahvon Dockery Date: Thu, 14 Nov 2024 00:32:44 -0500 Subject: [PATCH 32/36] docs: add CarGurus to users.md (#3940) Signed-off-by: Jahvon Dockery --- USERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/USERS.md b/USERS.md index 0cd5f2c882..13af9b9400 100644 --- a/USERS.md +++ b/USERS.md @@ -12,6 +12,7 @@ Organizations below are **officially** using Argo Rollouts. Please send a PR wit 1. [Bucketplace](https://www.bucketplace.co.kr/) 1. [BukuKas](https://bukukas.co.id/) 1. [Calm](https://www.calm.com/) +1. [CarGurus](https://www.cargurus.com/) 1. [CircleCI](https://circleci.com/) 1. [Cloudflare](https://cloudflare.com/) 1. [Codefresh](https://codefresh.io/) From 8ff3d0d77af6a5b098ef5a389e7e7240b2972631 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 22:33:03 -0700 Subject: [PATCH 33/36] chore(deps): bump github.com/newrelic/newrelic-client-go/v2 from 2.50.1 to 2.51.3 (#3939) chore(deps): bump github.com/newrelic/newrelic-client-go/v2 Bumps [github.com/newrelic/newrelic-client-go/v2](https://github.com/newrelic/newrelic-client-go) from 2.50.1 to 2.51.3. - [Release notes](https://github.com/newrelic/newrelic-client-go/releases) - [Changelog](https://github.com/newrelic/newrelic-client-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/newrelic/newrelic-client-go/compare/v2.50.1...v2.51.3) --- updated-dependencies: - dependency-name: github.com/newrelic/newrelic-client-go/v2 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> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8b70e89e26..ccc0b2f265 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/juju/ansiterm v1.0.0 github.com/machinebox/graphql v0.2.2 github.com/mitchellh/mapstructure v1.5.0 - github.com/newrelic/newrelic-client-go/v2 v2.50.1 + github.com/newrelic/newrelic-client-go/v2 v2.51.3 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.18.0 github.com/prometheus/client_model v0.6.1 diff --git a/go.sum b/go.sum index a9dec5fca6..eaeaa35933 100644 --- a/go.sum +++ b/go.sum @@ -554,8 +554,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/newrelic/newrelic-client-go/v2 v2.50.1 h1:xwRjfxXO1ZvQc4mvy52lNm60jsx4/YtIBxx9mvw7u38= -github.com/newrelic/newrelic-client-go/v2 v2.50.1/go.mod h1:+RRjI3nDGWT3kLm9Oi3QxpBm70uu8q1upEHBVWCZFpo= +github.com/newrelic/newrelic-client-go/v2 v2.51.3 h1:Bu/cUs6nfMjQMPBcxxHt4Xm30tKDT7ttYy/XRDsWP6Y= +github.com/newrelic/newrelic-client-go/v2 v2.51.3/go.mod h1:+RRjI3nDGWT3kLm9Oi3QxpBm70uu8q1upEHBVWCZFpo= github.com/nlopes/slack v0.5.0/go.mod h1:jVI4BBK3lSktibKahxBF74txcK2vyvkza1z/+rRnVAM= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= From b899cf57f03a8d9474f5b57e602f722396ca58ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 22:33:23 -0700 Subject: [PATCH 34/36] chore(deps): bump softprops/action-gh-release from 2.0.9 to 2.1.0 (#3938) Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.0.9 to 2.1.0. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8...01570a1f39cb168c169c802c3bceb9e93fb10974) --- updated-dependencies: - dependency-name: softprops/action-gh-release 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> --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8f540af5bb..adb413e4b7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -107,7 +107,7 @@ jobs: make manifests IMAGE_TAG=${{ github.ref_name }} - name: Draft release - uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v0.1.15 + uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v0.1.15 with: tag_name: ${{ github.event.inputs.tag }} draft: true @@ -212,7 +212,7 @@ jobs: /tmp/sbom.tar.gz - name: Upload SBOM and signature assets - uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v0.1.15 + uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v0.1.15 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 1a055658272c4c1145c165f606aed15ae6ac96d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 22:33:40 -0700 Subject: [PATCH 35/36] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.42.3 to 1.42.4 (#3935) 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.42.3 to 1.42.4. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/emr/v1.42.3...service/emr/v1.42.4) --- 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> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index ccc0b2f265..f66af27a6d 100644 --- a/go.mod +++ b/go.mod @@ -8,9 +8,9 @@ require ( github.com/antonmedv/expr v1.15.5 github.com/argoproj/notifications-engine v0.4.1-0.20240219110818-7a069766e954 github.com/argoproj/pkg v0.13.6 - github.com/aws/aws-sdk-go-v2 v1.32.3 + github.com/aws/aws-sdk-go-v2 v1.32.4 github.com/aws/aws-sdk-go-v2/config v1.28.1 - github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.3 + github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.4 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3 github.com/aws/smithy-go v1.22.0 github.com/blang/semver v3.5.1+incompatible @@ -85,8 +85,8 @@ require ( github.com/aws/aws-sdk-go v1.44.116 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.42 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.3 // indirect diff --git a/go.sum b/go.sum index eaeaa35933..204858a3ed 100644 --- a/go.sum +++ b/go.sum @@ -96,22 +96,22 @@ github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z github.com/aws/aws-sdk-go v1.44.39/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go-v2 v1.32.3 h1:T0dRlFBKcdaUPGNtkBSwHZxrtis8CQU17UpNBZYd0wk= -github.com/aws/aws-sdk-go-v2 v1.32.3/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= +github.com/aws/aws-sdk-go-v2 v1.32.4 h1:S13INUiTxgrPueTmrm5DZ+MiAo99zYzHEFh1UNkOxNE= +github.com/aws/aws-sdk-go-v2 v1.32.4/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= github.com/aws/aws-sdk-go-v2/config v1.28.1 h1:oxIvOUXy8x0U3fR//0eq+RdCKimWI900+SV+10xsCBw= github.com/aws/aws-sdk-go-v2/config v1.28.1/go.mod h1:bRQcttQJiARbd5JZxw6wG0yIK3eLeSCPdg6uqmmlIiI= github.com/aws/aws-sdk-go-v2/credentials v1.17.42 h1:sBP0RPjBU4neGpIYyx8mkU2QqLPl5u9cmdTWVzIpHkM= github.com/aws/aws-sdk-go-v2/credentials v1.17.42/go.mod h1:FwZBfU530dJ26rv9saAbxa9Ej3eF/AK0OAY86k13n4M= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18 h1:68jFVtt3NulEzojFesM/WVarlFpCaXLKaBxDpzkQ9OQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18/go.mod h1:Fjnn5jQVIo6VyedMc0/EhPpfNlPl7dHV916O6B+49aE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 h1:Jw50LwEkVjuVzE1NzkhNKkBf9cRN7MtE1F/b2cOKTUM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22/go.mod h1:Y/SmAyPcOTmpeVaWSzSKiILfXTVJwrGmYZhcRbhWuEY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 h1:981MHwBaRZM7+9QSR6XamDzF/o7ouUGxFzr+nVSIhrs= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22/go.mod h1:1RA1+aBEfn+CAB/Mh0MB6LsdCYCnjZm7tKXtnk499ZQ= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 h1:A2w6m6Tmr+BNXjDsr7M90zkWjsu4JXHwrzPg235STs4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23/go.mod h1:35EVp9wyeANdujZruvHiQUAo9E3vbhnIO1mTCAxMlY0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 h1:pgYW9FCabt2M25MoHYCfMrVY2ghiiBKYWUVXfwZs+sU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23/go.mod h1:c48kLgzO19wAu3CPkDWC28JbaJ+hfQlsdl7I2+oqIbk= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.3 h1:C6oS3hSFIB1ydz3dhgkZ0HyzWV41qVjNxS/mA0AGLMQ= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.3/go.mod h1:OXYzq1k1XwhwghGdHASEDeFr0Ij8dyFRaIy6w0yrIms= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.4 h1:c60zN18a3zQsBWdwE/v5xhK2Mtl1HG1gj9BLIEFxjWc= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.4/go.mod h1:fkETEwhdw2tOqu5m0Xa3wimV3PLDaiGqNrVZ3MJ7zOc= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3 h1:Avh8YS+sgb2OKRht0wdNwY8tqtsCzVrmc8dG8Wfy9LI= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3/go.mod h1:HbtHaw/hnNPaiqcyYnheILVyn81wOZiX9n2gYF5tPmM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= From 5f59344adfcae42cdb0ac941a876311a9ee49045 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 22:33:57 -0700 Subject: [PATCH 36/36] chore(deps): bump github.com/aws/aws-sdk-go-v2 from 1.32.3 to 1.32.4 (#3934) Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.32.3 to 1.32.4. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.32.3...v1.32.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 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>