Bug 1741422

Summary: kubefed operator should install cluster scoped kubefed webhook in the "openshift-federation-system" namespace
Product: OpenShift Container Platform Reporter: Qin Ping <piqin>
Component: FederationAssignee: Sohan Kunkerkar <skunkerk>
Status: CLOSED ERRATA QA Contact: Qin Ping <piqin>
Severity: medium Docs Contact:
Priority: high    
Version: 4.2.0CC: anbhat
Target Milestone: ---   
Target Release: 4.2.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-10-16 06:35:55 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:
Embargoed:

Description Qin Ping 2019-08-15 05:11:16 UTC
Description of problem:
kubefed operator should install cluster scoped kubefed webhook in the "openshift-federation-system" namespace 

Version-Release number of selected component (if applicable):
quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.2.0-201908131437-ose-kubefed-operator 

How reproducible:
100%

Steps to Reproduce:
1. Installed kubefed operator
2. Created a kubefedwebhook object to deploy a clusters scoped kubefed webhook
3.

Actual results:
The default yaml file we can get from web console is: 
apiVersion: operator.kubefed.io/v1alpha1
kind: KubeFedWebHook
metadata:
  name: kubefedwebhook-resource
  namespace: default
spec:
  scope: Cluster
apiVersion: operator.kubefed.io/v1alpha1
kind: KubeFedWebHook
metadata:
  name: kubefedwebhook-resource
  namespace: default
spec:
  scope: Cluster

The the cluster scoped kubefed webhook will be installed under default project.

Expected results:
The cluster scoped kubefed webhook can and only can be installed under the "openshift-federation-system" project.
If the openshift-federation-system project is not exist, kubefed operator can create it first.

Additional info:

Comment 2 Sohan Kunkerkar 2019-08-20 18:24:16 UTC
Hi Ping,

We're planning to get rid of the scope field from the KubefedWebHook CR, however, we're not going to restrict the users to deploy a KubeFedWebHook controller pod in the `openshift-federation-system` namespace. Having said that, we'll be documenting the steps in the CSV description/openshift docs to inform users the recommended way to install a KubeFedWebHook controller pod in a given canonical namespace. You can track this PR: https://github.com/openshift/openshift-docs/pull/16256/files#r315769990 for more information.

Comment 4 Qin Ping 2019-08-23 05:39:42 UTC
Hi Sohan,

there still something needs to fix for this issue.
1. The default kubefed-namespace in kubefedctl should be "openshift-federation-system" not "kube-federation-system"
2. When creating kubefedwebhook instance from web console, the kubefedwebhook.spec should be null.

Comment 5 Sohan Kunkerkar 2019-08-26 21:38:08 UTC
Hi Ping,
PFB my inline response.
1. The default kubefed-namespace in kubefedctl should be "openshift-federation-system" not "kube-federation-system"
Sohan: I will sync with you on this point later tonight (your morning).

2. When creating kubefedwebhook instance from web console, the kubefedwebhook.spec should be null.
Sohan: This is fixed in the latest community-operators PR which is merged today

Comment 6 Sohan Kunkerkar 2019-08-29 14:51:52 UTC
As discussed, I'm moving this BZ to modified as there's a separate BZ for the first point.

Comment 8 errata-xmlrpc 2019-10-16 06:35:55 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