[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=17627467#comment-17627467 ] James Busche commented on FLINK-29536: -- When I build an OLM bundle of the PR and deploy it on OpenShift, the behavior changes as expected. I installed in both the default namespace and testing121 namespaces: {quote}oc rsh -n testing121 flink-kubernetes-operator-7c9b585b76-sxwfw env |grep WATCH *WATCH*_NAMESPACES=testing121 [r...@api.jim-fips.cp.fyre.ibm.com ~]# oc rsh -n default flink-kubernetes-operator-d955cc679-9sx85 env |grep WATCH *WATCH*_NAMESPACES=default {quote} When I installed in all namespaces, then the WATCH_NAMESPACES= remained empty (watching all the namespaces, as expected. If you want to try to my OLM bundle, you could do the following: {quote} # Install OLM if you don't already have it: {quote}curl -sL [https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.22.0/install.sh] | bash -s v0.22.0{quote} # Deploy my catsrc:cat < 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)
[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=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)
[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=17626689#comment-17626689 ] Tony Garrard commented on FLINK-29536: -- Created PR for the required changes > 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)
[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=17623970#comment-17623970 ] Tony Garrard commented on FLINK-29536: -- [~gyfora] can you assign this to me thanks > 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 >Priority: Major > > 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)