Bug 1377939 - [platformmanagement_public_624]Should have '--selector' option for 'oc create service' command
Summary: [platformmanagement_public_624]Should have '--selector' option for 'oc create...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Michail Kargakis
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-21 06:03 UTC by zhou ying
Modified: 2018-11-22 15:57 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-22 15:57:18 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description zhou ying 2016-09-21 06:03:37 UTC
Description of problem:
Didn't have '--selector' option for create service , couldn't specify the labels for service.

Version-Release number of selected component (if applicable):
openshift version
openshift v1.4.0-alpha.0+16f2d39
kubernetes v1.4.0-beta.3+d19513f
etcd 3.0.9

How reproducible:
Always

Steps to Reproduce:
1. Login OpenShift and create project;
2. Check help info for create service command;
3. Try to use '--selector' option with create service command;


Actual results:
2. There was no '--selector' option for create service command
3. Prompt error:  unknown flag: --selector


Expected results:
2. Should have selector option for create service.

Additional info:

Comment 1 Michal Fojtik 2016-10-25 14:27:27 UTC
In the kubernetes issue (https://github.com/kubernetes/kubernetes/issues/33253#issuecomment-249596119) we mention that the right approach to this would be to use `oc set selector` (once it will be available.

Do you agree that we can close this bug and wait for that feature to be backported into OpenShift?

Comment 2 zhou ying 2016-10-26 06:51:00 UTC
It's ok for me .

Comment 3 Michail Kargakis 2016-12-06 15:14:19 UTC
oc set selector should be the way to go, closing this bug

Comment 4 Aleksandar Kostadinov 2018-11-22 15:43:24 UTC
And almost 2 years later I still don't see `oc set selector` command in 3.11

While on it there are not many parameters to set when creating a service. It is only needed to set selector. Adding one parameter to the `create service` command is IMO well worth in comparison to ask user to run a separate command.

In any case, I think this issue has to be closed only after `--selector` parameter is implemented or at least the `oc set selector` command is present. At the moment I don't see any way to create a service on the command line without JSON/YAML.

Comment 5 Aleksandar Kostadinov 2018-11-22 15:57:18 UTC
we can use "oc expose dc somedc", this should be enough for the common user


Note You need to log in before you can comment on or make changes to this bug.