This reenables wait functionality and fixes some small bugs in the logic. Please
note that there are still some naive assumptions made about pods belonging to
DaemonSets and StatefulSets, but that is how the logic was before, so it was not
in scope to modify it for this PR. I will improve this logic in a follow up PR
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
- strip GoVersion from `helm version` test output
- catch some edge cases when GitCommit is unset or less than 7 characters
- add a test case for `helm version --short`
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
This function was introduced because an older version of Go did not correctly strip the port number from the hostname with .Hostname(). This has since been fixed so it's safe to remove this.
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
This commit adds dynamic completion for the commands
helm status <TAB>
helm uninstall <TAB>
helm history <TAB>
helm test run <TAB>
helm upgrade <TAB>
helm get <subcommand> <TAB>
helm rollback <TAB>
Aliases of commands are automatically taken care of, such as
helm delete <TAB>
which is an alias of
helm uninstall
Support for override flags in completion is included for
such dynamic completion.
The list of release names to complete is obtained by running
helm list $(__helm_override_flags) -a -q -m 1000 -f ${filter}
where
${__helm_override_flags} is any user-specified flags part of
--kubeconfig --kube-context --home --namespace -n
${filter} is whatever prefix the user may have already typed
for the release name
Signed-off-by: Marc Khouzam <marc.khouzam@ville.montreal.qc.ca>
The version of Cobra used in dev-v3 is older than the one used
for the master branch (helm v2). Although the dev-v3 branch
was based on master and therefore had the same Cobra version
originally, it was changed a couple of times to choose Cobra
tagged versions instead.
However, the currently used 0.0.3 version of Cobra is older than
the version of Cobra used on the master branch. Therefore, some of the
improvements made to Cobra and used by helm v2 are not available
to helm v3 currently.
This commit brings Cobra to its latest available version of 0.0.4.
Bringing Cobra up-to-date is essential for upcoming work being
prepared for dynamic bash-completion; there are bug fixes in
Cobra that are necessary for dynamic bash-completion to work
properly. Specifically,
spf13/cobra#730
which fixes
spf13/cobra#694
is essential to avoid the risk of colliding and possibly
breaking kubectl dynamic bash-completion once helm v3 has its
own dynamic completion.
Signed-off-by: Marc Khouzam <marc.khouzam@ville.montreal.qc.ca>