nodeshift-archived / nodejs-configmap-redhat

This project demonstrates application and runtime configuration leveraging external configuration sources Edit Add topics
Apache License 2.0
0 stars 5 forks source link

configmap example doesn't work on OpenShift #55

Closed hrishin closed 6 years ago

hrishin commented 6 years ago

Problem:

API keep saying "Unable to read the configuration" though configmap does exists. The application fails to query the configmap because of permission issue. However, while applying the given role.resources also fails because of the permission issue.

Solution:

It would be nice to mount the configmap map as a volume/ENV VAR and read the configuration (preferred practice) if it fails to query the configmap.

@lholmquist

lholmquist commented 6 years ago

which openshift is this failing on? OKD, openshift.io, OCP?

hrishin commented 6 years ago

@lholmquist OSO (Openshift Online) for OSIO (openshift.io) use case.

lholmquist commented 6 years ago

how are you deploying it? using the template? using nodeshift?

hrishin commented 6 years ago

@lholmquist using the template https://github.com/bucharest-gold/nodejs-configmap-redhat/blob/master/.openshiftio/resource.roles.yaml. We have also tried using https://github.com/bucharest-gold/nodejs-configmap-redhat/blob/master/Jenkinsfile#L4.

lholmquist commented 6 years ago

@hrishin i guess my question was how is the application deployed? Have you tried any of the other runtimes? for example, https://github.com/openshiftio-vertx-boosters/vertx-configmap-booster-redhat or https://github.com/wildfly-swarm-openshiftio-boosters/wfswarm-configmap

I'm wondering if the issue is just on the node booster

hrishin commented 6 years ago

@lholmquist Yes, I've tried other Java runtimes. It deploys the application using fabric8 maven plugin (FMP) and creates an configmap in Jenkins workflow. However, the application DC has the volume definition pointing to configmap, I guess Java application reads the message template from configuration.

lholmquist commented 6 years ago

@hrishin i'm in the process of adding the configmap as a volume and accessing that way, but could you do me a favor and try this branch, https://github.com/lholmquist/nodejs-configmap-redhat/tree/fun-with-console-log-debugging

i've added some console logs to see where/what the error is

lholmquist commented 6 years ago

@hrishin config map is now a volume mount, here is the PR that got merged #58

I've put in a PR to the launcher booster catalog to update with these latest versions. let me know how it goes

hrishin commented 5 years ago

Lovely @lholmquist

Thank you!