How can I export config options into a support bundle?

Is there a way of getting all the KOTS config options set so we can include them with a support bundle? I don’t really care on the format, but key/value pairs would be the nicest

I can of course copy them over into a config map, but that’s not very DRY as would always have to remember the add things in two places which I’d like to avoid.

Hi Simon - This is a great question. The best I can think of would be to add a collector of type ‘Run Pod’ (Run Pods - Troubleshoot Docs - Troubleshoot Docs) or “Exec” (Executing Commands - Troubleshoot Docs - Troubleshoot Docs) and then run the the kots get config (get config | Replicated Docs) command and capture the output.
Here is a hint on how to use one of the KOTS containers to run an arbitrary command: kots-field-labs/nginx-deployment.yaml at 1102cd3ee16fcb5520ec594334ef010129117ab6 · replicatedhq/kots-field-labs · GitHub

Please do keep in mind that redactors will still redact any info that it would consider sensitive. Here is a list of the default redactors: Redactors - Troubleshoot Docs - Troubleshoot Docs

Perfect, thanks @Fernando_Cremer. I’m not bothered by the redactors clearing down sensitive data (in fact, that’s a good thing).

Hey Simon - I got some time to try this out and got it working by adding the following collector (note that I am using the LicenseFieldValue to make the appSlug dynamic):

    - exec:
        name: "config-values"
        selector:
          - app=kotsadm
        namespace: '{{repl Namespace }}'
        command: ["/kots"]
        args: ["get", "config", "--appslug", '{{repl LicenseFieldValue "appSlug"}}', "--namespace", "{{repl Namespace}}"]

I am using the sample application with the following config:

And this is the result I see when I run the support bundle (FWIW ‘cvcc’ is my namespace):

That works a treat, thanks. PR created [kots]: collect the user config in support bundles by MrSimonEmms · Pull Request #11943 · gitpod-io/gitpod · GitHub

One improvement I made was, rather than hard-coding the appslug name, I used {{repl LicenseFieldValue "numSeats" }} so that it’s driven from the application