Reputation: 23187
We are trying to deploy orion into kubernetes.
We're looking for a way to configure it using environment variables or a configuration file.
According documentation we're not quite figure out how to get since it seems that only we can set configuration using command line options.
Any ideas?
Upvotes: 1
Views: 132
Reputation: 12294
Recently Orion has implemented env var support. You can have a look to this section of the documentation about it.
Currently this is implemented in master (so if you use Orion from dockerhub using :latest
you would get it) and it will be available in the next Orion release (2.5.0).
Upvotes: 0
Reputation: 853
As you said and as far as I know the Orion container does not support env vars which makes things only a bit harder.
you need to create a K8s ConfigMap
with all the Orion's configuration vars, ex.
kubectl create configmap orion-config --from-literal='MONGO_DATASTORE=mongo-db`
for instance the mongoDB datastore you are going to use.
then you need to fill in the env of the Orion container in the corresponding K8s Deployment
from such a ConfigMap
ex.
"envFrom": [
{
"configMapRef": {
"name": "orion-config"
}
}
]
and in the container command args you need to reference the ConfigMap
properties through the $(VAR)
syntax defined by K8s, example:
"args": [
"-dbhost",
"$(MONGO_DATASTORE)" ]
I hope this helps
Upvotes: 2