openshift / openshift/origin

oc run --env rejects values with a '=' embedded in value.

Open
#7,326 6 comments 0 reactions 1 assignee View on GitHub

@juanvallejo is already working on this.

Since Feb 10, 2018.

component/cli lifecycle/frozen priority/P2
Dominant language
Go
Stars
8.7k
Forks
4.8k
Avg merge
4d 10h
Merged PRs (30d)
53

Description

Appears that you cannot supply environment variables via --env option of oc run which have a '=' embedded within the value.

$ oc run busybox-shell --image busybox --env VAR='A=B'
error: invalid env: VAR=A=B

This was with oc version of:

oc v1.1.1
kubernetes v1.1.0-origin-1107-g4c8e6f4

A quick test of oc new-app didn't appear to have same issue.

$ oc new-app --dry-run busybox --env VAR='A=B'
--> Found Docker image c1bc9b4 (4 weeks old) from Docker Hub for "busybox"
    * An image stream will be created as "busybox:latest" that will track this image
    * This image will be deployed in deployment config "busybox"
    * [WARNING] Image "busybox" runs as the 'root' user which may not be permitted by your cluster administrator
    * The image does not expose any ports - if you want to load balance or send traffic to this component
      you will need to create a service with 'expose dc/busybox --port=[port]' later
--> Creating resources with label app=busybox ...
--> Success (DRY RUN)

Or at least it wasn't rejected straight away on doing a --dry-run.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.