A.k.a "allow `helm template` to optionally skip api versions check while keeping existing use-cases and features as-is"
This introduces a new flag `--client-only` to `helm template`, so that (1)we can optionally disable the validation at all, (2)while keeping the ability to switch what are validated.
(1) is achieved by changing the semantics of the existing flag `--validate=[true|false]` new in v3 and (2) is achieved by adding `--client-only=[true|false]` that mostly the same as the former `--validate`.
This should address all the three use-cases listed in https://github.com/helm/helm/pull/6729#issuecomment-547249311 after fixing other related bugs.
Closes#6505
Replaces #6729
---
Even though the semantics of the existing flag `--validate` has changed, the existing and default behavior of `helm template` is maintained. That is, `helm template` without any flags means `do client-only validation` before/after this change.
Regarding changes in the `--validate`, as you can see from the existing code-base and the description of the flag, unlike it's name, it had been used for toggling the client-only mode of the validation. For instance, `helm template [--validate=false]` had been left api versions check running even though, `--validate=false` or omitting the flag would had disabled the whole validation according to it's name.
This change adds `--client-only` so that we can toggle the validation and the client-only mode separately, which allows more granular control, and more specifically, support the `do not validate at all` scenario.
Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>