Can I use ConfigMaps as Pipelines params in Openshift?

40 Views Asked by At

I've got several pipelines which need to connect to a Windows VM through SSH. The SSH connection information is mostly fixed, it doesn't change unless we need to change the VM for some reason, it doesn't happen much but it is necessary for me to have some kind of parameter so I'm using the pipeline params to allow the user to change the data if needed.

I have been doing some research looking for a way of grouping that information in a ConfigMap or Secret and then refer it in the pipeline template, but haven't been able to find a clear example.

Is there any way of doing this so I can clear the pipeline params form of this information?

1

There are 1 best solutions below

0
On

A Tekton Task allows you to utilize Secrets and ConfigMaps the same way you can with a plain Kubernetes Pod: you can expose them either as volumes in the filesystem or as environment variables.

The documentation includes examples of mounting a ConfigMap as a volume and of using a secret as an environment source.