troubleshoot icon indicating copy to clipboard operation
troubleshoot copied to clipboard

Secrets/configMaps that contain specs have a confusing and non-intuitive key name requirement

Open xavpaice opened this issue 2 years ago • 1 comments

Bug Description

When writing secrets or configmaps to contain support-bundle or preflight specs, the resources need to have a label to identify them as such. In addition, the data item needs a specific key for the data to be located in.

For preflight: preflight.yaml for support-bundle: support-bundle-spec

This is inconsistent, and actually unnecessary if there is only one data key.

Expected Behavior

The Troubleshoot binary uses the entire data from the secret or configmap, regardless of the key name. It could, conceivably, iterate over all data items in the resource collecting a spec from each.

xavpaice avatar Jun 12 '23 05:06 xavpaice

The relevant code that handles this behaviour is https://github.com/replicatedhq/troubleshoot/blob/1dedbcd67a444a9d5223624a42c78b9112be2947/pkg/loader/loader.go#L240-L289

banjoh avatar Aug 30 '23 13:08 banjoh