Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollouts Status command does not work with the '--watch false' flag #4112

Open
2 tasks done
andrei-don opened this issue Feb 5, 2025 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@andrei-don
Copy link

andrei-don commented Feb 5, 2025

Checklist:

  • I've included steps to reproduce the bug.
  • I've included the version of argo rollouts.

Describe the bug

I want to get the status of an Argo Rollout without watching the status of the rollout until it is finished. I believe that this is what the '--watch false' flag is for. When setting the flag to false, I am presented with the help menu for the argo rollouts kubectl plugin:

$ kubectl argo rollouts status my-rollout --watch false

Usage:
  kubectl-argo-rollouts status ROLLOUT_NAME [flags]

Examples:
	# Watch the rollout until it succeeds
	kubectl argo rollouts status guestbook

	# Show the rollout status
    kubectl argo rollouts status guestbook --watch false

	# Watch the rollout until it succeeds, fail if it takes more than 60 seconds
	kubectl argo rollouts status --timeout 60s guestbook
	

Flags:
  -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)

Global Flags:
      --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 "/Users/alexstan/.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
      --disable-compression            If true, opt-out of response compression for all requests to the server
      --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

When running the status command without the '--watch false' flag I am seeing the current status or watching the 'live' status in case there is a rollout in progress, which is expected behaviour:

$ kubectl argo rollouts status my-rollout 
                                                                                                                                                                            
Paused - CanaryPauseStep
Progressing - waiting for all steps to complete
Paused - CanaryPauseStep
Progressing - waiting for all steps to complete
Paused - CanaryPauseStep
Progressing - waiting for all steps to complete
Healthy

To Reproduce

Just run the kubectl argo rollouts status --watch false command.

Expected behavior

I am expecting to see a 'snapshot' view of the status at the time when I am running the command. I do not want to watch the status of the rollout as it progresses.

Screenshots

Version

v1.7.2

Logs

# Paste the logs from the rollout controller

# Logs for the entire controller:
kubectl logs -n argo-rollouts deployment/argo-rollouts

# Logs for a specific rollout:
kubectl logs -n argo-rollouts deployment/argo-rollouts | grep rollout=<ROLLOUTNAME

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

@andrei-don andrei-don added the bug Something isn't working label Feb 5, 2025
@andrei-don
Copy link
Author

I found out that the watch flag should be passed explicitly with '=', e.g. kubectl argo rollouts status my-rollout --watch=false. The docs should be amended to reflect that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant