diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 2c7c565e2d..df0ad28776 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -82,19 +82,23 @@ jobs: echo "::set-output name=platform-matrix::$PLATFORM_MATRIX" - name: Build and push (controller-image) - uses: docker/build-push-action@v3 + uses: docker/build-push-action@37abcedcc1da61a57767b7588cb9d03eb57e28b3 # v3.3.0 with: platforms: ${{ steps.platform-matrix.outputs.platform-matrix }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.controller-meta.outputs.tags }} + provenance: false + sbom: false - name: Build and push (plugin-image) - uses: docker/build-push-action@v3 + uses: docker/build-push-action@37abcedcc1da61a57767b7588cb9d03eb57e28b3 # v3.3.0 with: target: kubectl-argo-rollouts platforms: ${{ steps.platform-matrix.outputs.platform-matrix }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.plugin-meta.outputs.tags }} + provenance: false + sbom: false - name: Install cosign uses: sigstore/cosign-installer@main diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c12aa0e050..0cd7613791 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -138,8 +138,6 @@ jobs: run: | make go-mod-vendor make codegen - make manifests - make docs - name: Ensure nothing changed run: git diff --exit-code diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2b65ec1d26..8794e839d9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -84,21 +84,25 @@ jobs: password: ${{ secrets.QUAY_ROBOT_TOKEN }} - name: Build and push (controller-image) - uses: docker/build-push-action@v3 + uses: docker/build-push-action@37abcedcc1da61a57767b7588cb9d03eb57e28b3 # v3.3.0 with: context: . platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.controller-meta.outputs.tags }} + provenance: false + sbom: false - name: Build and push (plugin-image) - uses: docker/build-push-action@v3 + uses: docker/build-push-action@37abcedcc1da61a57767b7588cb9d03eb57e28b3 # v3.3.0 with: context: . target: kubectl-argo-rollouts platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.plugin-meta.outputs.tags }} + provenance: false + sbom: false release-artifacts: diff --git a/.gitignore b/.gitignore index 5f6219dc82..db184381d6 100644 --- a/.gitignore +++ b/.gitignore @@ -13,8 +13,6 @@ junit.xml rerunreport.txt site/ vendor/ -# generated -docs/generated # static server/static/* -!server/static/.gitkeep \ No newline at end of file +!server/static/.gitkeep diff --git a/Dockerfile b/Dockerfile index c2809aba6b..b157734f99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN cd ${GOPATH}/src/dummy && \ #################################################################################################### # UI build stage #################################################################################################### -FROM --platform=$BUILDPLATFORM docker.io/library/node:12.18.4 as argo-rollouts-ui +FROM --platform=$BUILDPLATFORM docker.io/library/node:18 as argo-rollouts-ui WORKDIR /src ADD ["ui/package.json", "ui/yarn.lock", "./"] diff --git a/Makefile b/Makefile index 3f5126d912..6442844ac9 100644 --- a/Makefile +++ b/Makefile @@ -96,7 +96,7 @@ install-toolchain: install-go-tools-local install-protoc-local # generates all auto-generated code .PHONY: codegen -codegen: go-mod-vendor gen-proto gen-k8scodegen gen-openapi gen-mocks gen-crd manifests +codegen: go-mod-vendor gen-proto gen-k8scodegen gen-openapi gen-mocks gen-crd manifests docs # generates all files related to proto files .PHONY: gen-proto diff --git a/USERS.md b/USERS.md index bc49f539d5..b58b00a5fa 100644 --- a/USERS.md +++ b/USERS.md @@ -25,6 +25,7 @@ Organizations below are **officially** using Argo Rollouts. Please send a PR wit 1. [OpsMx](https://opsmx.io) 1. [OpsVerse](https://opsverse.io) 1. [Optum](https://www.optum.com) +1. [Outreach](https://www.outreach.io) 1. [PagerDuty](https://www.pagerduty.com/) 1. [PayPal](https://www.paypal.com/) 1. [PayPay](https://paypay.ne.jp/) diff --git a/docs/features/experiment.md b/docs/features/experiment.md index 6740895d68..b282f3b18b 100644 --- a/docs/features/experiment.md +++ b/docs/features/experiment.md @@ -6,7 +6,7 @@ The Experiment CRD allows users to have ephemeral runs of one or more ReplicaSet running ephemeral ReplicaSets, the Experiment CRD can launch AnalysisRuns alongside the ReplicaSets. Generally, those AnalysisRun is used to confirm that new ReplicaSets are running as expected. -A Service routing traffic to the Experiment ReplicaSet is also generated. +A Service routing traffic to the Experiment ReplicaSet is also generated if a weight for that experiment is set. ## Use cases of Experiments @@ -245,7 +245,7 @@ to `experiment-baseline`, leaving the remaining 90% of traffic to the old stack. !!! note When a weighted experiment step with traffic routing is used, a - Service is auto-created for each experiment template. The traffic routers use + service is auto-created for each experiment template. The traffic routers use this service to send traffic to the experiment pods. By default, the generated Service has the name of the ReplicaSet and inherits diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts.md new file mode 100644 index 0000000000..4e2bcc21f4 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts.md @@ -0,0 +1,76 @@ +# Rollouts + +Manage argo rollouts + +## Synopsis + +This command consists of multiple subcommands which can be used to manage Argo Rollouts. + +```shell +kubectl argo rollouts COMMAND [flags] +``` + +## Examples + +```shell +# Get guestbook rollout and watch progress +kubectl argo rollouts get rollout guestbook -w + +# Pause the guestbook rollout +kubectl argo rollouts pause guestbook + +# Promote the guestbook rollout +kubectl argo rollouts promote guestbook + +# Abort the guestbook rollout +kubectl argo rollouts abort guestbook + +# Retry the guestbook rollout +kubectl argo rollouts retry guestbook +``` + +## Options + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + -h, --help help for kubectl-argo-rollouts + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## Available Commands + +* [rollouts abort](kubectl-argo-rollouts_abort.md) - Abort a rollout +* [rollouts completion](kubectl-argo-rollouts_completion.md) - Generate completion script +* [rollouts create](kubectl-argo-rollouts_create.md) - Create a Rollout, Experiment, AnalysisTemplate, ClusterAnalysisTemplate, or AnalysisRun resource +* [rollouts dashboard](kubectl-argo-rollouts_dashboard.md) - Start UI dashboard +* [rollouts get](kubectl-argo-rollouts_get.md) - Get details about rollouts and experiments +* [rollouts lint](kubectl-argo-rollouts_lint.md) - Lint and validate a Rollout +* [rollouts list](kubectl-argo-rollouts_list.md) - List rollouts or experiments +* [rollouts notifications](kubectl-argo-rollouts_notifications.md) - Set of CLI commands that helps manage notifications settings +* [rollouts pause](kubectl-argo-rollouts_pause.md) - Pause a rollout +* [rollouts promote](kubectl-argo-rollouts_promote.md) - Promote a rollout +* [rollouts restart](kubectl-argo-rollouts_restart.md) - Restart the pods of a rollout +* [rollouts retry](kubectl-argo-rollouts_retry.md) - Retry a rollout or experiment +* [rollouts set](kubectl-argo-rollouts_set.md) - Update various values on resources +* [rollouts status](kubectl-argo-rollouts_status.md) - Show the status of a rollout +* [rollouts terminate](kubectl-argo-rollouts_terminate.md) - Terminate an AnalysisRun or Experiment +* [rollouts undo](kubectl-argo-rollouts_undo.md) - Undo a rollout +* [rollouts version](kubectl-argo-rollouts_version.md) - Print version + diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_abort.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_abort.md new file mode 100644 index 0000000000..f022a09b65 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_abort.md @@ -0,0 +1,55 @@ +# Rollouts Abort + +Abort a rollout + +## Synopsis + +This command stops progressing the current rollout and reverts all steps. The previous ReplicaSet will be active. + +Note the 'spec.template' still represents the new rollout version. If the Rollout leaves the aborted state, it will try to go to the new version. +Updating the 'spec.template' back to the previous version will fully revert the rollout. + +```shell +kubectl argo rollouts abort ROLLOUT_NAME [flags] +``` + +## Examples + +```shell +# Abort a rollout +kubectl argo rollouts abort guestbook +``` + +## Options + +``` + -h, --help help for abort +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_completion.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_completion.md new file mode 100644 index 0000000000..a22b057163 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_completion.md @@ -0,0 +1,83 @@ +# Rollouts Completion + +Generate completion script + +## Synopsis + +To load completions: + + Bash: + + $ source <(yourprogram completion bash) + + # To load completions for each session, execute once: + # Linux: + $ yourprogram completion bash > /etc/bash_completion.d/yourprogram + # macOS: + $ yourprogram completion bash > /usr/local/etc/bash_completion.d/yourprogram + + Zsh: + + # If shell completion is not already enabled in your environment, + # you will need to enable it. You can execute the following once: + + $ echo "autoload -U compinit; compinit" >> ~/.zshrc + + # To load completions for each session, execute once: + $ yourprogram completion zsh > "${fpath[1]}/_yourprogram" + + # You will need to start a new shell for this setup to take effect. + + fish: + + $ yourprogram completion fish | source + + # To load completions for each session, execute once: + $ yourprogram completion fish > ~/.config/fish/completions/yourprogram.fish + + PowerShell: + + PS> yourprogram completion powershell | Out-String | Invoke-Expression + + # To load completions for every new session, run: + PS> yourprogram completion powershell > yourprogram.ps1 + # and source this file from your PowerShell profile. + + +```shell +kubectl argo rollouts completion [bash|zsh|fish|powershell] +``` + +## Options + +``` + -h, --help help for completion +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_create.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_create.md new file mode 100644 index 0000000000..ce4ad148ce --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_create.md @@ -0,0 +1,59 @@ +# Rollouts Create + +Create a Rollout, Experiment, AnalysisTemplate, ClusterAnalysisTemplate, or AnalysisRun resource + +## Synopsis + +This command creates a new Rollout, Experiment, AnalysisTemplate, ClusterAnalysisTemplate, or AnalysisRun resource from a file. + +```shell +kubectl argo rollouts create [flags] +``` + +## Examples + +```shell +# Create an experiment and watch it +kubectl argo rollouts create -f my-experiment.yaml -w +``` + +## Options + +``` + -f, --filename stringArray Files to use to create the resource + -h, --help help for create + --no-color Do not colorize output + -w, --watch Watch live updates to the resource after creating +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## Available Commands + +* [rollouts create analysisrun](kubectl-argo-rollouts_create_analysisrun.md) - Create an AnalysisRun from an AnalysisTemplate or a ClusterAnalysisTemplate + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_create_analysisrun.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_create_analysisrun.md new file mode 100644 index 0000000000..3f43c1f2a0 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_create_analysisrun.md @@ -0,0 +1,68 @@ +# Rollouts Create Analysisrun + +Create an AnalysisRun from an AnalysisTemplate or a ClusterAnalysisTemplate + +## Synopsis + +This command creates a new AnalysisRun from an existing AnalysisTemplate resources or from an AnalysisTemplate file. + +```shell +kubectl argo rollouts create analysisrun [flags] +``` + +## Examples + +```shell +# Create an AnalysisRun from a local AnalysisTemplate file +kubectl argo rollouts create analysisrun --from-file my-analysis-template.yaml + +# Create an AnalysisRun from a AnalysisTemplate in the cluster +kubectl argo rollouts create analysisrun --from my-analysis-template + +# Create an AnalysisRun from a local ClusterAnalysisTemplate file +kubectl argo rollouts create analysisrun --global --from my-analysis-cluster-template.yaml + +# Create an AnalysisRun from a ClusterAnalysisTemplate in the cluster +kubectl argo rollouts create analysisrun --global --from my-analysis-cluster-template +``` + +## Options + +``` + -a, --argument stringArray Arguments to the parameter template + --from string Create an AnalysisRun from an AnalysisTemplate or ClusterAnalysisTemplate in the cluster + --from-file string Create an AnalysisRun from an AnalysisTemplate or ClusterAnalysisTemplate in a local file + --generate-name string Use the specified generateName for the run + --global Use a ClusterAnalysisTemplate instead of a AnalysisTemplate + -h, --help help for analysisrun + --instance-id string Instance-ID for the AnalysisRun + --name string Use the specified name for the run +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts create](kubectl-argo-rollouts_create.md) - Create a Rollout, Experiment, AnalysisTemplate, ClusterAnalysisTemplate, or AnalysisRun resource diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_dashboard.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_dashboard.md new file mode 100644 index 0000000000..d51cdb52c7 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_dashboard.md @@ -0,0 +1,47 @@ +# Rollouts Dashboard + +Start UI dashboard + +## Synopsis + +Start UI dashboard + +```shell +kubectl argo rollouts dashboard [flags] +``` + +## Options + +``` + -h, --help help for dashboard + -p, --port int port to listen on (default 3100) + --root-path string changes the root path of the dashboard (default "rollouts") +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_get.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_get.md new file mode 100644 index 0000000000..552551a9f0 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_get.md @@ -0,0 +1,63 @@ +# Rollouts Get + +Get details about rollouts and experiments + +## Synopsis + +This command consists of multiple subcommands which can be used to get extended information about a rollout or experiment. + +```shell +kubectl argo rollouts get RESOURCE_NAME [flags] +``` + +## Examples + +```shell +# Get a rollout +kubectl argo rollouts get rollout guestbook + +# Watch a rollouts progress +kubectl argo rollouts get rollout guestbook -w + +# Get an experiment +kubectl argo rollouts get experiment my-experiment +``` + +## Options + +``` + -h, --help help for get +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## Available Commands + +* [rollouts get experiment](kubectl-argo-rollouts_get_experiment.md) - Get details about an Experiment +* [rollouts get rollout](kubectl-argo-rollouts_get_rollout.md) - Get details about a rollout + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_get_experiment.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_get_experiment.md new file mode 100644 index 0000000000..de3c438670 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_get_experiment.md @@ -0,0 +1,69 @@ +# Rollouts Get Experiment + +Get details about an Experiment + +## Synopsis + +Get details about and visual representation of a experiment. It returns a bunch of metadata on a resource and a tree view of the child resources created by the parent. + +Tree view icons + +| Icon | Kind | +|:----:|:-----------:| +| ⟳ | Rollout | +| Σ | Experiment | +| α | AnalysisRun | +| # | Revision | +| ⧉ | ReplicaSet | +| □ | Pod | +| ⊞ | Job | + +```shell +kubectl argo rollouts get experiment EXPERIMENT_NAME [flags] +``` + +## Examples + +```shell +# Get an experiment +kubectl argo rollouts get experiment my-experiment + +# Watch experiment progress +kubectl argo rollouts get experiment my-experiment -w +``` + +## Options + +``` + -h, --help help for experiment + --no-color Do not colorize output + -w, --watch Watch live updates to the rollout +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts get](kubectl-argo-rollouts_get.md) - Get details about rollouts and experiments diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_get_rollout.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_get_rollout.md new file mode 100644 index 0000000000..2581c7d1c8 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_get_rollout.md @@ -0,0 +1,70 @@ +# Rollouts Get Rollout + +Get details about a rollout + +## Synopsis + +Get details about and visual representation of a rollout. It returns a bunch of metadata on a resource and a tree view of the child resources created by the parent. + +Tree view icons + +| Icon | Kind | +|:----:|:-----------:| +| ⟳ | Rollout | +| Σ | Experiment | +| α | AnalysisRun | +| # | Revision | +| ⧉ | ReplicaSet | +| □ | Pod | +| ⊞ | Job | + +```shell +kubectl argo rollouts get rollout ROLLOUT_NAME [flags] +``` + +## Examples + +```shell +# Get a rollout +kubectl argo rollouts get rollout guestbook + +# Watch progress of a rollout +kubectl argo rollouts get rollout guestbook -w +``` + +## Options + +``` + -h, --help help for rollout + --no-color Do not colorize output + --timeout-seconds int Timeout after specified seconds + -w, --watch Watch live updates to the rollout +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts get](kubectl-argo-rollouts_get.md) - Get details about rollouts and experiments diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_lint.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_lint.md new file mode 100644 index 0000000000..db560b6399 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_lint.md @@ -0,0 +1,53 @@ +# Rollouts Lint + +Lint and validate a Rollout + +## Synopsis + +This command lints and validates a new Rollout resource from a file. + +```shell +kubectl argo rollouts lint [flags] +``` + +## Examples + +```shell +# Lint a rollout +kubectl argo rollouts lint -f my-rollout.yaml +``` + +## Options + +``` + -f, --filename string File to lint + -h, --help help for lint +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_list.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_list.md new file mode 100644 index 0000000000..cdc673efda --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_list.md @@ -0,0 +1,61 @@ +# Rollouts List + +List rollouts or experiments + +## Synopsis + +This command consists of multiple subcommands which can be used to lists all of the +rollouts or experiments for a specified namespace (uses current namespace context if namespace not specified). + +```shell +kubectl argo rollouts list [flags] +``` + +## Examples + +```shell +# List rollouts +kubectl argo rollouts list rollouts + +# List experiments +kubectl argo rollouts list experiments +``` + +## Options + +``` + -h, --help help for list +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## Available Commands + +* [rollouts list experiments](kubectl-argo-rollouts_list_experiments.md) - List experiments +* [rollouts list rollouts](kubectl-argo-rollouts_list_rollouts.md) - List rollouts + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_list_experiments.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_list_experiments.md new file mode 100644 index 0000000000..f15c3aa86b --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_list_experiments.md @@ -0,0 +1,59 @@ +# Rollouts List Experiments + +List experiments + +## Synopsis + +This command lists all of the experiments for a specified namespace (uses current namespace context if namespace not specified). + +```shell +kubectl argo rollouts list experiments [flags] +``` + +## Examples + +```shell +# List rollouts +kubectl argo rollouts list experiments + +# List rollouts from all namespaces +kubectl argo rollouts list experiments --all-namespaces + +# List rollouts and watch for changes +kubectl argo rollouts list experiments --watch +``` + +## Options + +``` + --all-namespaces Include all namespaces + -h, --help help for experiments +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts list](kubectl-argo-rollouts_list.md) - List rollouts or experiments diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_list_rollouts.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_list_rollouts.md new file mode 100644 index 0000000000..503091170e --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_list_rollouts.md @@ -0,0 +1,62 @@ +# Rollouts List Rollouts + +List rollouts + +## Synopsis + +This command lists all of the rollouts for a specified namespace (uses current namespace context if namespace not specified). + +```shell +kubectl argo rollouts list rollouts [flags] +``` + +## Examples + +```shell +# List rollouts +kubectl argo rollouts list rollouts + +# List rollouts from all namespaces +kubectl argo rollouts list rollouts --all-namespaces + +# List rollouts and watch for changes +kubectl argo rollouts list rollouts --watch +``` + +## Options + +``` + -A, --all-namespaces Include all namespaces + -h, --help help for rollouts + --name string Only show rollout with specified name + --timestamps Print timestamps on updates + -w, --watch Watch for changes +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts list](kubectl-argo-rollouts_list.md) - List rollouts or experiments diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications.md new file mode 100644 index 0000000000..72a7b4635b --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications.md @@ -0,0 +1,55 @@ +# Rollouts Notifications + +Set of CLI commands that helps manage notifications settings + +## Synopsis + +Set of CLI commands that helps manage notifications settings + +```shell +kubectl argo rollouts notifications [flags] +``` + +## Options + +``` + --as string Username to impersonate for the operation + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --config-map string argo-rollouts-notification-configmap.yaml file path + --context string The name of the kubeconfig context to use + -h, --help help for notifications + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + --kubeconfig string Path to a kube config. Only required if out-of-cluster + -n, --namespace string If present, the namespace scope for this CLI request + --password string Password for basic authentication to the API server + --proxy-url string If provided, this URL will be used to connect via proxy + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + --secret string argo-rollouts-notification-secret.yaml file path. Use empty secret if provided value is ':empty' + --server string The address and port of the Kubernetes API server + --tls-server-name string If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used. + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use + --username string Username for basic authentication to the API server +``` + +## Options inherited from parent commands + +``` + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + -v, --kloglevel int Log level for kubernetes client library + --loglevel string Log level for kubectl argo rollouts (default "info") +``` + +## Available Commands + +* [rollouts notifications template](kubectl-argo-rollouts_notifications_template.md) - Notification templates related commands +* [rollouts notifications trigger](kubectl-argo-rollouts_notifications_trigger.md) - Notification triggers related commands + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_template.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_template.md new file mode 100644 index 0000000000..2fc9e2a9ef --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_template.md @@ -0,0 +1,55 @@ +# Rollouts Notifications Template + +Notification templates related commands + +## Synopsis + +Notification templates related commands + +```shell +kubectl argo rollouts notifications template [flags] +``` + +## Options + +``` + -h, --help help for template +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --config-map string argo-rollouts-notification-configmap.yaml file path + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to a kube config. Only required if out-of-cluster + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --password string Password for basic authentication to the API server + --proxy-url string If provided, this URL will be used to connect via proxy + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + --secret string argo-rollouts-notification-secret.yaml file path. Use empty secret if provided value is ':empty' + --server string The address and port of the Kubernetes API server + --tls-server-name string If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used. + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use + --username string Username for basic authentication to the API server +``` + +## Available Commands + +* [rollouts notifications template get](kubectl-argo-rollouts_notifications_template_get.md) - Prints information about configured templates +* [rollouts notifications template notify](kubectl-argo-rollouts_notifications_template_notify.md) - Generates notification using the specified template and send it to specified recipients + +## See Also + +* [rollouts notifications](kubectl-argo-rollouts_notifications.md) - Set of CLI commands that helps manage notifications settings diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_template_get.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_template_get.md new file mode 100644 index 0000000000..7dec5ef4ce --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_template_get.md @@ -0,0 +1,62 @@ +# Rollouts Notifications Template Get + +Prints information about configured templates + +## Synopsis + +Prints information about configured templates + +```shell +kubectl argo rollouts notifications template get [flags] +``` + +## Examples + +```shell + +# prints all templates +kubectl argo rollouts notifications template get +# print YAML formatted app-sync-succeeded template definition +kubectl argo rollouts notifications template get app-sync-succeeded -o=yaml + +``` + +## Options + +``` + -h, --help help for get + -o, --output string Output format. One of:json|yaml|wide|name (default "wide") +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --config-map string argo-rollouts-notification-configmap.yaml file path + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to a kube config. Only required if out-of-cluster + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --password string Password for basic authentication to the API server + --proxy-url string If provided, this URL will be used to connect via proxy + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + --secret string argo-rollouts-notification-secret.yaml file path. Use empty secret if provided value is ':empty' + --server string The address and port of the Kubernetes API server + --tls-server-name string If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used. + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use + --username string Username for basic authentication to the API server +``` + +## See Also + +* [rollouts notifications template](kubectl-argo-rollouts_notifications_template.md) - Notification templates related commands diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_template_notify.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_template_notify.md new file mode 100644 index 0000000000..ecd2e1b663 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_template_notify.md @@ -0,0 +1,63 @@ +# Rollouts Notifications Template Notify + +Generates notification using the specified template and send it to specified recipients + +## Synopsis + +Generates notification using the specified template and send it to specified recipients + +```shell +kubectl argo rollouts notifications template notify NAME RESOURCE_NAME [flags] +``` + +## Examples + +```shell + +# Trigger notification using in-cluster config map and secret +kubectl argo rollouts notifications template notify app-sync-succeeded guestbook --recipient slack:my-slack-channel + +# Render notification render generated notification in console +kubectl argo rollouts notifications template notify app-sync-succeeded guestbook + +``` + +## Options + +``` + -h, --help help for notify + --recipient stringArray List of recipients (default [console:stdout]) +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --config-map string argo-rollouts-notification-configmap.yaml file path + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to a kube config. Only required if out-of-cluster + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --password string Password for basic authentication to the API server + --proxy-url string If provided, this URL will be used to connect via proxy + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + --secret string argo-rollouts-notification-secret.yaml file path. Use empty secret if provided value is ':empty' + --server string The address and port of the Kubernetes API server + --tls-server-name string If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used. + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use + --username string Username for basic authentication to the API server +``` + +## See Also + +* [rollouts notifications template](kubectl-argo-rollouts_notifications_template.md) - Notification templates related commands diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_trigger.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_trigger.md new file mode 100644 index 0000000000..6ba01befea --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_trigger.md @@ -0,0 +1,55 @@ +# Rollouts Notifications Trigger + +Notification triggers related commands + +## Synopsis + +Notification triggers related commands + +```shell +kubectl argo rollouts notifications trigger [flags] +``` + +## Options + +``` + -h, --help help for trigger +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --config-map string argo-rollouts-notification-configmap.yaml file path + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to a kube config. Only required if out-of-cluster + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --password string Password for basic authentication to the API server + --proxy-url string If provided, this URL will be used to connect via proxy + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + --secret string argo-rollouts-notification-secret.yaml file path. Use empty secret if provided value is ':empty' + --server string The address and port of the Kubernetes API server + --tls-server-name string If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used. + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use + --username string Username for basic authentication to the API server +``` + +## Available Commands + +* [rollouts notifications trigger get](kubectl-argo-rollouts_notifications_trigger_get.md) - Prints information about configured triggers +* [rollouts notifications trigger run](kubectl-argo-rollouts_notifications_trigger_run.md) - Evaluates specified trigger condition and prints the result + +## See Also + +* [rollouts notifications](kubectl-argo-rollouts_notifications.md) - Set of CLI commands that helps manage notifications settings diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_trigger_get.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_trigger_get.md new file mode 100644 index 0000000000..11f1586772 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_trigger_get.md @@ -0,0 +1,62 @@ +# Rollouts Notifications Trigger Get + +Prints information about configured triggers + +## Synopsis + +Prints information about configured triggers + +```shell +kubectl argo rollouts notifications trigger get [flags] +``` + +## Examples + +```shell + +# prints all triggers +kubectl argo rollouts notifications trigger get +# print YAML formatted on-sync-failed trigger definition +kubectl argo rollouts notifications trigger get on-sync-failed -o=yaml + +``` + +## Options + +``` + -h, --help help for get + -o, --output string Output format. One of:json|yaml|wide|name (default "wide") +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --config-map string argo-rollouts-notification-configmap.yaml file path + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to a kube config. Only required if out-of-cluster + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --password string Password for basic authentication to the API server + --proxy-url string If provided, this URL will be used to connect via proxy + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + --secret string argo-rollouts-notification-secret.yaml file path. Use empty secret if provided value is ':empty' + --server string The address and port of the Kubernetes API server + --tls-server-name string If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used. + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use + --username string Username for basic authentication to the API server +``` + +## See Also + +* [rollouts notifications trigger](kubectl-argo-rollouts_notifications_trigger.md) - Notification triggers related commands diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_trigger_run.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_trigger_run.md new file mode 100644 index 0000000000..9782976189 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_notifications_trigger_run.md @@ -0,0 +1,62 @@ +# Rollouts Notifications Trigger Run + +Evaluates specified trigger condition and prints the result + +## Synopsis + +Evaluates specified trigger condition and prints the result + +```shell +kubectl argo rollouts notifications trigger run NAME RESOURCE_NAME [flags] +``` + +## Examples + +```shell + +# Execute trigger configured in 'argocd-notification-cm' ConfigMap +kubectl argo rollouts notifications trigger run on-sync-status-unknown ./sample-app.yaml + +# Execute trigger using my-config-map.yaml instead of 'argo-rollouts-notification-configmap' ConfigMap +kubectl argo rollouts notifications trigger run on-sync-status-unknown ./sample-app.yaml \ +--config-map ./my-config-map.yaml +``` + +## Options + +``` + -h, --help help for run +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --config-map string argo-rollouts-notification-configmap.yaml file path + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to a kube config. Only required if out-of-cluster + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --password string Password for basic authentication to the API server + --proxy-url string If provided, this URL will be used to connect via proxy + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + --secret string argo-rollouts-notification-secret.yaml file path. Use empty secret if provided value is ':empty' + --server string The address and port of the Kubernetes API server + --tls-server-name string If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used. + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use + --username string Username for basic authentication to the API server +``` + +## See Also + +* [rollouts notifications trigger](kubectl-argo-rollouts_notifications_trigger.md) - Notification triggers related commands diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_pause.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_pause.md new file mode 100644 index 0000000000..c90c2efbaa --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_pause.md @@ -0,0 +1,52 @@ +# Rollouts Pause + +Pause a rollout + +## Synopsis + +Set the rollout paused state to 'true' + +```shell +kubectl argo rollouts pause ROLLOUT_NAME [flags] +``` + +## Examples + +```shell +# Pause a rollout +kubectl argo rollouts pause guestbook +``` + +## Options + +``` + -h, --help help for pause +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_promote.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_promote.md new file mode 100644 index 0000000000..5e22f988b9 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_promote.md @@ -0,0 +1,59 @@ +# Rollouts Promote + +Promote a rollout + +## Synopsis + +Promote a rollout + +Promotes a rollout paused at a canary step, or a paused blue-green pre-promotion. +To skip analysis, pauses and steps entirely, use '--full' to fully promote the rollout + +```shell +kubectl argo rollouts promote ROLLOUT_NAME [flags] +``` + +## Examples + +```shell +# Promote a paused rollout +kubectl argo rollouts promote guestbook + +# Fully promote a rollout to desired version, skipping analysis, pauses, and steps +kubectl argo rollouts promote guestbook --full +``` + +## Options + +``` + --full Perform a full promotion, skipping analysis, pauses, and steps + -h, --help help for promote +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_restart.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_restart.md new file mode 100644 index 0000000000..c7fa91ea44 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_restart.md @@ -0,0 +1,56 @@ +# Rollouts Restart + +Restart the pods of a rollout + +## Synopsis + +Restart the pods of a rollout + +```shell +kubectl argo rollouts restart ROLLOUT [flags] +``` + +## Examples + +```shell +# Restart the pods of a rollout in now +kubectl argo rollouts restart ROLLOUT_NAME + +# Restart the pods of a rollout in ten seconds +kubectl argo rollouts restart ROLLOUT_NAME --in 10s +``` + +## Options + +``` + -h, --help help for restart + -i, --in string Amount of time before a restart. (e.g. 30s, 5m, 1h) +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_retry.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_retry.md new file mode 100644 index 0000000000..8d4fcf14e0 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_retry.md @@ -0,0 +1,60 @@ +# Rollouts Retry + +Retry a rollout or experiment + +## Synopsis + +This command consists of multiple subcommands which can be used to restart an aborted rollout or a failed experiment. + +```shell +kubectl argo rollouts retry RESOURCE_NAME [flags] +``` + +## Examples + +```shell +# Retry an aborted rollout +kubectl argo rollouts retry rollout guestbook + +# Retry a failed experiment +kubectl argo rollouts retry experiment my-experiment +``` + +## Options + +``` + -h, --help help for retry +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## Available Commands + +* [rollouts retry experiment](kubectl-argo-rollouts_retry_experiment.md) - Retry an experiment +* [rollouts retry rollout](kubectl-argo-rollouts_retry_rollout.md) - Retry an aborted rollout + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_retry_experiment.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_retry_experiment.md new file mode 100644 index 0000000000..2ab8acf4d7 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_retry_experiment.md @@ -0,0 +1,52 @@ +# Rollouts Retry Experiment + +Retry an experiment + +## Synopsis + +Retry a failed experiment. + +```shell +kubectl argo rollouts retry experiment EXPERIMENT_NAME [flags] +``` + +## Examples + +```shell +# Retry an experiment +kubectl argo rollouts retry experiment my-experiment +``` + +## Options + +``` + -h, --help help for experiment +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts retry](kubectl-argo-rollouts_retry.md) - Retry a rollout or experiment diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_retry_rollout.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_retry_rollout.md new file mode 100644 index 0000000000..4b1b664624 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_retry_rollout.md @@ -0,0 +1,52 @@ +# Rollouts Retry Rollout + +Retry an aborted rollout + +## Synopsis + +Retry an aborted rollout + +```shell +kubectl argo rollouts retry rollout ROLLOUT_NAME [flags] +``` + +## Examples + +```shell +# Retry an aborted rollout +kubectl argo rollouts retry rollout guestbook +``` + +## Options + +``` + -h, --help help for rollout +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts retry](kubectl-argo-rollouts_retry.md) - Retry a rollout or experiment diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_set.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_set.md new file mode 100644 index 0000000000..1944152089 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_set.md @@ -0,0 +1,56 @@ +# Rollouts Set + +Update various values on resources + +## Synopsis + +This command consists of multiple subcommands which can be used to update rollout resources. + +```shell +kubectl argo rollouts set COMMAND [flags] +``` + +## Examples + +```shell +# Set rollout image +kubectl argo rollouts set image my-rollout demo=argoproj/rollouts-demo:yellow +``` + +## Options + +``` + -h, --help help for set +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## Available Commands + +* [rollouts set image](kubectl-argo-rollouts_set_image.md) - Update the image of a rollout + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_set_image.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_set_image.md new file mode 100644 index 0000000000..10ec065625 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_set_image.md @@ -0,0 +1,52 @@ +# Rollouts Set Image + +Update the image of a rollout + +## Synopsis + +Update the image of a rollout + +```shell +kubectl argo rollouts set image ROLLOUT_NAME CONTAINER=IMAGE [flags] +``` + +## Examples + +```shell +# Set rollout image +kubectl argo rollouts set image my-rollout www=image:v2 +``` + +## Options + +``` + -h, --help help for image +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts set](kubectl-argo-rollouts_set.md) - Update various values on resources diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_status.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_status.md new file mode 100644 index 0000000000..c57023eb56 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_status.md @@ -0,0 +1,59 @@ +# Rollouts Status + +Show the status of a rollout + +## Synopsis + +Watch rollout until it finishes or the timeout is exceeded. Returns success if +the rollout is healthy upon completion and an error otherwise. + +```shell +kubectl argo rollouts status ROLLOUT_NAME [flags] +``` + +## Examples + +```shell +# Watch the rollout until it succeeds +kubectl argo rollouts status guestbook + +# Watch the rollout until it succeeds, fail if it takes more than 60 seconds +kubectl argo rollouts status --timeout 60s guestbook + +``` + +## Options + +``` + -h, --help help for status + -t, --timeout duration The length of time to watch before giving up. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). Zero means wait forever + -w, --watch Watch the status of the rollout until it's done (default true) +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_terminate.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_terminate.md new file mode 100644 index 0000000000..0041f90d4b --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_terminate.md @@ -0,0 +1,60 @@ +# Rollouts Terminate + +Terminate an AnalysisRun or Experiment + +## Synopsis + +This command consists of multiple subcommands which can be used to terminate an AnalysisRun or Experiment that is in progress. + +```shell +kubectl argo rollouts terminate RESOURCE_NAME [flags] +``` + +## Examples + +```shell +# Terminate an analysisRun +kubectl argo rollouts terminate analysisrun guestbook-877894d5b-4-success-rate.1 + +# Terminate a failed experiment +kubectl argo rollouts terminate experiment my-experiment +``` + +## Options + +``` + -h, --help help for terminate +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## Available Commands + +* [rollouts terminate analysisrun](kubectl-argo-rollouts_terminate_analysisrun.md) - Terminate an AnalysisRun +* [rollouts terminate experiment](kubectl-argo-rollouts_terminate_experiment.md) - Terminate an experiment + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_terminate_analysisrun.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_terminate_analysisrun.md new file mode 100644 index 0000000000..8dece8a431 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_terminate_analysisrun.md @@ -0,0 +1,52 @@ +# Rollouts Terminate Analysisrun + +Terminate an AnalysisRun + +## Synopsis + +This command terminates an AnalysisRun. + +```shell +kubectl argo rollouts terminate analysisrun ANALYSISRUN_NAME [flags] +``` + +## Examples + +```shell +# Terminate an AnalysisRun +kubectl argo rollouts terminate analysis guestbook-877894d5b-4-success-rate.1 +``` + +## Options + +``` + -h, --help help for analysisrun +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts terminate](kubectl-argo-rollouts_terminate.md) - Terminate an AnalysisRun or Experiment diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_terminate_experiment.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_terminate_experiment.md new file mode 100644 index 0000000000..85d793ba68 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_terminate_experiment.md @@ -0,0 +1,52 @@ +# Rollouts Terminate Experiment + +Terminate an experiment + +## Synopsis + +This command terminates an Experiment. + +```shell +kubectl argo rollouts terminate experiment EXPERIMENT_NAME [flags] +``` + +## Examples + +```shell +# Terminate an experiment +kubectl argo rollouts terminate experiment my-experiment +``` + +## Options + +``` + -h, --help help for experiment +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts terminate](kubectl-argo-rollouts_terminate.md) - Terminate an AnalysisRun or Experiment diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_undo.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_undo.md new file mode 100644 index 0000000000..1cc0c826c8 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_undo.md @@ -0,0 +1,56 @@ +# Rollouts Undo + +Undo a rollout + +## Synopsis + +Rollback to the previous rollout. + +```shell +kubectl argo rollouts undo ROLLOUT_NAME [flags] +``` + +## Examples + +```shell +# Undo a rollout +kubectl argo rollouts undo guestbook + +# Undo a rollout revision 3 +kubectl argo rollouts undo guestbook --to-revision=3 +``` + +## Options + +``` + -h, --help help for undo + --to-revision int The revision to rollback to. Default to 0 (last revision). +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_version.md b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_version.md new file mode 100644 index 0000000000..7294c5dd12 --- /dev/null +++ b/docs/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_version.md @@ -0,0 +1,56 @@ +# Rollouts Version + +Print version + +## Synopsis + +Show the version and build information of the Argo Rollouts plugin. + +```shell +kubectl argo rollouts version [flags] +``` + +## Examples + +```shell +# Get full version info +kubectl argo rollouts version + +# Get just plugin version number +kubectl argo rollouts version --short +``` + +## Options + +``` + -h, --help help for version + --short print just the version number +``` + +## Options inherited from parent commands + +``` + --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation. + --cache-dir string Default cache directory (default "$HOME/.kube/cache") + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --context string The name of the kubeconfig context to use + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + -v, --kloglevel int Log level for kubernetes client library + --kubeconfig string Path to the kubeconfig file to use for CLI requests. + --loglevel string Log level for kubectl argo rollouts (default "info") + -n, --namespace string If present, the namespace scope for this CLI request + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + -s, --server string The address and port of the Kubernetes API server + --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + --token string Bearer token for authentication to the API server + --user string The name of the kubeconfig user to use +``` + +## See Also + +* [rollouts](kubectl-argo-rollouts.md) - Manage argo rollouts diff --git a/docs/generated/notification-services/alertmanager.md b/docs/generated/notification-services/alertmanager.md new file mode 100755 index 0000000000..e0f9d7e4e7 --- /dev/null +++ b/docs/generated/notification-services/alertmanager.md @@ -0,0 +1,164 @@ +# Alertmanager + +## Parameters + +The notification service is used to push events to [Alertmanager](https://github.com/prometheus/alertmanager), and the following settings need to be specified: + +* `targets` - the alertmanager service address, array type +* `scheme` - optional, default is "http", e.g. http or https +* `apiPath` - optional, default is "/api/v2/alerts" +* `insecureSkipVerify` - optional, default is "false", when scheme is https whether to skip the verification of ca +* `basicAuth` - optional, server auth +* `bearerToken` - optional, server auth +* `timeout` - optional, the timeout in seconds used when sending alerts, default is "3 seconds" + +`basicAuth` or `bearerToken` is used for authentication, you can choose one. If the two are set at the same time, `basicAuth` takes precedence over `bearerToken`. + +## Example + +### Prometheus Alertmanager config + +```yaml +global: + resolve_timeout: 5m + +route: + group_by: ['alertname'] + group_wait: 10s + group_interval: 10s + repeat_interval: 1h + receiver: 'default' +receivers: +- name: 'default' + webhook_configs: + - send_resolved: false + url: 'http://10.5.39.39:10080/api/alerts/webhook' +``` + +You should turn off "send_resolved" or you will receive unnecessary recovery notifications after "resolve_timeout". + +### Send one alertmanager without auth + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.alertmanager: | + targets: + - 10.5.39.39:9093 +``` + +### Send alertmanager cluster with custom api path + +If your alertmanager has changed the default api, you can customize "apiPath". + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.alertmanager: | + targets: + - 10.5.39.39:443 + scheme: https + apiPath: /api/events + insecureSkipVerify: true +``` + +### Send high availability alertmanager with auth + +Store auth token in `argocd-notifications-secret` Secret and use configure in `argocd-notifications-cm` ConfigMap. + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: +stringData: + alertmanager-username: + alertmanager-password: + alertmanager-bearer-token: +``` + +- with basicAuth + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.alertmanager: | + targets: + - 10.5.39.39:19093 + - 10.5.39.39:29093 + - 10.5.39.39:39093 + scheme: https + apiPath: /api/v2/alerts + insecureSkipVerify: true + basicAuth: + username: $alertmanager-username + password: $alertmanager-password +``` + +- with bearerToken + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.alertmanager: | + targets: + - 10.5.39.39:19093 + - 10.5.39.39:29093 + - 10.5.39.39:39093 + scheme: https + apiPath: /api/v2/alerts + insecureSkipVerify: true + bearerToken: $alertmanager-bearer-token +``` + +## Templates + +* `labels` - at least one label pair required, implement different notification strategies according to alertmanager routing +* `annotations` - optional, specifies a set of information labels, which can be used to store longer additional information, but only for display +* `generatorURL` - optional, default is '{{.app.spec.source.repoURL}}', backlink used to identify the entity that caused this alert in the client + +the `label` or `annotations` or `generatorURL` values can be templated. + +```yaml +context: | + argocdUrl: https://example.com/argocd + +template.app-deployed: | + message: Application {{.app.metadata.name}} has been healthy. + alertmanager: + labels: + fault_priority: "P5" + event_bucket: "deploy" + event_status: "succeed" + recipient: "{{.recipient}}" + annotations: + application: '{{.app.metadata.name}}' + author: "{{(call .repo.GetCommitMetadata .app.status.sync.revision).Author}}" + message: "{{(call .repo.GetCommitMetadata .app.status.sync.revision).Message}}" +``` + +You can do targeted push on [Alertmanager](https://github.com/prometheus/alertmanager) according to labels. + +```yaml +template.app-deployed: | + message: Application {{.app.metadata.name}} has been healthy. + alertmanager: + labels: + alertname: app-deployed + fault_priority: "P5" + event_bucket: "deploy" +``` + +There is a special label `alertname`. If you don’t set its value, it will be equal to the template name by default. \ No newline at end of file diff --git a/docs/generated/notification-services/email.md b/docs/generated/notification-services/email.md new file mode 100755 index 0000000000..e3c4b7d9e6 --- /dev/null +++ b/docs/generated/notification-services/email.md @@ -0,0 +1,63 @@ +# Email + +## Parameters + +The Email notification service sends email notifications using SMTP protocol and requires specifying the following settings: + +* `host` - the SMTP server host name +* `port` - the SMTP server port +* `username` - username +* `password` - password +* `from` - from email address +* `html` - optional bool, true or false +* `insecure_skip_verify` - optional bool, true or false + +## Example + +The following snippet contains sample Gmail service configuration: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.email.gmail: | + username: $email-username + password: $email-password + host: smtp.gmail.com + port: 465 + from: $email-username +``` + +Without authentication: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.email.example: | + host: smtp.example.com + port: 587 + from: $email-username +``` + +## Template + +Notification templates support specifying subject for email notifications: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + template.app-sync-succeeded: | + email: + subject: Application {{.app.metadata.name}} has been successfully synced. + message: | + {{if eq .serviceType "slack"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} has been successfully synced at {{.app.status.operationState.finishedAt}}. + Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true . +``` diff --git a/docs/generated/notification-services/github.md b/docs/generated/notification-services/github.md new file mode 100755 index 0000000000..2b5bbf1e8c --- /dev/null +++ b/docs/generated/notification-services/github.md @@ -0,0 +1,76 @@ +# GitHub + +## Parameters + +The GitHub notification service changes commit status using [GitHub Apps](https://docs.github.com/en/developers/apps) and requires specifying the following settings: + +* `appID` - the app id +* `installationID` - the app installation id +* `privateKey` - the app private key +* `enterpriseBaseURL` - optional URL, e.g. https://git.example.com/ + +## Configuration + +1. Create a GitHub Apps using https://github.com/settings/apps/new +2. Change repository permissions to enable write commit statuses +![2](https://user-images.githubusercontent.com/18019529/108397381-3ca57980-725b-11eb-8d17-5b8992dc009e.png) +3. Generate a private key, and download it automatically +![3](https://user-images.githubusercontent.com/18019529/108397926-d4a36300-725b-11eb-83fe-74795c8c3e03.png) +4. Install app to account +5. Store privateKey in `argocd-notifications-secret` Secret and configure GitHub integration +in `argocd-notifications-cm` ConfigMap + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.github: | + appID: + installationID: + privateKey: $github-privateKey +``` + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: +stringData: + github-privateKey: | + -----BEGIN RSA PRIVATE KEY----- + (snip) + -----END RSA PRIVATE KEY----- +``` + +6. Create subscription for your GitHub integration + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + notifications.argoproj.io/subscribe..github: "" +``` + +## Templates + +![](https://user-images.githubusercontent.com/18019529/108520497-168ce180-730e-11eb-93cb-b0b91f99bdc5.png) + +```yaml +template.app-deployed: | + message: | + Application {{.app.metadata.name}} is now running new version of deployments manifests. + github: + repoURLPath: "{{.app.spec.source.repoURL}}" + revisionPath: "{{.app.status.operationState.syncResult.revision}}" + status: + state: success + label: "continuous-delivery/{{.app.metadata.name}}" + targetURL: "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true" +``` + +**Notes**: +- If the message is set to 140 characters or more, it will be truncated. +- If `github.repoURLPath` and `github.revisionPath` are same as above, they can be omitted. diff --git a/docs/generated/notification-services/googlechat.md b/docs/generated/notification-services/googlechat.md new file mode 100755 index 0000000000..041ea6e022 --- /dev/null +++ b/docs/generated/notification-services/googlechat.md @@ -0,0 +1,92 @@ +# Google Chat + +## Parameters + +The Google Chat notification service send message notifications to a google chat webhook. This service uses the following settings: + +* `webhooks` - a map of the form `webhookName: webhookUrl` + +## Configuration + +1. Open `Google chat` and go to the space to which you want to send messages +2. From the menu at the top of the page, select **Configure Webhooks** +3. Under **Incoming Webhooks**, click **Add Webhook** +4. Give a name to the webhook, optionally add an image and click **Save** +5. Copy the URL next to your webhook +6. Store the URL in `argocd-notification-secret` and declare it in `argocd-notifications-cm` + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.googlechat: | + webhooks: + spaceName: $space-webhook-url +``` + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: +stringData: + space-webhook-url: https://chat.googleapis.com/v1/spaces//messages?key=&token= +``` + +6. Create a subscription for your space + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + notifications.argoproj.io/subscribe.on-sync-succeeded.googlechat: spaceName +``` + +## Templates + +You can send [simple text](https://developers.google.com/chat/reference/message-formats/basic) or [card messages](https://developers.google.com/chat/reference/message-formats/cards) to a Google Chat space. A simple text message template can be defined as follows: + +```yaml +template.app-sync-succeeded: | + message: The app {{ .app.metadata.name }} has successfully synced! +``` + +A card message can be defined as follows: + +```yaml +template.app-sync-succeeded: | + googlechat: + cards: | + - header: + title: ArgoCD Bot Notification + sections: + - widgets: + - textParagraph: + text: The app {{ .app.metadata.name }} has successfully synced! + - widgets: + - keyValue: + topLabel: Repository + content: {{ call .repo.RepoURLToHTTPS .app.spec.source.repoURL }} + - keyValue: + topLabel: Revision + content: {{ .app.spec.source.targetRevision }} + - keyValue: + topLabel: Author + content: {{ (call .repo.GetCommitMetadata .app.status.sync.revision).Author }} +``` + +The card message can be written in JSON too. + +## Chat Threads + +It is possible send both simple text and card messages in a chat thread by specifying a unique key for the thread. The thread key can be defined as follows: + +```yaml +template.app-sync-succeeded: | + message: The app {{ .app.metadata.name }} has succesfully synced! + googlechat: + threadKey: {{ .app.metadata.name }} +``` diff --git a/docs/generated/notification-services/grafana.md b/docs/generated/notification-services/grafana.md new file mode 100755 index 0000000000..ff567b71c1 --- /dev/null +++ b/docs/generated/notification-services/grafana.md @@ -0,0 +1,45 @@ +# Grafana + +To be able to create Grafana annotation with argocd-notifications you have to create an [API Key](https://grafana.com/docs/grafana/latest/http_api/auth/#create-api-key) inside your [Grafana](https://grafana.com). + +![sample](https://user-images.githubusercontent.com/18019529/112024976-0f106080-8b78-11eb-9658-7663305899be.png) + +1. Login to your Grafana instance as `admin` +2. On the left menu, go to Configuration / API Keys +3. Click "Add API Key" +4. Fill the Key with name `ArgoCD Notification`, role `Editor` and Time to Live `10y` (for example) +5. Click on Add button +6. Store apiKey in `argocd-notifications-secret` Secret and Copy your API Key and define it in `argocd-notifications-cm` ConfigMap + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.grafana: | + apiUrl: https://grafana.example.com/api + apiKey: $grafana-api-key +``` + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: +stringData: + grafana-api-key: api-key +``` + +7. Create subscription for your Grafana integration + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + notifications.argoproj.io/subscribe..grafana: tag1|tag2 # list of tags separated with | +``` + +8. Change the annotations settings +![8](https://user-images.githubusercontent.com/18019529/112022083-47fb0600-8b75-11eb-849b-d25d41925909.png) diff --git a/docs/generated/notification-services/mattermost.md b/docs/generated/notification-services/mattermost.md new file mode 100755 index 0000000000..98e0d0fd7b --- /dev/null +++ b/docs/generated/notification-services/mattermost.md @@ -0,0 +1,78 @@ +# Mattermost + +## Parameters + +* `apiURL` - the server url, e.g. https://mattermost.example.com +* `token` - the bot token +* `insecureSkipVerify` - optional bool, true or false + +## Configuration + +1. Create a bot account and copy token after creating it +![1](https://user-images.githubusercontent.com/18019529/111499520-62ed0500-8786-11eb-88b0-d0aade61fed4.png) +2. Invite team +![2](https://user-images.githubusercontent.com/18019529/111500197-1229dc00-8787-11eb-98e5-587ee36c94a9.png) +3. Store token in `argocd-notifications-secret` Secret and configure Mattermost integration +in `argocd-notifications-cm` ConfigMap + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.mattermost: | + apiURL: + token: $mattermost-token +``` + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: +stringData: + mattermost-token: token +``` + +4. Copy channel id +![4](https://user-images.githubusercontent.com/18019529/111501289-333efc80-8788-11eb-9731-8353170cd73a.png) + +5. Create subscription for your Mattermost integration + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + notifications.argoproj.io/subscribe..mattermost: +``` + +## Templates + +![](https://user-images.githubusercontent.com/18019529/111502636-5fa74880-8789-11eb-97c5-5eac22c00a37.png) + +You can reuse the template of slack. +Mattermost is compatible with attachments of Slack. See [Mattermost Integration Guide](https://docs.mattermost.com/developer/message-attachments.html). + +```yaml +template.app-deployed: | + message: | + Application {{.app.metadata.name}} is now running new version of deployments manifests. + mattermost: + attachments: | + [{ + "title": "{{.app.metadata.name}}", + "title_link": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}", + "color": "#18be52", + "fields": [{ + "title": "Sync Status", + "value": "{{.app.status.sync.status}}", + "short": true + }, { + "title": "Repository", + "value": "{{.app.spec.source.repoURL}}", + "short": true + }] + }] +``` diff --git a/docs/generated/notification-services/newrelic.md b/docs/generated/notification-services/newrelic.md new file mode 100755 index 0000000000..d98288a846 --- /dev/null +++ b/docs/generated/notification-services/newrelic.md @@ -0,0 +1,61 @@ +# NewRelic + +## Parameters + +* `apiURL` - the api server url, e.g. https://api.newrelic.com +* `apiKey` - a [NewRelic ApiKey](https://docs.newrelic.com/docs/apis/rest-api-v2/get-started/introduction-new-relic-rest-api-v2/#api_key) + +## Configuration + +1. Create a NewRelic [Api Key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#user-api-key) +2. Store apiKey in `argocd-notifications-secret` Secret and configure NewRelic integration in `argocd-notifications-cm` ConfigMap + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.newrelic: | + apiURL: + apiKey: $newrelic-apiKey +``` + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: +stringData: + newrelic-apiKey: apiKey +``` + +3. Copy [Application ID](https://docs.newrelic.com/docs/apis/rest-api-v2/get-started/get-app-other-ids-new-relic-one/#apm) +4. Create subscription for your NewRelic integration + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + notifications.argoproj.io/subscribe..newrelic: +``` + +## Templates + +* `description` - __optional__, high-level description of this deployment, visible in the [Summary](https://docs.newrelic.com/docs/apm/applications-menu/monitoring/apm-overview-page) page and on the [Deployments](https://docs.newrelic.com/docs/apm/applications-menu/events/deployments-page) page when you select an individual deployment. + * Defaults to `message` +* `changelog` - __optional__, A summary of what changed in this deployment, visible in the [Deployments](https://docs.newrelic.com/docs/apm/applications-menu/events/deployments-page) page when you select (selected deployment) > Change log. + * Defaults to `{{(call .repo.GetCommitMetadata .app.status.sync.revision).Message}}` +* `user` - __optional__, A username to associate with the deployment, visible in the [Summary](https://docs.newrelic.com/docs/apm/applications-menu/events/deployments-page) and on the [Deployments](https://docs.newrelic.com/docs/apm/applications-menu/events/deployments-page). + * Defaults to `{{(call .repo.GetCommitMetadata .app.status.sync.revision).Author}}` + +```yaml +context: | + argocdUrl: https://example.com/argocd + +template.app-deployed: | + message: Application {{.app.metadata.name}} has successfully deployed. + newrelic: + description: Application {{.app.metadata.name}} has successfully deployed +``` diff --git a/docs/generated/notification-services/opsgenie.md b/docs/generated/notification-services/opsgenie.md new file mode 100755 index 0000000000..665d0081e7 --- /dev/null +++ b/docs/generated/notification-services/opsgenie.md @@ -0,0 +1,28 @@ +# Opsgenie + +To be able to send notifications with argocd-notifications you have to create an [API Integration](https://docs.opsgenie.com/docs/integrations-overview) inside your [Opsgenie Team](https://docs.opsgenie.com/docs/teams). + +1. Login to Opsgenie at https://app.opsgenie.com or https://app.eu.opsgenie.com (if you have an account in the european union) +2. Make sure you already have a team, if not follow this guide https://docs.opsgenie.com/docs/teams +3. Click "Teams" in the Menu on the left +4. Select the team that you want to notify +5. In the teams configuration menu select "Integrations" +6. click "Add Integration" in the top right corner +7. Select "API" integration +8. Give your integration a name, copy the "API key" and safe it somewhere for later +9. Make sure the checkboxes for "Create and Update Access" and "enable" are selected, disable the other checkboxes to remove unnecessary permissions +10. Click "Safe Integration" at the bottom +11. Check your browser for the correct server apiURL. If it is "app.opsgenie.com" then use the us/international api url `api.opsgenie.com` in the next step, otherwise use `api.eu.opsgenie.com` (european api). +12. You are finished with configuring opsgenie. Now you need to configure argocd-notifications. Use the apiUrl, the team name and the apiKey to configure the opsgenie integration in the `argocd-notifications-secret` secret. + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.opsgenie: | + apiUrl: + apiKeys: + : +``` \ No newline at end of file diff --git a/docs/generated/notification-services/overview.md b/docs/generated/notification-services/overview.md new file mode 100755 index 0000000000..15e674f654 --- /dev/null +++ b/docs/generated/notification-services/overview.md @@ -0,0 +1,53 @@ +The notification services represent integration with services such as slack, email or custom webhook. Services are configured in `argocd-notifications-cm` ConfigMap +using `service..()` keys and might reference sensitive data from `argocd-notifications-secret` Secret. Following example demonstrates slack +service configuration: + +```yaml + service.slack: | + token: $slack-token +``` + + +The `slack` indicates that service sends slack notification; name is missing and defaults to `slack`. + +## Sensitive Data + +Sensitive data like authentication tokens should be stored in `` Secret and can be referenced in +service configuration using `$` format. For example `$slack-token` referencing value of key `slack-token` in +`` Secret. + +## Custom Names + +Service custom names allow configuring two instances of the same service type. + +```yaml + service.slack.workspace1: | + token: $slack-token-workspace1 + service.slack.workspace2: | + token: $slack-token-workspace2 +``` + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + notifications.argoproj.io/subscribe.on-sync-succeeded.workspace1: my-channel + notifications.argoproj.io/subscribe.on-sync-succeeded.workspace2: my-channel +``` + +## Service Types + +* [Email](./email.md) +* [GitHub](./github.md) +* [Slack](./slack.md) +* [Mattermost](./mattermost.md) +* [Opsgenie](./opsgenie.md) +* [Grafana](./grafana.md) +* [Webhook](./webhook.md) +* [Telegram](./telegram.md) +* [Teams](./teams.md) +* [Google Chat](./googlechat.md) +* [Rocket.Chat](./rocketchat.md) +* [Pushover](./pushover.md) +* [Alertmanager](./alertmanager.md) \ No newline at end of file diff --git a/docs/generated/notification-services/pagerduty.md b/docs/generated/notification-services/pagerduty.md new file mode 100755 index 0000000000..849b4db802 --- /dev/null +++ b/docs/generated/notification-services/pagerduty.md @@ -0,0 +1,66 @@ +# Pagerduty + +## Parameters + +The Pagerduty notification service is used to create pagerduty incidents and requires specifying the following settings: + +* `pagerdutyToken` - the pagerduty auth token +* `from` - email address of a valid user associated with the account making the request. +* `serviceID` - The ID of the resource. + + +## Example + +The following snippet contains sample Pagerduty service configuration: + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: +stringData: + pagerdutyToken: +``` + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.pagerduty: | + token: $pagerdutyToken + from: +``` + +## Template + +Notification templates support specifying subject for pagerduty notifications: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + template.rollout-aborted: | + message: Rollout {{.rollout.metadata.name}} is aborted. + pagerduty: + title: "Rollout {{.rollout.metadata.name}}" + urgency: "high" + body: "Rollout {{.rollout.metadata.name}} aborted " + priorityID: "" +``` + +NOTE: A Priority is a label representing the importance and impact of an incident. This is only available on Standard and Enterprise plans of pagerduty. + +## Annotation + +Annotation sample for pagerduty notifications: +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + annotations: + notifications.argoproj.io/subscribe.on-rollout-aborted.pagerduty: "" +``` \ No newline at end of file diff --git a/docs/generated/notification-services/pushover.md b/docs/generated/notification-services/pushover.md new file mode 100755 index 0000000000..37cb20b277 --- /dev/null +++ b/docs/generated/notification-services/pushover.md @@ -0,0 +1,33 @@ +# Pushover + +1. Create an app at [pushover.net](https://pushover.net/apps/build). +2. Store the API key in `` Secret and define the secret name in `` ConfigMap: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.pushover: | + token: $pushover-token +``` + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: +stringData: + pushover-token: avtc41pn13asmra6zaiyf7dh6cgx97 +``` + +3. Add your user key to your Application resource: + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + notifications.argoproj.io/subscribe.on-sync-succeeded.pushover: uumy8u4owy7bgkapp6mc5mvhfsvpcd +``` \ No newline at end of file diff --git a/docs/generated/notification-services/rocketchat.md b/docs/generated/notification-services/rocketchat.md new file mode 100755 index 0000000000..554f42a808 --- /dev/null +++ b/docs/generated/notification-services/rocketchat.md @@ -0,0 +1,96 @@ +# Rocket.Chat + +## Parameters + +The Rocket.Chat notification service configuration includes following settings: + +* `email` - the Rocker.Chat user's email +* `password` - the Rocker.Chat user's password +* `alias` - optional alias that should be used to post message +* `icon` - optional message icon +* `avatar` - optional message avatar +* `serverUrl` - optional Rocket.Chat server url + +## Configuration + +1. Login to your RocketChat instance +2. Go to user management + +![2](https://user-images.githubusercontent.com/15252187/115824993-7ccad900-a411-11eb-89de-6a0c4438ffdf.png) + +3. Add new user with `bot` role. Also note that `Require password change` checkbox mus be not checked + +![3](https://user-images.githubusercontent.com/15252187/115825174-b4d21c00-a411-11eb-8f20-cda48cea9fad.png) + +4. Copy username and password that you was created for bot user +5. Create a public or private channel, or a team, for this example `my_channel` +6. Add your bot to this channel **otherwise it won't work** +7. Store email and password in argocd_notifications-secret Secret + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: +stringData: + rocketchat-email: + rocketchat-password: +``` + +8. Finally, use these credentials to configure the RocketChat integration in the `argocd-configmap` config map: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.rocketchat: | + email: $rocketchat-email + password: $rocketchat-password +``` + +9. Create a subscription for your Rocket.Chat integration: + +*Note: channel, team or user must be prefixed with # or @ elsewhere we will be interpretative destination as a room ID* + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + notifications.argoproj.io/subscribe.on-sync-succeeded.rocketchat: #my_channel +``` + +## Templates + +Notification templates can be customized with RocketChat [attachments](https://developer.rocket.chat/api/rest-api/methods/chat/postmessage#attachments-detail). + +*Note: Attachments structure in Rocketchat is same with Slack attachments [feature](https://api.slack.com/messaging/composing/layouts).* + + + +The message attachments can be specified in `attachments` string fields under `rocketchat` field: + +```yaml +template.app-sync-status: | + message: | + Application {{.app.metadata.name}} sync is {{.app.status.sync.status}}. + Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}. + rocketchat: + attachments: | + [{ + "title": "{{.app.metadata.name}}", + "title_link": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}", + "color": "#18be52", + "fields": [{ + "title": "Sync Status", + "value": "{{.app.status.sync.status}}", + "short": true + }, { + "title": "Repository", + "value": "{{.app.spec.source.repoURL}}", + "short": true + }] + }] +``` diff --git a/docs/generated/notification-services/slack.md b/docs/generated/notification-services/slack.md new file mode 100755 index 0000000000..0cd9a0f177 --- /dev/null +++ b/docs/generated/notification-services/slack.md @@ -0,0 +1,169 @@ +# Slack + +If you want to send message using incoming webhook, you can use [webhook](./webhook.md#send-slack). + +## Parameters + +The Slack notification service configuration includes following settings: + +* `token` - the app token +* `apiURL` - optional, the server url, e.g. https://example.com/api +* `username` - optional, the app username +* `icon` - optional, the app icon, e.g. :robot_face: or https://example.com/image.png +* `insecureSkipVerify` - optional bool, true or false + +## Configuration + +1. Create Slack Application using https://api.slack.com/apps?new_app=1 +![1](https://user-images.githubusercontent.com/426437/73604308-4cb0c500-4543-11ea-9092-6ca6bae21cbb.png) +1. Once application is created navigate to `Enter OAuth & Permissions` +![2](https://user-images.githubusercontent.com/426437/73604309-4d495b80-4543-11ea-9908-4dea403d3399.png) +1. Click `Permissions` under `Add features and functionality` section and add `chat:write` scope. To use the optional username and icon overrides in the Slack notification service also add the `chat:write.customize` scope. +![3](https://user-images.githubusercontent.com/426437/73604310-4d495b80-4543-11ea-8576-09cd91aea0e5.png) +1. Scroll back to the top, click 'Install App to Workspace' button and confirm the installation. +![4](https://user-images.githubusercontent.com/426437/73604311-4d495b80-4543-11ea-9155-9d216b20ec86.png) +1. Once installation is completed copy the OAuth token. +![5](https://user-images.githubusercontent.com/426437/73604312-4d495b80-4543-11ea-832b-a9d9d5e4bc29.png) + +1. Create a public or private channel, for this example `my_channel` +1. Invite your slack bot to this channel **otherwise slack bot won't be able to deliver notifications to this channel** +1. Store Oauth access token in `argocd-notifications-secret` secret + +```yaml + apiVersion: v1 + kind: Secret + metadata: + name: + stringData: + slack-token: +``` + +1. Define service type slack in data section of `argocd-notifications-cm` configmap: + +```yaml + apiVersion: v1 + kind: ConfigMap + metadata: + name: + data: + service.slack: | + token: $slack-token +``` + +1. Add annotation in application yaml file to enable notifications for specific argocd app + +```yaml + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + annotations: + notifications.argoproj.io/subscribe.on-sync-succeeded.slack: my_channel +``` + +1. Annotation with more than one trigger multiple of destinations and recipients + +```yaml + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + annotations: + notifications.argoproj.io/subscriptions: | + - trigger: [on-scaling-replica-set, on-rollout-updated, on-rollout-step-completed] + destinations: + - service: slack + recipients: [my-channel-1, my-channel-2] + - service: email + recipients: [recipient-1, recipient-2, recipient-3 ] + - trigger: [on-rollout-aborted, on-analysis-run-failed, on-analysis-run-error] + destinations: + - service: slack + recipients: [my-channel-21, my-channel-22] +``` + +## Templates + +Notification templates can be customized to leverage slack message blocks and attachments +[feature](https://api.slack.com/messaging/composing/layouts). + +![](https://user-images.githubusercontent.com/426437/72776856-6dcef880-3bc8-11ea-8e3b-c72df16ee8e6.png) + +The message blocks and attachments can be specified in `blocks` and `attachments` string fields under `slack` field: + +```yaml +template.app-sync-status: | + message: | + Application {{.app.metadata.name}} sync is {{.app.status.sync.status}}. + Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}. + slack: + attachments: | + [{ + "title": "{{.app.metadata.name}}", + "title_link": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}", + "color": "#18be52", + "fields": [{ + "title": "Sync Status", + "value": "{{.app.status.sync.status}}", + "short": true + }, { + "title": "Repository", + "value": "{{.app.spec.source.repoURL}}", + "short": true + }] + }] +``` + +The messages can be aggregated to the slack threads by grouping key which can be specified in a `groupingKey` string field under `slack` field. +`groupingKey` is used across each template and works independently on each slack channel. +When multiple applications will be updated at the same time or frequently, the messages in slack channel can be easily read by aggregating with git commit hash, application name, etc. +Furthermore, the messages can be broadcast to the channel at the specific template by `notifyBroadcast` field. + +```yaml +template.app-sync-status: | + message: | + Application {{.app.metadata.name}} sync is {{.app.status.sync.status}}. + Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}. + slack: + attachments: | + [{ + "title": "{{.app.metadata.name}}", + "title_link": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}", + "color": "#18be52", + "fields": [{ + "title": "Sync Status", + "value": "{{.app.status.sync.status}}", + "short": true + }, { + "title": "Repository", + "value": "{{.app.spec.source.repoURL}}", + "short": true + }] + }] + # Aggregate the messages to the thread by git commit hash + groupingKey: "{{.app.status.sync.revision}}" + notifyBroadcast: false +template.app-sync-failed: | + message: | + Application {{.app.metadata.name}} sync is {{.app.status.sync.status}}. + Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}. + slack: + attachments: | + [{ + "title": "{{.app.metadata.name}}", + "title_link": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}", + "color": "#ff0000", + "fields": [{ + "title": "Sync Status", + "value": "{{.app.status.sync.status}}", + "short": true + }, { + "title": "Repository", + "value": "{{.app.spec.source.repoURL}}", + "short": true + }] + }] + # Aggregate the messages to the thread by git commit hash + groupingKey: "{{.app.status.sync.revision}}" + notifyBroadcast: true +``` + +The message is sent according to the `deliveryPolicy` string field under the `slack` field. The available modes are `Post` (default), `PostAndUpdate`, and `Update`. The `PostAndUpdate` and `Update` settings require `groupingKey` to be set. diff --git a/docs/generated/notification-services/teams.md b/docs/generated/notification-services/teams.md new file mode 100755 index 0000000000..eb50f5538c --- /dev/null +++ b/docs/generated/notification-services/teams.md @@ -0,0 +1,126 @@ +# Teams + +## Parameters + +The Teams notification service send message notifications using Teams bot and requires specifying the following settings: + +* `recipientUrls` - the webhook url map, e.g. `channelName: https://example.com` + +## Configuration + +1. Open `Teams` and goto `Apps` +2. Find `Incoming Webhook` microsoft app and click on it +3. Press `Add to a team` -> select team and channel -> press `Set up a connector` +4. Enter webhook name and upload image (optional) +5. Press `Create` then copy webhook url and store it in `argocd-notifications-secret` and define it in `argocd-notifications-cm` + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.teams: | + recipientUrls: + channelName: $channel-teams-url +``` + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: +stringData: + channel-teams-url: https://example.com +``` + +6. Create subscription for your Teams integration: + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + notifications.argoproj.io/subscribe.on-sync-succeeded.teams: channelName +``` + +## Templates + +![](https://user-images.githubusercontent.com/18019529/114271500-9d2b8880-9a4c-11eb-85c1-f6935f0431d5.png) + +Notification templates can be customized to leverage teams message sections, facts, themeColor, summary and potentialAction [feature](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using). + +```yaml +template.app-sync-succeeded: | + teams: + themeColor: "#000080" + sections: | + [{ + "facts": [ + { + "name": "Sync Status", + "value": "{{.app.status.sync.status}}" + }, + { + "name": "Repository", + "value": "{{.app.spec.source.repoURL}}" + } + ] + }] + potentialAction: |- + [{ + "@type":"OpenUri", + "name":"Operation Details", + "targets":[{ + "os":"default", + "uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true" + }] + }] + title: Application {{.app.metadata.name}} has been successfully synced + text: Application {{.app.metadata.name}} has been successfully synced at {{.app.status.operationState.finishedAt}}. + summary: "{{.app.metadata.name}} sync succeeded" +``` + +### facts field + +You can use `facts` field instead of `sections` field. + +```yaml +template.app-sync-succeeded: | + teams: + facts: | + [{ + "name": "Sync Status", + "value": "{{.app.status.sync.status}}" + }, + { + "name": "Repository", + "value": "{{.app.spec.source.repoURL}}" + }] +``` + +### theme color field + +You can set theme color as hex string for the message. + +![](https://user-images.githubusercontent.com/1164159/114864810-0718a900-9e24-11eb-8127-8d95da9544c1.png) + +```yaml +template.app-sync-succeeded: | + teams: + themeColor: "#000080" +``` + +### summary field + +You can set a summary of the message that will be shown on Notifcation & Activity Feed + +![](https://user-images.githubusercontent.com/6957724/116587921-84c4d480-a94d-11eb-9da4-f365151a12e7.jpg) + +![](https://user-images.githubusercontent.com/6957724/116588002-99a16800-a94d-11eb-807f-8626eb53b980.jpg) + +```yaml +template.app-sync-succeeded: | + teams: + summary: "Sync Succeeded" +``` \ No newline at end of file diff --git a/docs/generated/notification-services/telegram.md b/docs/generated/notification-services/telegram.md new file mode 100755 index 0000000000..953c2a9fca --- /dev/null +++ b/docs/generated/notification-services/telegram.md @@ -0,0 +1,35 @@ +# Telegram + +1. Get an API token using [@Botfather](https://t.me/Botfather). +2. Store token in `` Secret and configure telegram integration +in `` ConfigMap: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.telegram: | + token: $telegram-token +``` + +3. Create new Telegram [channel](https://telegram.org/blog/channels). +4. Add your bot as an administrator. +5. Use this channel `username` (public channel) or `chatID` (private channel) in the subscription for your Telegram integration: + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + notifications.argoproj.io/subscribe.on-sync-succeeded.telegram: username +``` + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + notifications.argoproj.io/subscribe.on-sync-succeeded.telegram: -1000000000000 +``` diff --git a/docs/generated/notification-services/webex.md b/docs/generated/notification-services/webex.md new file mode 100755 index 0000000000..440ed1ddc7 --- /dev/null +++ b/docs/generated/notification-services/webex.md @@ -0,0 +1,41 @@ +# Webex Teams + +## Parameters + +The Webex Teams notification service configuration includes following settings: + +* `token` - the app token + +## Configuration + +1. Create a Webex [Bot](https://developer.webex.com/docs/bots) +1. Copy the bot access [token](https://developer.webex.com/my-apps) and store it in the `argocd-notifications-secret` Secret and configure Webex Teams integration in `argocd-notifications-cm` ConfigMap + + ``` yaml + apiVersion: v1 + kind: Secret + metadata: + name: + stringData: + webex-token: + ``` + + ``` yaml + apiVersion: v1 + kind: ConfigMap + metadata: + name: + data: + service.webex: | + token: $webex-token + ``` + +1. Create subscription for your Webex Teams integration + + ``` yaml + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + annotations: + notifications.argoproj.io/subscribe..webex: + ``` diff --git a/docs/generated/notification-services/webhook.md b/docs/generated/notification-services/webhook.md new file mode 100755 index 0000000000..bd45b1f69e --- /dev/null +++ b/docs/generated/notification-services/webhook.md @@ -0,0 +1,189 @@ +# Webhook + +The webhook notification service allows sending a generic HTTP request using the templatized request body and URL. +Using Webhook you might trigger a Jenkins job, update Github commit status. + +## Parameters + +The Webhook notification service configuration includes following settings: + +- `url` - the url to send the webhook to +- `headers` - optional, the headers to pass along with the webhook +- `basicAuth` - optional, the basic authentication to pass along with the webook +- `insecureSkipVerify` - optional bool, true or false + +## Configuration + +Use the following steps to configure webhook: + +1 Register webhook in `argocd-notifications-cm` ConfigMap: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.webhook.: | + url: https:/// + headers: #optional headers + - name: + value: + basicAuth: #optional username password + username: + password: + insecureSkipVerify: true #optional bool +``` + +2 Define template that customizes webhook request method, path and body: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + template.github-commit-status: | + webhook: + : + method: POST # one of: GET, POST, PUT, PATCH. Default value: GET + path: + body: | + + trigger.: | + - when: app.status.operationState.phase in ['Succeeded'] + send: [github-commit-status] +``` + +3 Create subscription for webhook integration: + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + notifications.argoproj.io/subscribe..: "" +``` + +## Examples + +### Set Github commit status + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.webhook.github: | + url: https://api.github.com + headers: #optional headers + - name: Authorization + value: token $github-token +``` + +2 Define template that customizes webhook request method, path and body: + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.webhook.github: | + url: https://api.github.com + headers: #optional headers + - name: Authorization + value: token $github-token + + template.github-commit-status: | + webhook: + github: + method: POST + path: /repos/{{call .repo.FullNameByRepoURL .app.spec.source.repoURL}}/statuses/{{.app.status.operationState.operation.sync.revision}} + body: | + { + {{if eq .app.status.operationState.phase "Running"}} "state": "pending"{{end}} + {{if eq .app.status.operationState.phase "Succeeded"}} "state": "success"{{end}} + {{if eq .app.status.operationState.phase "Error"}} "state": "error"{{end}} + {{if eq .app.status.operationState.phase "Failed"}} "state": "error"{{end}}, + "description": "ArgoCD", + "target_url": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}", + "context": "continuous-delivery/{{.app.metadata.name}}" + } +``` + +### Start Jenkins Job + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.webhook.jenkins: | + url: http:///job//build?token= + basicAuth: + username: + password: + +type: Opaque +``` + +### Send form-data + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.webhook.form: | + url: https://form.example.com + headers: + - name: Content-Type + value: application/x-www-form-urlencoded + + template.form-data: | + webhook: + form: + method: POST + body: key1=value1&key2=value2 +``` + +### Send Slack + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: +data: + service.webhook.slack_webhook: | + url: https://hooks.slack.com/services/xxxxx + headers: + - name: Content-Type + value: application/json + + template.send-slack: | + webhook: + slack_webhook: + method: POST + body: | + { + "attachments": [{ + "title": "{{.app.metadata.name}}", + "title_link": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}", + "color": "#18be52", + "fields": [{ + "title": "Sync Status", + "value": "{{.app.status.sync.status}}", + "short": true + }, { + "title": "Repository", + "value": "{{.app.spec.source.repoURL}}", + "short": true + }] + }] + } +``` diff --git a/experiments/experiment.go b/experiments/experiment.go index 0ab5d3bb8a..29980309d8 100644 --- a/experiments/experiment.go +++ b/experiments/experiment.go @@ -294,6 +294,9 @@ func (ec *experimentContext) createTemplateService(template *v1alpha1.TemplateSp Port: port.ContainerPort, TargetPort: intstr.FromInt(int(port.ContainerPort)), } + if port.Name != "" { + servicePort.Name = port.Name + } ports = append(ports, servicePort) } } diff --git a/hack/gen-docs/main.go b/hack/gen-docs/main.go index d4adfacc5b..b1201f2ba7 100644 --- a/hack/gen-docs/main.go +++ b/hack/gen-docs/main.go @@ -41,8 +41,14 @@ func generateNotificationsDocs() { func generatePluginsDocs() { tf, o := options.NewFakeArgoRolloutsOptions() + + //Set static config dir so that gen docs does not change depending on what machine it is ran on + configDir := "$HOME/.kube/cache" + o.ConfigFlags.CacheDir = &configDir + defer tf.Cleanup() cmd := cmd.NewCmdArgoRollouts(o) + os.RemoveAll("./docs/generated/kubectl-argo-rollouts") os.MkdirAll("./docs/generated/kubectl-argo-rollouts/", 0755) files, err := GenMarkdownTree(cmd, "./docs/generated/kubectl-argo-rollouts") diff --git a/pkg/apis/rollouts/v1alpha1/generated.pb.go b/pkg/apis/rollouts/v1alpha1/generated.pb.go index 4358f12dfe..872df50042 100644 --- a/pkg/apis/rollouts/v1alpha1/generated.pb.go +++ b/pkg/apis/rollouts/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Kubernetes sample-controller Authors. +Copyright 2023 The Kubernetes sample-controller Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rollouts/v1alpha1/generated.proto b/pkg/apis/rollouts/v1alpha1/generated.proto index 24d8691189..d016cbb857 100644 --- a/pkg/apis/rollouts/v1alpha1/generated.proto +++ b/pkg/apis/rollouts/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2022 The Kubernetes sample-controller Authors. +Copyright 2023 The Kubernetes sample-controller Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rollouts/v1alpha1/openapi_generated.go b/pkg/apis/rollouts/v1alpha1/openapi_generated.go index eb7f7ae285..667be3c6eb 100644 --- a/pkg/apis/rollouts/v1alpha1/openapi_generated.go +++ b/pkg/apis/rollouts/v1alpha1/openapi_generated.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright 2022 The Kubernetes sample-controller Authors. +Copyright 2023 The Kubernetes sample-controller Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rollouts/v1alpha1/types.go b/pkg/apis/rollouts/v1alpha1/types.go index b6f4f9a0f7..95d03e9131 100755 --- a/pkg/apis/rollouts/v1alpha1/types.go +++ b/pkg/apis/rollouts/v1alpha1/types.go @@ -58,7 +58,7 @@ type RolloutSpec struct { MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"` // The window in which a rollback will be fast tracked (fully promoted) // +optional - RollbackWindow *RollbackWindowSpec `json:"rollbackWindow,omtempty" protobuf:"bytes,13,opt,name=rollbackWindow"` + RollbackWindow *RollbackWindowSpec `json:"rollbackWindow,omitempty" protobuf:"bytes,13,opt,name=rollbackWindow"` // The deployment strategy to use to replace existing pods with new ones. // +optional Strategy RolloutStrategy `json:"strategy" protobuf:"bytes,5,opt,name=strategy"` diff --git a/rollout/experiment.go b/rollout/experiment.go index a6d3bdcd43..aeac6e8049 100644 --- a/rollout/experiment.go +++ b/rollout/experiment.go @@ -64,7 +64,9 @@ func GetExperimentFromTemplate(r *v1alpha1.Rollout, stableRS, newRS *appsv1.Repl Name: templateStep.Name, Replicas: templateStep.Replicas, } - template.Service = &v1alpha1.TemplateService{} + if templateStep.Weight != nil { + template.Service = &v1alpha1.TemplateService{} + } templateRS := &appsv1.ReplicaSet{} switch templateStep.SpecRef { case v1alpha1.CanarySpecRef: diff --git a/rollout/experiment_test.go b/rollout/experiment_test.go index 1c60e9f7c7..e2e50c1f28 100644 --- a/rollout/experiment_test.go +++ b/rollout/experiment_test.go @@ -791,7 +791,7 @@ func TestRolloutCreateExperimentWithService(t *testing.T) { Replicas: pointer.Int32Ptr(1), Weight: pointer.Int32Ptr(5), }, - // Service should also be created for "canary-template" + // Service should NOT be created for "canary-template" { Name: "canary-template", SpecRef: v1alpha1.CanarySpecRef, @@ -818,5 +818,5 @@ func TestRolloutCreateExperimentWithService(t *testing.T) { assert.NotNil(t, ex.Spec.Templates[0].Service) assert.Equal(t, "canary-template", ex.Spec.Templates[1].Name) - assert.NotNil(t, ex.Spec.Templates[1].Service) + assert.Nil(t, ex.Spec.Templates[1].Service) } diff --git a/rollout/trafficrouting/istio/istio.go b/rollout/trafficrouting/istio/istio.go index dfd173e120..c13426782b 100644 --- a/rollout/trafficrouting/istio/istio.go +++ b/rollout/trafficrouting/istio/istio.go @@ -1499,7 +1499,10 @@ func (r *Reconciler) RemoveManagedRoutes() error { return fmt.Errorf("[RemoveManagedRoutes] failed to get http routes from virtual service: %w", err) } if !found { - return fmt.Errorf("[RemoveManagedRoutes] %s: %w", SpecHttpNotFound, err) + // This could happen when only TLS routes are defined. We don't need to do anything else and hence we return early + // because tls routes do not support header and mirroring which are features that require the use of managed routes. + log.Debugf("[RemoveManagedRoutes] %s: not removing any routes", SpecHttpNotFound) + return nil } managedRoutes := r.rollout.Spec.Strategy.Canary.TrafficRouting.ManagedRoutes diff --git a/rollout/trafficrouting/istio/istio_test.go b/rollout/trafficrouting/istio/istio_test.go index 6404852f55..fa4330f363 100644 --- a/rollout/trafficrouting/istio/istio_test.go +++ b/rollout/trafficrouting/istio/istio_test.go @@ -2463,6 +2463,34 @@ func TestHttpReconcileMirrorRoute(t *testing.T) { } +func TestSingleTlsRouteReconcile(t *testing.T) { + ro := rolloutWithTlsRoutes("stable", "canary", "vsvc", []v1alpha1.TLSRoute{{ + Port: 3000, + SNIHosts: nil, + }}) + + obj := unstructuredutil.StrToUnstructuredUnsafe(singleRouteTlsVsvc) + client := testutil.NewFakeDynamicClient(obj) + vsvcLister, druleLister := getIstioListers(client) + r := NewReconciler(ro, client, record.NewFakeEventRecorder(), vsvcLister, druleLister) + client.ClearActions() + + err := r.SetWeight(30, v1alpha1.WeightDestination{}) + assert.Nil(t, err) + iVirtualService, err := client.Resource(istioutil.GetIstioVirtualServiceGVR()).Namespace(r.rollout.Namespace).Get(context.TODO(), ro.Spec.Strategy.Canary.TrafficRouting.Istio.VirtualService.Name, metav1.GetOptions{}) + assert.NoError(t, err) + tlsRoutes := extractTlsRoutes(t, iVirtualService) + assert.Equal(t, len(tlsRoutes), 1) + assert.Equal(t, tlsRoutes[0].Route[0].Weight, int64(70)) + assert.Equal(t, tlsRoutes[0].Route[1].Weight, int64(30)) + + err = r.RemoveManagedRoutes() + assert.NoError(t, err) + + _, err = client.Resource(istioutil.GetIstioVirtualServiceGVR()).Namespace(r.rollout.Namespace).Get(context.TODO(), ro.Spec.Strategy.Canary.TrafficRouting.Istio.VirtualService.Name, metav1.GetOptions{}) + assert.NoError(t, err) +} + func TestHttpReconcileMirrorRouteWithExtraFields(t *testing.T) { ro := rolloutWithHttpRoutes("stable", "canary", "vsvc", []string{"primary"}) obj := unstructuredutil.StrToUnstructuredUnsafe(regularVsvcWithExtra) diff --git a/server/server.go b/server/server.go index a69d90d5f0..cbb742333d 100644 --- a/server/server.go +++ b/server/server.go @@ -372,6 +372,7 @@ func (s *ArgoRolloutsServer) AbortRollout(ctx context.Context, q *rollout.AbortR func (s *ArgoRolloutsServer) getRollout(namespace string, name string) (*v1alpha1.Rollout, error) { rolloutsInformerFactory := rolloutinformers.NewSharedInformerFactoryWithOptions(s.Options.RolloutsClientset, 0, rolloutinformers.WithNamespace(namespace)) + cache.WaitForCacheSync(s.stopCh, rolloutsInformerFactory.Argoproj().V1alpha1().Rollouts().Informer().HasSynced) rolloutsLister := rolloutsInformerFactory.Argoproj().V1alpha1().Rollouts().Lister().Rollouts(namespace) return rolloutsLister.Get(name) } diff --git a/test/e2e/experiment_test.go b/test/e2e/experiment_test.go index 4ff844cb50..1d7262b099 100644 --- a/test/e2e/experiment_test.go +++ b/test/e2e/experiment_test.go @@ -99,6 +99,27 @@ func (s *ExperimentSuite) TestExperimentWithServiceAndScaleDownDelay() { ExpectExperimentServiceCount("experiment-with-service", 0) } +func (s *ExperimentSuite) TestExperimentWithMultiportServiceAndScaleDownDelay() { + g := s.Given() + g.ApplyManifests("@functional/experiment-with-multiport-service.yaml") + g.When(). + WaitForExperimentPhase("experiment-with-multiport-service", "Running"). + WaitForExperimentCondition("experiment-with-multiport-service", func(ex *rov1.Experiment) bool { + return s.GetReplicaSetFromExperiment(ex, "test").Status.Replicas == 1 + }, "number-of-rs-pods-meet", fixtures.E2EWaitTimeout). + Then(). + ExpectExperimentTemplateReplicaSetNumReplicas("experiment-with-multiport-service", "test", 1). + ExpectExperimentServiceCount("experiment-with-multiport-service", 1). + When(). + WaitForExperimentPhase("experiment-with-multiport-service", "Successful"). + WaitForExperimentCondition("experiment-with-multiport-service", func(ex *rov1.Experiment) bool { + return s.GetReplicaSetFromExperiment(ex, "test").Status.Replicas == 0 + }, "number-of-rs-pods-meet", fixtures.E2EWaitTimeout). + Then(). + ExpectExperimentTemplateReplicaSetNumReplicas("experiment-with-multiport-service", "test", 0). + ExpectExperimentServiceCount("experiment-with-multiport-service", 0) +} + func (s *ExperimentSuite) TestExperimentWithDryRunMetrics() { g := s.Given() g.ApplyManifests("@functional/experiment-dry-run-analysis.yaml") diff --git a/test/e2e/functional/experiment-with-multiport-service.yaml b/test/e2e/functional/experiment-with-multiport-service.yaml new file mode 100644 index 0000000000..a9cb44da60 --- /dev/null +++ b/test/e2e/functional/experiment-with-multiport-service.yaml @@ -0,0 +1,37 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Experiment +metadata: + name: experiment-with-multiport-service +spec: + duration: 10s + scaleDownDelaySeconds: 5 + # List of pod template specs to run in the experiment as ReplicaSets + templates: + - name: test + replicas: 1 + service: {} + selector: + matchLabels: + app: experiment-with-multiport-service + template: + metadata: + labels: + app: experiment-with-multiport-service + spec: + containers: + - name: experiment-with-multiport-service + image: nginx:1.19-alpine + resources: + requests: + memory: 16Mi + cpu: 1m + ports: + - name: testport1 + protocol: TCP + containerPort: 8080 + - name: testport2 + protocol: TCP + containerPort: 8081 + - name: testport3 + protocol: TCP + containerPort: 8082 diff --git a/test/e2e/istio/istio-host-only-tls-split.yaml b/test/e2e/istio/istio-host-only-tls-split.yaml new file mode 100644 index 0000000000..15abd8b36d --- /dev/null +++ b/test/e2e/istio/istio-host-only-tls-split.yaml @@ -0,0 +1,90 @@ +apiVersion: v1 +kind: Service +metadata: + name: istio-host-split-tls-canary +spec: + ports: + - port: 80 + targetPort: http + protocol: TCP + name: http + selector: + app: istio-host-split-tls + +--- +apiVersion: v1 +kind: Service +metadata: + name: istio-host-split-tls-stable +spec: + ports: + - port: 80 + targetPort: http + protocol: TCP + name: http + selector: + app: istio-host-split-tls + +--- +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: istio-host-split-tls-vsvc +spec: + hosts: + - istio-host-split-tls + tls: + - match: + - port: 3000 + sniHosts: + - istio-host-split-tls + route: + - destination: + host: istio-host-split-tls-stable + weight: 100 + - destination: + host: istio-host-split-tls-canary + weight: 0 + +--- +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: istio-host-split-tls +spec: + strategy: + canary: + canaryService: istio-host-split-tls-canary + stableService: istio-host-split-tls-stable + trafficRouting: + istio: + virtualService: + name: istio-host-split-tls-vsvc + routes: + - primary + tlsRoutes: + - port: 3000 + sniHosts: + - istio-host-split-tls + steps: + - setWeight: 10 + - pause: {} + selector: + matchLabels: + app: istio-host-split-tls + template: + metadata: + labels: + app: istio-host-split-tls + spec: + containers: + - name: istio-host-split-tls + image: nginx:1.19-alpine + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: + requests: + memory: 16Mi + cpu: 5m diff --git a/test/e2e/istio_test.go b/test/e2e/istio_test.go index 2a0b2fe7c2..2f993f09bc 100644 --- a/test/e2e/istio_test.go +++ b/test/e2e/istio_test.go @@ -111,6 +111,69 @@ func (s *IstioSuite) TestIstioHostSplit() { } } +func (s *IstioSuite) TestIstioHostSplitOnlyTls() { + + tests := []struct { + filename string + }{ + { + "@istio/istio-host-only-tls-split.yaml", + }, + } + + for _, tc := range tests { + + s.Given(). + RolloutObjects(tc.filename). + When(). + ApplyManifests(). + WaitForRolloutStatus("Healthy"). + Then(). + Assert(func(t *fixtures.Then) { + vsvc := t.GetVirtualService() + assert.Equal(s.T(), int64(100), vsvc.Spec.TLS[0].Route[0].Weight) + assert.Equal(s.T(), int64(0), vsvc.Spec.TLS[0].Route[1].Weight) + desired, stable := t.GetServices() + rs1 := t.GetReplicaSetByRevision("1") + assert.Equal(s.T(), rs1.Spec.Template.Labels[v1alpha1.DefaultRolloutUniqueLabelKey], desired.Spec.Selector[v1alpha1.DefaultRolloutUniqueLabelKey]) + assert.Equal(s.T(), rs1.Spec.Template.Labels[v1alpha1.DefaultRolloutUniqueLabelKey], stable.Spec.Selector[v1alpha1.DefaultRolloutUniqueLabelKey]) + }). + When(). + UpdateSpec(). + WaitForRolloutStatus("Paused"). + Then(). + Assert(func(t *fixtures.Then) { + vsvc := t.GetVirtualService() + assert.Equal(s.T(), int64(90), vsvc.Spec.TLS[0].Route[0].Weight) + assert.Equal(s.T(), int64(10), vsvc.Spec.TLS[0].Route[1].Weight) + + desired, stable := t.GetServices() + rs1 := t.GetReplicaSetByRevision("1") + rs2 := t.GetReplicaSetByRevision("2") + assert.Equal(s.T(), rs2.Spec.Template.Labels[v1alpha1.DefaultRolloutUniqueLabelKey], desired.Spec.Selector[v1alpha1.DefaultRolloutUniqueLabelKey]) + assert.Equal(s.T(), rs1.Spec.Template.Labels[v1alpha1.DefaultRolloutUniqueLabelKey], stable.Spec.Selector[v1alpha1.DefaultRolloutUniqueLabelKey]) + }). + When(). + PromoteRollout(). + WaitForRolloutStatus("Healthy"). + Sleep(1*time.Second). // stable is currently set first, and then changes made to VirtualServices/DestinationRules + Then(). + Assert(func(t *fixtures.Then) { + vsvc := t.GetVirtualService() + assert.Equal(s.T(), int64(100), vsvc.Spec.TLS[0].Route[0].Weight) + assert.Equal(s.T(), int64(0), vsvc.Spec.TLS[0].Route[1].Weight) + + desired, stable := t.GetServices() + rs2 := t.GetReplicaSetByRevision("2") + assert.Equal(s.T(), rs2.Spec.Template.Labels[v1alpha1.DefaultRolloutUniqueLabelKey], desired.Spec.Selector[v1alpha1.DefaultRolloutUniqueLabelKey]) + assert.Equal(s.T(), rs2.Spec.Template.Labels[v1alpha1.DefaultRolloutUniqueLabelKey], stable.Spec.Selector[v1alpha1.DefaultRolloutUniqueLabelKey]) + }). + ExpectRevisionPodCount("1", 1) // don't scale down old replicaset since it will be within scaleDownDelay + + s.TearDownSuite() + } +} + func (s *IstioSuite) TestIstioSubsetSplit() { s.Given(). RolloutObjects("@istio/istio-subset-split.yaml"). diff --git a/ui/package.json b/ui/package.json index 4822da2b68..aaaf3de4cb 100644 --- a/ui/package.json +++ b/ui/package.json @@ -21,7 +21,7 @@ }, "scripts": { "start": "webpack serve --config ./src/app/webpack.dev.js", - "build": "rm -rf dist && webpack --config ./src/app/webpack.prod.js", + "build": "rm -rf dist && NODE_OPTIONS=--openssl-legacy-provider webpack --config ./src/app/webpack.prod.js", "test": "react-scripts test", "eject": "react-scripts eject", "protogen": "../hack/swagger-codegen.sh generate -i ../pkg/apiclient/rollout/rollout.swagger.json -l typescript-fetch -o src/models/rollout/generated" diff --git a/utils/aws/aws.go b/utils/aws/aws.go index 501e17b3ac..b8884a0589 100644 --- a/utils/aws/aws.go +++ b/utils/aws/aws.go @@ -170,17 +170,27 @@ func (c *ClientAdapter) GetTargetGroupMetadata(ctx context.Context, loadBalancer } // Enrich TargetGroups with tag information - tagsIn := elbv2.DescribeTagsInput{ - ResourceArns: tgARNs, - } - tagsOut, err := c.ELBV2.DescribeTags(ctx, &tagsIn) - if err != nil { - return nil, err - } - for _, tagDesc := range tagsOut.TagDescriptions { - for _, tag := range tagDesc.Tags { - if _, ok := tgMetaMap[*tagDesc.ResourceArn]; ok { - tgMetaMap[*tagDesc.ResourceArn].Tags[*tag.Key] = *tag.Value + describeTagsLimit := defaults.GetDescribeTagsLimit() + tgARNsCount := len(tgARNs) + for i := 0; i < tgARNsCount; i += describeTagsLimit { + j := i + describeTagsLimit + if j > tgARNsCount { + // last batch + j = tgARNsCount + } + + tagsIn := elbv2.DescribeTagsInput{ + ResourceArns: tgARNs[i:j], + } + tagsOut, err := c.ELBV2.DescribeTags(ctx, &tagsIn) + if err != nil { + return nil, err + } + for _, tagDesc := range tagsOut.TagDescriptions { + for _, tag := range tagDesc.Tags { + if _, ok := tgMetaMap[*tagDesc.ResourceArn]; ok { + tgMetaMap[*tagDesc.ResourceArn].Tags[*tag.Key] = *tag.Value + } } } } diff --git a/utils/aws/aws_test.go b/utils/aws/aws_test.go index a8b17a1bc2..fb206062d8 100644 --- a/utils/aws/aws_test.go +++ b/utils/aws/aws_test.go @@ -16,6 +16,7 @@ import ( testutil "github.com/argoproj/argo-rollouts/test/util" "github.com/argoproj/argo-rollouts/utils/aws/mocks" + "github.com/argoproj/argo-rollouts/utils/defaults" unstructuredutil "github.com/argoproj/argo-rollouts/utils/unstructured" ) @@ -95,6 +96,7 @@ func TestGetNumericTargetPort(t *testing.T) { } func TestGetTargetGroupMetadata(t *testing.T) { + defaults.SetDescribeTagsLimit(2) fakeELB, c := newFakeClient() // mock the output @@ -106,24 +108,35 @@ func TestGetTargetGroupMetadata(t *testing.T) { { TargetGroupArn: pointer.StringPtr("tg-def456"), }, + { + TargetGroupArn: pointer.StringPtr("tg-ghi789"), + }, }, } fakeELB.On("DescribeTargetGroups", mock.Anything, mock.Anything).Return(&tgOut, nil) - tagsOut := elbv2.DescribeTagsOutput{ - TagDescriptions: []elbv2types.TagDescription{ - { - ResourceArn: pointer.StringPtr("tg-abc123"), + mockDescribeTagsCall := fakeELB.On("DescribeTags", mock.Anything, mock.Anything) + mockDescribeTagsCall.RunFn = func(args mock.Arguments) { + tagsIn := args[1].(*elbv2.DescribeTagsInput) + assert.LessOrEqual(t, len(tagsIn.ResourceArns), defaults.GetDescribeTagsLimit()) + + tagsOut := elbv2.DescribeTagsOutput{ + TagDescriptions: []elbv2types.TagDescription{}, + } + for _, arn := range tagsIn.ResourceArns { + tagsOut.TagDescriptions = append(tagsOut.TagDescriptions, elbv2types.TagDescription{ + ResourceArn: pointer.StringPtr(arn), Tags: []elbv2types.Tag{ { Key: pointer.StringPtr("foo"), Value: pointer.StringPtr("bar"), }, }, - }, - }, + }) + } + + mockDescribeTagsCall.ReturnArguments = mock.Arguments{&tagsOut, nil} } - fakeELB.On("DescribeTags", mock.Anything, mock.Anything).Return(&tagsOut, nil) listenersOut := elbv2.DescribeListenersOutput{ Listeners: []elbv2types.Listener{ @@ -158,14 +171,18 @@ func TestGetTargetGroupMetadata(t *testing.T) { // Test tgMeta, err := c.GetTargetGroupMetadata(context.TODO(), "lb-abc123") assert.NoError(t, err) - assert.Len(t, tgMeta, 2) + assert.Len(t, tgMeta, 3) assert.Equal(t, "tg-abc123", *tgMeta[0].TargetGroup.TargetGroupArn) assert.Equal(t, "bar", tgMeta[0].Tags["foo"]) assert.Equal(t, int32(10), *tgMeta[0].Weight) assert.Equal(t, "tg-def456", *tgMeta[1].TargetGroup.TargetGroupArn) - assert.Len(t, tgMeta[1].Tags, 0) + assert.Equal(t, "bar", tgMeta[1].Tags["foo"]) assert.Nil(t, tgMeta[1].Weight) + + assert.Equal(t, "tg-ghi789", *tgMeta[2].TargetGroup.TargetGroupArn) + assert.Equal(t, "bar", tgMeta[2].Tags["foo"]) + assert.Nil(t, tgMeta[2].Weight) } func TestBuildTargetGroupResourceID(t *testing.T) { diff --git a/utils/defaults/defaults.go b/utils/defaults/defaults.go index db605eb99c..40ed92f05c 100644 --- a/utils/defaults/defaults.go +++ b/utils/defaults/defaults.go @@ -45,6 +45,8 @@ const ( // DefaultMetricCleanupDelay is the default time to delay metrics removal upon object removal, gives time for metrics // to be collected DefaultMetricCleanupDelay = int32(65) + // DefaultDescribeTagsLimit is the default number resources (ARNs) in a single call + DefaultDescribeTagsLimit int = 20 ) const ( @@ -68,6 +70,7 @@ var ( targetGroupBindingAPIVersion = DefaultTargetGroupBindingAPIVersion appmeshCRDVersion = DefaultAppMeshCRDVersion defaultMetricCleanupDelay = DefaultMetricCleanupDelay + defaultDescribeTagsLimit = DefaultDescribeTagsLimit ) const ( @@ -320,3 +323,13 @@ func GetMetricCleanupDelaySeconds() time.Duration { func SetMetricCleanupDelaySeconds(seconds int32) { defaultMetricCleanupDelay = seconds } + +// GetDescribeTagsLimit returns limit of resources can be requested in a single call +func GetDescribeTagsLimit() int { + return defaultDescribeTagsLimit +} + +// SetDescribeTagsLimit sets the limit of resources can be requested in a single call +func SetDescribeTagsLimit(limit int) { + defaultDescribeTagsLimit = limit +} diff --git a/utils/defaults/defaults_test.go b/utils/defaults/defaults_test.go index 2162f1be82..1d981731c2 100644 --- a/utils/defaults/defaults_test.go +++ b/utils/defaults/defaults_test.go @@ -411,4 +411,8 @@ func TestSetDefaults(t *testing.T) { assert.Equal(t, DefaultMetricCleanupDelay, int32(GetMetricCleanupDelaySeconds().Seconds())) SetMetricCleanupDelaySeconds(24) assert.Equal(t, time.Duration(24)*time.Second, GetMetricCleanupDelaySeconds()) + + assert.Equal(t, DefaultDescribeTagsLimit, GetDescribeTagsLimit()) + SetDescribeTagsLimit(2) + assert.Equal(t, 2, GetDescribeTagsLimit()) }