From 8ecb09316b48199e1da1f33118bf2a4f8edfccb1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Apr 2023 08:59:29 -0500 Subject: [PATCH 1/5] chore(deps): bump codecov/codecov-action from 3.1.1 to 3.1.2 (#2711) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.1 to 3.1.2. - [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/v3.1.1...v3.1.2) --- updated-dependencies: - dependency-name: codecov/codecov-action 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/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index afe53e0365..fb1e1911f3 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -90,7 +90,7 @@ jobs: path: coverage.out - name: Upload code coverage information to codecov.io - uses: codecov/codecov-action@v3.1.1 + uses: codecov/codecov-action@v3.1.2 with: file: coverage.out From b9fbc9b20300939b749a21e50bbd775d491bc7b1 Mon Sep 17 00:00:00 2001 From: mitchell amihod Date: Thu, 13 Apr 2023 09:48:53 -0400 Subject: [PATCH 2/5] docs(analysis): fix use stringData in the examples (#2715) Use stringData in the examples resolves #2714 Signed-off-by: mitchell amihod <4623+meeech@users.noreply.github.com> --- docs/analysis/datadog.md | 4 ++-- docs/analysis/influxdb.md | 2 +- docs/analysis/newrelic.md | 4 ++-- docs/analysis/wavefront.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/analysis/datadog.md b/docs/analysis/datadog.md index 7cc0534eda..8a80064914 100644 --- a/docs/analysis/datadog.md +++ b/docs/analysis/datadog.md @@ -40,10 +40,10 @@ kind: Secret metadata: name: datadog type: Opaque -data: +stringData: address: https://api.datadoghq.com api-key: app-key: ``` -`apiVersion` here is different from the `apiVersion` from the Datadog configuration above. \ No newline at end of file +`apiVersion` here is different from the `apiVersion` from the Datadog configuration above. diff --git a/docs/analysis/influxdb.md b/docs/analysis/influxdb.md index f4bd95345e..5e0fbe6a63 100644 --- a/docs/analysis/influxdb.md +++ b/docs/analysis/influxdb.md @@ -34,7 +34,7 @@ kind: Secret metadata: name: influxdb type: Opaque -data: +stringData: address: authToken: org: diff --git a/docs/analysis/newrelic.md b/docs/analysis/newrelic.md index b71b661f84..81afad9b75 100644 --- a/docs/analysis/newrelic.md +++ b/docs/analysis/newrelic.md @@ -33,7 +33,7 @@ kind: Secret metadata: name: newrelic type: Opaque -data: +stringData: personal-api-key: account-id: region: "us" # optional, defaults to "us" if not set. Only set to "eu" if you use EU New Relic @@ -47,7 +47,7 @@ kind: Secret metadata: name: newrelic type: Opaque -data: +stringData: personal-api-key: account-id: region: "us" # optional, defaults to "us" if not set. Only set to "eu" if you use EU New Relic diff --git a/docs/analysis/wavefront.md b/docs/analysis/wavefront.md index f7c8f57d91..e22630dd06 100644 --- a/docs/analysis/wavefront.md +++ b/docs/analysis/wavefront.md @@ -35,7 +35,7 @@ kind: Secret metadata: name: wavefront-api-tokens type: Opaque -data: +stringData: example1.wavefront.com: example2.wavefront.com: ``` From 4cecf3484d2dcc1fcd4bb5c02dd3a594399246a1 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Fri, 14 Apr 2023 12:47:03 -0500 Subject: [PATCH 3/5] docs: fix link to plugins for traffic routers (#2719) fix docs link Signed-off-by: zachaller --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index f8159bd5d9..c7cdabc426 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -51,7 +51,7 @@ nav: - AWS ALB: features/traffic-management/alb.md - Istio: features/traffic-management/istio.md - NGINX: features/traffic-management/nginx.md - - Plugins: traffic-management/plugins.md + - Plugins: features/traffic-management/plugins.md - SMI: features/traffic-management/smi.md - Traefik: features/traffic-management/traefik.md - Analysis: From c250c7e8ea733efce9082ad19c23b81a5e6bda63 Mon Sep 17 00:00:00 2001 From: mitchell amihod Date: Sat, 15 Apr 2023 01:42:12 -0400 Subject: [PATCH 4/5] refactor: change plugin naming pattern #2720 (#2722) Update docs to reflect new plugin naming pattern * update contributor plugin guide * update analysis/plugin overview * update trafic-management/plugin overview * automatic linting changes - whitespace, new line at end of file Signed-off-by: mitchell amihod <4623+meeech@users.noreply.github.com> #2720 --- docs/analysis/plugins.md | 18 +++++------ docs/features/traffic-management/plugins.md | 6 ++-- docs/plugins.md | 34 ++++++++++----------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/analysis/plugins.md b/docs/analysis/plugins.md index 8b718bf136..89f8f7a782 100644 --- a/docs/analysis/plugins.md +++ b/docs/analysis/plugins.md @@ -2,10 +2,10 @@ !!! important 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 +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 -[go-plugin](https://github.com/hashicorp/go-plugin) to do this. You can find a sample plugin -here: [rollouts-sample_prometheus-metric-plugin](https://github.com/argoproj-labs/rollouts-sample_prometheus-metric-plugin) +[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 @@ -36,7 +36,7 @@ data: ### Using a HTTP(S) server to host the plugin executable -Argo Rollouts supports downloading the plugin executable from a HTTP(S) server. To use this method, you will need to +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 @@ -47,7 +47,7 @@ metadata: data: metricProviderPlugins: |- - name: "argoproj-labs/sample-prometheus" # 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-sample_prometheus-metric-plugin/releases/download/v0.0.4/metric-plugin-linux-amd64" # supports http(s):// urls and file:// + location: "https://github.com/argoproj-labs/rollouts-plugin-metric-sample-prometheus/releases/download/v0.0.4/metric-plugin-linux-amd64" # supports http(s):// urls and file:// sha256: "dac10cbf57633c9832a17f8c27d2ca34aa97dd3d" #optional sha256 checksum of the plugin executable ``` @@ -56,18 +56,18 @@ data: 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 +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 +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. -#### [rollouts-sample_prometheus-metric-plugin](https://github.com/argoproj-labs/rollouts-sample_prometheus-metric-plugin) - * This is just a sample plugin that can be used as a starting point for creating your own plugin. +#### [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/traffic-management/plugins.md b/docs/features/traffic-management/plugins.md index b211ca75d0..f0d1634ee3 100644 --- a/docs/features/traffic-management/plugins.md +++ b/docs/features/traffic-management/plugins.md @@ -5,7 +5,7 @@ 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 [go-plugin](https://github.com/hashicorp/go-plugin) to do this. You can find a sample plugin -here: [rollouts-sample_nginx-trafficrouter-plugin](https://github.com/argoproj-labs/rollouts-sample_nginx-trafficrouter-plugin) +here: [rollouts-plugin-trafficrouter-sample-nginx](https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-sample-nginx) ## Using a Traffic Router Plugin @@ -47,7 +47,7 @@ metadata: data: trafficRouterPlugins: |- - 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-sample_nginx-trafficrouter-plugin/releases/download/v0.0.1/metric-plugin-linux-amd64" # supports http(s):// urls and file:// + 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 ``` @@ -68,6 +68,6 @@ responsibility of the Argo Rollouts administrator to define the plugin installat #### Add Your Plugin Here * If you have created a plugin, please submit a PR to add it to this list. -#### [rollouts-sample_nginx-trafficrouter-plugin](https://github.com/argoproj-labs/rollouts-sample_nginx-trafficrouter-plugin) +#### [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. It is not meant to be used in production. It is based on the built-in prometheus provider. diff --git a/docs/plugins.md b/docs/plugins.md index 794ec8157f..ce3a1770ee 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -2,7 +2,7 @@ ## High Level Overview -Argo Rollouts plugins depend on hashicorp's [go-plugin](https://github.com/hashicorp/go-plugin) library. This library +Argo Rollouts plugins depend on hashicorp's [go-plugin](https://github.com/hashicorp/go-plugin) library. This library provides a way for a plugin to be compiled as a standalone executable and then loaded by the rollouts controller at runtime. This works by having the plugin executable act as a rpc server and the rollouts controller act as a client. The plugin executable is started by the rollouts controller and is a long-lived process and that the rollouts controller connects to over a unix socket. @@ -11,22 +11,22 @@ The communication protocol uses golang built in net/rpc library so plugins have ## Plugin Repository In order to get plugins listed in the main argo rollouts documentation we ask that the plugin repository be created under -the [argoproj-labs](https://github.com/argoproj-labs) organization. Please open an issue under argo-rollouts requesting a -repo which you would be granted admin access on. +the [argoproj-labs](https://github.com/argoproj-labs) organization. Please open an issue under argo-rollouts requesting a +repo which you would be granted admin access on. -There is also a standard naming convention for plugin names used for configmap registration, as well as what the plugin -uses for locating its specific configuration on rollout or analysis resources. The name needs to be in the form of -`/` and both and have a regular expression check that matches Github's requirements -for `username/org` and `repository name`. This requirement is in place to help with allowing multiple creators of the same plugin -types to exist such as `/nginx` and `/nginx`. These names could be based of the repo name such -as `argoproj-labs/rollouts-sample_prometheus-metric-plugin` but it is not a requirement. +There is also a standard naming convention for plugin names used for configmap registration, as well as what the plugin +uses for locating its specific configuration on rollout or analysis resources. The name needs to be in the form of +`/` and both and have a regular expression check that matches Github's requirements +for `username/org` and `repository name`. This requirement is in place to help with allowing multiple creators of the same plugin +types to exist such as `/nginx` and `/nginx`. These names could be based of the repo name such +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` +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. ## Plugin Name -So now that we have an idea on plugin naming and repository standards let's pick a name to use for the rest of this +So now that we have an idea on plugin naming and repository standards let's pick a name to use for the rest of this documentation and call our plugin `argoproj-labs/nginx`. This name will be used in a few different spots the first is the config map that your plugin users will need to configure. @@ -134,17 +134,17 @@ type TrafficRouterPlugin interface { ## Plugin Init Function -Each plugin interface has a `InitPlugin` function, this function is called when the plugin is first started up and is only called -once per startup. The `InitPlugin` function is used as a means to initialize the plugin it gives you the plugin author the ability -to either set up a client for a specific metrics provider or in the case of a traffic router construct a client or informer +Each plugin interface has a `InitPlugin` function, this function is called when the plugin is first started up and is only called +once per startup. The `InitPlugin` function is used as a means to initialize the plugin it gives you the plugin author the ability +to either set up a client for a specific metrics provider or in the case of a traffic router construct a client or informer for kubernetes api. The one thing to note about this though is because these calls happen over RPC the plugin author should not depend on state being stored in the plugin struct as it will not be persisted between calls. ## Kubernetes RBAC The plugin runs as a child process of the rollouts controller and as such it will inherit the same RBAC permissions as the -controller. This means that the service account for the rollouts controller will need the correct permissions for the plugin -to function. This might mean instructing users to create a role and role binding to the standard rollouts service account +controller. This means that the service account for the rollouts controller will need the correct permissions for the plugin +to function. This might mean instructing users to create a role and role binding to the standard rollouts service account for the plugin to use. This will probably affect traffic router plugins more than metrics plugins. ## Sample Plugins @@ -152,4 +152,4 @@ for the plugin to use. This will probably affect traffic router plugins more tha There are two sample plugins within the argo-rollouts repo that you can use as a reference for creating your own plugin. * [Sample Metrics Plugin](https://github.com/argoproj/argo-rollouts/tree/master/test/cmd/sample-metrics-plugin) -* [Sample Traffic Router Plugin](https://github.com/argoproj/argo-rollouts/tree/master/test/cmd/sample-trafficrouter-plugin) \ No newline at end of file +* [Sample Traffic Router Plugin](https://github.com/argoproj/argo-rollouts/tree/master/test/cmd/sample-trafficrouter-plugin) From e7e45f7dffabe19e7a35609620320f3f975ffaf4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 15 Apr 2023 00:43:01 -0500 Subject: [PATCH 5/5] chore(deps): bump github.com/prometheus/client_golang from 1.14.0 to 1.15.0 (#2721) chore(deps): bump github.com/prometheus/client_golang Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.14.0 to 1.15.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.14.0...v1.15.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang 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 | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 08c086a04c..3f1d99f46c 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/newrelic/newrelic-client-go v1.1.0 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.14.0 + github.com/prometheus/client_golang v1.15.0 github.com/prometheus/client_model v0.3.0 github.com/prometheus/common v0.42.0 github.com/prometheus/common/sigv4 v0.1.0 @@ -157,7 +157,7 @@ require ( github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.13 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/russross/blackfriday v1.6.0 // indirect github.com/slack-go/slack v0.12.1 // indirect github.com/spf13/pflag v1.0.5 // indirect diff --git a/go.sum b/go.sum index 9cb34f6be0..653ab25fa8 100644 --- a/go.sum +++ b/go.sum @@ -616,8 +616,8 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -796,8 +796,8 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= +github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -822,8 +822,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/quobyte/api v0.1.8/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=