User Story
As a cloudctl user, I want to run cloudctl sync without flags after a one-time setup, so that syncing my kubeconfig is a single command rather than a long invocation.
Description
The current sync command requires at minimum --greenhouse-cluster-namespace on every invocation, and in practice users also need --greenhouse-cluster-context and sometimes --greenhouse-cluster-kubeconfig when the Greenhouse cluster is just one context among many in their default kubeconfig. This makes the command too verbose for daily use.
Current typical real-world invocation:
cloudctl sync \
--greenhouse-cluster-namespace my-org \
--greenhouse-cluster-context greenhouse \
--greenhouse-cluster-kubeconfig ~/.kube/config \
--auth-type exec-plugin \
--kubelogin-path /path/to/kubelogin
These values are stable per user and should only need to be provided once. The fix is to persist them via cloudctl config (the profile mechanism from the set/env issue) so that cloudctl sync with no flags works after a one-time setup. Additionally, --kubelogin-path should default to the version-pinned kubelogin binary managed by cloudctl (once the logon issue lands) rather than requiring kubelogin to be on $PATH.
Acceptance Criteria
Reference Issues
Epic: #70
User Story
Description
The current
synccommand requires at minimum--greenhouse-cluster-namespaceon every invocation, and in practice users also need--greenhouse-cluster-contextand sometimes--greenhouse-cluster-kubeconfigwhen the Greenhouse cluster is just one context among many in their default kubeconfig. This makes the command too verbose for daily use.Current typical real-world invocation:
These values are stable per user and should only need to be provided once. The fix is to persist them via cloudctl config (the profile mechanism from the set/env issue) so that
cloudctl syncwith no flags works after a one-time setup. Additionally,--kubelogin-pathshould default to the version-pinned kubelogin binary managed by cloudctl (once the logon issue lands) rather than requiringkubeloginto be on$PATH.Acceptance Criteria
--greenhouse-cluster-namespace,--greenhouse-cluster-context,--greenhouse-cluster-kubeconfigcan be persisted to cloudctl config and used as defaults bysync--kubelogin-pathdefaults to the cloudctl-managed version-pinned kubelogin binary when available, falling back tokubeloginon$PATHcloudctl syncwith no flags and a valid persisted config produces the same result as the full flag invocationReference Issues
Epic: #70