so01
so01

Reputation: 1

ConfigMap workspace pod name prefix in Eclipse Che

I'm trying to create a custom Che workspace with a devfile and kubernetes resources. For specific env variables I would like to use a configMap.

But if I try to run the devfile I got the error message that the configMap is not found.

A closer look to the configMap in the k8s cluster shows that Che automatically add the workspace pod name to the configMap name:

{workspacePodName}.{configMapName}

In my devfile I only use the configMap name. That's the reason the configMap is not found. The workspace pod name is automatically generated and everytime different I run the workspace. Is there a possibility to pass the workspace pod name in the devfile for every run? Or can I deactivate that Che automatically adds the workspace pod name to the configMap name in the cluster?

Thanks in advance.

Upvotes: 0

Views: 266

Answers (1)

Serhii Leshchenko
Serhii Leshchenko

Reputation: 116

But if I try to run the devfile I got the error message that the configMap is not found.

Where you got this error? If you use it in Deployment (env var, volumes) defined in Devfile - Che must change references there as well... If it does not and workspace failed to start, feel free to register a new issue in https://github.com/eclipse/che.

It's not possible to disable prefixing. So, if you want to use it from somewhere outside of Workspace, maybe you can put label in config map and then find needed config map using selector...

Upvotes: 1

Related Questions