-
Notifications
You must be signed in to change notification settings - Fork 94
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
Preflight to search stdin for secrets containing preflight specs #1146
Comments
Is it possible to store the preflight with |
we should support both, but yes |
PR #1153 is ready for review 👍 |
Released in v0.64.0 |
Describe the rationale for the suggested feature.
Recently we added a feature to allow stdin to be passed to preflight as a source of specs. This included the ability to filter non-preflight spec documents, so that we can run something like
helm template ./chart --values foo.yaml |preflight -
.We recommend that support-bundle specs are installed in cluster as secrets, with a label to identify them.
I would like to have preflight able to search the rendered templates from
helm template
for secrets that contain preflight specs. The specific example is where a preflight is included in a pre-install hook, with a secret for the spec, but we want to run preflight outside of ahelm install
so that we can retrieve the results without having a failed installation to clean up.Describe the feature
Currently stdin looks for docs of
kind: Preflight
. I would like it to also readkind: Secret
with the labeltroubleshoot.io/kind: preflight
, extract the data component, and use that as a spec.Example:
Additional context
This is part of a work relating to helm/community#301 where the output of a Helm pre-install hook can go to stdout. Without that change (which would require the feature to be agreed, merged, released and the end user to upgrade Helm), we need to have preflight checks able to run so that it is easy to obtain the output.
The proposed approach allows us to run preflight checks without needing to run
helm install
, and manually retrieve logs from a failed install. The older version of helm would usepreflight
, newer versions after the above change is merged could use the same chart without modification, but simply usehelm install
with the--atomic
switch.NOTE:
preflight
, is that thepreflight
binary runs on the host that has the client, and the pre-install hook runs a job in a pod in the cluster. This can be overcome by choosing preflights that run as jobs, but without making that choice there is risk of different results between approaches.The text was updated successfully, but these errors were encountered: