[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: oc .env files




On 15 Dec 2016, at 9:06 AM, Ben Parees <bparees redhat com> wrote:



On Wed, Dec 14, 2016 at 4:53 PM, Clayton Coleman <ccoleman redhat com> wrote:
The process command does now include an "--env-file" option - so you could do "oc process -f template-file.yaml --env-file .oc_env | oc apply -f -"

​I think Phillipe is looking for a "cluster environment definition" file which controls what cluster+namespace the resources are "applied" to, not env variable inputs to the template processing, but that's basically what the .kube/config file specifies/controls today (ie it controls what cluster+project your oc commands are going to operate against)


The problem being though that it can only refer to one cluster at a time. Thus you can easily stuff up when have multiple windows open against apps for different clusters or users and you forgot that you had changed which one you were logged in to. Yes, you can use --cluster=‘’ option (if that works how I think), but still have to remember to add it explicitly, where as if you could capture that in a configuration file in the repo itself and oc would look for it in some way you could be sure you were always working against correct cluster.

BTW, I can’t find any docs about —env-file in oc help strings for that command. Also just noticed that ‘oc options’ sends output to stderr and not stdout which is a bit strange. If using —help on a command still goes to stdout.

Graham


On Wed, Dec 14, 2016 at 4:06 PM, Philippe Lafoucrière <philippe lafoucriere tech-angels.com> wrote:
Hi,

We're having fun with the "oc apply" command, which solves a lot of configuration issues we've had in the past.
There's just one thing I would like to have in oc: a local .oc_env file to define some defaults, like:

- Current cluster url (make sure we're hitting the production cluster, not any of the test clusters)
- Current namespace (to make sure apply won't fu.. up another project if we forget to specify it).

Is there something we could see in the future?

Thanks,
Philippe

-- 
Philippe Lafoucrière - CEO
France : +33 (0) 3 65 96 02 92



_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users



_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users




--
Ben Parees | OpenShift

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]