Bug 1692649

Summary: [RFE]kubefed2 should set registry-namespace = federation-namespace as federation controller-manager when limited-scope=true
Product: OpenShift Container Platform Reporter: Qin Ping <piqin>
Component: FederationAssignee: Paul Morie <pmorie>
Status: CLOSED ERRATA QA Contact: Qin Ping <piqin>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.0CC: mnewby
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:46:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Qin Ping 2019-03-26 06:41:32 UTC
Description of problem:
kubefed2 should set registry-namespace = federation-namespace as federation controller-manager when limited-scope=true


Version-Release number of selected component (if applicable):
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE     STATUS
version   4.0.0-0.nightly-2019-03-25-180911   True        False         57m       Cluster version is 4.0.0-0.nightly-2019-03-25-180911

kubefed2 version: version.Info{Version:"0.0.6", GitCommit:"de6a0a909418f5ddf2d04d232b0ca55aa9cffb49", GitTreeState:"clean", BuildDate:"2019-03-14T00:43:37Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}

Federation v2 controller-manager version: version.Info{Version:"0.0.6", GitCommit:"de6a0a909418f5ddf2d04d232b0ca55aa9cffb49", GitTreeState:"clean", BuildDate:"2019-03-14T00:43:37Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}


How reproducible:
Always

Steps to Reproduce:
1. Install a namespace scoped federation controller manager in the default federation namespace: federation-system
$ oc exec federation-controller-manager-7b4bfd556-588t2 -- ps -ef|grep controll
1000480+      1      0  0 06:28 ?        00:00:01 /root/controller-manager --federation-namespace=federation-system --install-crds=false --limited-scope=true --registry-namespace=federation-system -v=5 --logtostderr
2. Join a cluster to a federation with limited-scope=true:
kubefed2 join cluster1 --add-to-registry --cluster-context=$(oc config current-context) --limited-scope=true

Actual results:
F0326 14:39:45.478012    6362 join.go:129] error: namespaces "kube-multicluster-public" not found


Expected results:
Cluster join to a federation successfully.

Additional info:

Comment 1 Paul Morie 2019-03-28 04:28:14 UTC
I definitely think that some improvements are needed in the area of CLI experience, but we do not have an easy way to implement this currently. It's likely that coming component configuration work will help make this possible in the future.

Comment 2 Maru Newby 2019-04-10 22:16:25 UTC
I've filed an upstream issue to track updating kubefed2 to use FederationConfig instead of requiring --registry-namespace or --limited-scope: https://github.com/kubernetes-sigs/federation-v2/issues/748

Comment 3 Maru Newby 2019-05-13 19:40:04 UTC
In 0.0.10 kubefedctl has been updated to discovery the scope and registry namespace so the options are no longer required have have been removed.  Bumping to 4.1.

Comment 4 Qin Ping 2019-05-14 09:53:41 UTC
Verified with:
Federation v2 controller-manager version: version.Info{Version:"v0.0.10", GitCommit:"71d233ede685707df554ef653e06bf7f0229415c", GitTreeState:"clean", BuildDate:"2019-05-06T22:54:46Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}

kubefedctl version: version.Info{Version:"v0.0.10-dirty", GitCommit:"71d233ede685707df554ef653e06bf7f0229415c", GitTreeState:"dirty", BuildDate:"2019-05-06T22:30:31Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}

Comment 6 errata-xmlrpc 2019-06-04 10:46:25 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:0758