[jboss-jira] [JBoss JIRA] (WFWIP-250) How to install operator to watch list of namespaces?

Jeff Mesnil (Jira) issues at jboss.org
Wed Oct 16 05:04:00 EDT 2019


    [ https://issues.jboss.org/browse/WFWIP-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13800204#comment-13800204 ] 

Jeff Mesnil commented on WFWIP-250:
-----------------------------------

The file deploy/operator-group.yaml is only used to test the EAP operator when it is not installed through Red Hat OperatorHub.

I set only the eap-operator as a target for the operator but it should be possible to remove it so that the operator listens on all namespaces as documented in https://docs.openshift.com/dedicated/4/applications/operators/olm-understanding-olm.html#olm-operatorgroups-target-namespace_olm-understanding-olm

When the EAP Operator is installed through the EAP Operator, it will listen for namespaces defined in the olm.targetNamespaces as expected.

> How to install operator to watch list of namespaces?
> ----------------------------------------------------
>
>                 Key: WFWIP-250
>                 URL: https://issues.jboss.org/browse/WFWIP-250
>             Project: WildFly WIP
>          Issue Type: Bug
>          Components: OpenShift
>            Reporter: Martin Choma
>            Assignee: Jeff Mesnil
>            Priority: Major
>
> We do not have eap operator on the stage OperatorHub WFWIP-232, so I could not try myself. But this questions arise. 
> {code:yaml|title=deploy/configmap-eap-operator.gen.yaml}
> ...
>             deployments:
>             - name: eap-operator
>               spec:
>                 replicas: 1
>                 selector:
>                   matchLabels:
>                     name: eap-operator
>                 strategy: {}
>                 template:
>                   metadata:
>                     labels:
>                       name: eap-operator
>                   spec:
>                     containers:
>                     - command:
>                       - wildfly-operator
>                       env:
>                       - name: WATCH_NAMESPACE
>                         valueFrom:
>                           fieldRef:
>                             fieldPath: metadata.annotations['olm.targetNamespaces']
> ...
> {code}
> {code:yaml|title=deploy/operator-group.yaml}
> apiVersion: operators.coreos.com/v1
> kind: OperatorGroup
> metadata:
>   name: example
>   namespace: eap-operator
> spec:
>   targetNamespaces:
>   - eap-operator
> {code}
> 1. Does it mean operator by default watch only {{eap-operator}} namespace? Will that be parametrized in Web Console?
> 2. If user want to install operator to watch multiple/all namespaces how should he do? Will that be exposed in Web Console?
> If I try to edit {{WATCH_NAMESPACE}} on eap-operator Deployment it is owerwriten back to 
> {code}
>               valueFrom:
>                 fieldRef:
>                   apiVersion: v1
>                   fieldPath: 'metadata.annotations[''olm.targetNamespaces'']'
> {code}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list