You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "James Busche (Jira)" <ji...@apache.org> on 2022/11/02 05:15:00 UTC

[jira] [Commented] (FLINK-29536) Add WATCH_NAMESPACES env var to kubernetes operator

    [ https://issues.apache.org/jira/browse/FLINK-29536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17627466#comment-17627466 ] 

James Busche commented on FLINK-29536:
--------------------------------------

[~tagarr] [~tedhtchang] 

Helm:  I believe it works as expected
Using the code in the PR, I built a new operator image and then installed it in the default namespace and then tried the basic.yaml
{quote}
h4. _helm install flink-kubernetes-operator helm/flink-kubernetes-operator --set image.repository=$(oc registry info --internal)/$NAMESPACE/debian-release --set image.tag=tony-29536_
h4. {{_kubectl create -f [https://raw.githubusercontent.com/apache/flink-kubernetes-operator/release-1.2/examples/basic.yaml]_}}

oc get pods

NAME                                         READY   STATUS    RESTARTS   AGE

basic-example-56876dc586-qtbj4               1/1     Running   0          69s

basic-example-taskmanager-1-1                1/1     Running   0          56s

flink-kubernetes-operator-7fc7c6fd77-77hp4   2/2     Running   0          6m48s
{quote}
Looking inside the operator pod, the WATCH_NAMESPACE remains the same as before:
{quote}oc rsh flink-kubernetes-operator-7fc7c6fd77-77hp4 env |grep WATCH

*WATCH*_NAMESPACES=
{quote}

> Add WATCH_NAMESPACES env var to kubernetes operator
> ---------------------------------------------------
>
>                 Key: FLINK-29536
>                 URL: https://issues.apache.org/jira/browse/FLINK-29536
>             Project: Flink
>          Issue Type: Improvement
>          Components: Kubernetes Operator
>    Affects Versions: kubernetes-operator-1.2.0
>            Reporter: Tony Garrard
>            Assignee: Tony Garrard
>            Priority: Major
>              Labels: pull-request-available
>
> Provide the ability to set the namespaces watched by the operator using an env var. Whilst the additional config can still be used, the presence of the env var will take priority.
>  
> Reasons for issue
>  # Operator will take effect of the setting immediately as pod will roll (rather than waiting for the config to be refreshed)
>  # If the operator is to be olm bundled we will be able to set the target namespace using the following 
> {{                    env:}}
>   {{                      - name: WATCHED_NAMESPACE}}
>       {{                        valueFrom:}}
>           {{                          fieldRef:}}
>              {{                            fieldPath: metadata.annotations['olm.targetNamespaces']}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)