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

Re: Update command for ConfigMaps --from-file



Thanks, that solves my immediate issue for automating our router config.

Thanks,

Ben Pritchett

On Fri, Sep 9, 2016 at 1:05 PM, Jordan Liggitt <jliggitt redhat com> wrote:
It's a little unintuitive, but you can output the API object from the create command and pipe it to update


oc create configmap foo --from-file=haproxy-config.template --dry-run -o yaml | oc update -f -



On Fri, Sep 9, 2016 at 12:21 PM, Ben Pritchett <bpritche redhat com> wrote:
Curious because I didn't see this in the help for ConfigMaps, but is there a method for updating ConfigMap keys with the --from-file argument?  My use case relates to the instructions for customizing the HAProxy router here: https://docs.openshift.com/enterprise/3.2/install_config/install/deploy_router.html#using-configmap-replace-template

There's "oc create configmap customrouter --from-file=haproxy-config.template" but I don't see a similar "oc update configmap customrouter --from-file=haproxy-config.template" that would simply overwrite the config based on new value changes in the template file.  Is the practice here generally to delete the ConfigMap object and create a new one with the new data?

Also, I know we can manage this create/update via "oc create -f haproxy.template" that includes the entire Kubernetes object with encapsulated file template, but the --from-file option is certainly cleaner for management of this configuration.

Thanks,

Ben Pritchett

_______________________________________________
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]