Bug 1740065 - --dry-run param does not take effect for kubefedctl federate --enable-type
Summary: --dry-run param does not take effect for kubefedctl federate --enable-type
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Federation
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.2.0
Assignee: Aniket Bhat
QA Contact: Qin Ping
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-12 08:51 UTC by Qin Ping
Modified: 2019-10-16 06:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-16 06:35:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:35:46 UTC

Description Qin Ping 2019-08-12 08:51:51 UTC
Description of problem:
--dry-run param does not take effect for kubefedctl federate --enable-type

Version-Release number of selected component (if applicable):
kubefedctl version: version.Info{Version:"v4.2.0", GitCommit:"b8ae65cee603cc9c746911debd3dc23b922222d8", GitTreeState:"clean", BuildDate:"2019-08-08T18:18:54Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"linux/amd64"}


How reproducible:
100%

Steps to Reproduce:
1. $ kubefedctl federate ns test-namespace --dry-run --kubefed-namespace=federation-system
F0812 16:46:15.374128    7450 federate.go:150] Error: federatedtypeconfigs.core.kubefed.io "namespaces" not found. Consider using '--enable-type' to optionally enable type while federating the resource
2. $ kubefedctl federate ns test-namespace --dry-run --kubefed-namespace=federation-system -e
customresourcedefinition.apiextensions.k8s.io/federatednamespaces.types.kubefed.io created
federatedtypeconfig.core.kubefed.io/namespaces created in namespace federation-system
I0812 16:46:39.848375    7470 federate.go:459] Resource to federate is a namespace. Given namespace will itself be the container for the federated namespace
I0812 16:46:39.848703    7470 federate.go:488] Successfully created FederatedNamespace "test-namespace/test-namespace" from Namespace


Actual results:
federatedtypeconfig resource and federatednamespaces crd are created
$ oc get crd|grep federatednamespace
federatednamespaces.types.kubefed.io                        2019-08-12T08:46:38Z
$ oc get federatedtypeconfig -n federation-system
NAME                                     AGE
namespaces                               27s


Expected results:
Do not make any server request.

Additional info:

Comment 1 Aniket Bhat 2019-08-23 17:31:35 UTC
Ping,

The fix should be available in the latest downstream image.

Comment 3 Qin Ping 2019-08-28 03:03:16 UTC
Verified with:
kubefedctl version: version.Info{Version:"v4.2.0", GitCommit:"7f002471b9dd8366e1e0f080b46bc79864682f71", GitTreeState:"clean", BuildDate:"2019-08-25T17:43:59Z", GoVersion:"go1.12.8", Compiler:"gc", Platform:"linux/amd64"}

KubeFed controller-manager version: version.Info{Version:"v4.2.0", GitCommit:"7f002471b9dd8366e1e0f080b46bc79864682f71", GitTreeState:"clean", BuildDate:"2019-08-25T20:09:07Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"linux/amd64"}

Comment 4 errata-xmlrpc 2019-10-16 06:35:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2922


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