0

When I exectue this command:

oc set env --from=secret/mysqldb dc/hola

I get this configuration in deployment environment

enter image description here

Is there a way to set the deployment configuration using OpenShift CLI so the secret is set in environment from section as shown in the image below?

enter image description here

iperezmel78
  • 415
  • 5
  • 20

1 Answers1

0

When deploying your application you can add it via flag

oc new-app

is the base command

and then you add the --build-secret flag.

You final command will look something like this:

$ oc new-build \
    openshift/wildfly-101-centos7~https://github.com/wildfly/quickstart.git \
    --context-dir helloworld --build-secret “secret-mvn” \
    --build-config-map "settings-mvn"

Documentation reference

Rick Rackow
  • 1,490
  • 8
  • 19