Bug 1662751 - [RFE] Add "virtctl delete" command to remove services exposed via "virtctl expose"
Summary: [RFE] Add "virtctl delete" command to remove services exposed via "virtctl ex...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: RFE
Version: 1.4
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: future
Assignee: Sebastian Scheinkman
QA Contact: Stephen Gordon
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-01 15:15 UTC by Yossi Segev
Modified: 2021-05-26 01:38 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-26 01:38:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yossi Segev 2019-01-01 15:15:11 UTC
Description of problem:
These no command to delete an exposed service, even if this service was exposed using "virtctl expose".
virtcrl should have a delete command, just like there's "oc expose" and "oc delete svc".


Version-Release number of selected component (if applicable):
Server/client: v0.12.0-alpha.2


How reproducible:
Always.


Steps to Reproduce:
1. Create a cirros VM.
 # oc create -f cluster/example/vm-cirros.yaml
2. Start the VM:
 # virtctl start vm-cirros
3. Verify VMI is running.
 # oc get VMI
NAME            AGE       PHASE     IP            NODENAME
vm-cirros       10m       Running   10.130.0.46   cnv-executor-ysegev-node1.example.com
4. Expose a service using "virtctl expose", e.g. a service of type NodePort:
 # virtctl expose vmi vm-cirros --name=testnp --port=27017 --target-port=22 --type=NodePort


Actual results:
In order to delete the exposed service, you have to run "oc delete svc".


Expected results:
It makes sense, that just like "oc expose" has a complementary "oc delete svc", there should also be a complementary "virtctl delete svc".

Additional info:

Comment 1 Fabian Deutsch 2019-01-02 13:49:16 UTC
IMO we should drop "virtctl expose" and make it easier to use virtual machines with "kubectl expose"

An upstream patch would be necessary to allow "kubectl expose -l domain=mydom".

Comment 3 Dan Kenigsberg 2019-01-15 13:05:00 UTC
Either way we expose (virtctl or kubecrl) we should have a reciprocal command to delete.

Comment 6 Dan Kenigsberg 2019-05-29 10:04:35 UTC
delegating Jira request to Yossi.

Comment 7 Yossi Segev 2019-05-29 10:28:08 UTC
https://jira.coreos.com/browse/CNV-1998

Comment 8 Ying Cui 2021-05-26 01:38:09 UTC
Close this RFE bug, we will follow the fix by jira in comment 7.


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