operator-framework / java-operator-sdk

Java SDK for building Kubernetes Operators
https://javaoperatorsdk.io/
Apache License 2.0
795 stars 214 forks source link

Misleading warning about ClusterRoleBinding #686

Closed lburgazzoli closed 2 years ago

lburgazzoli commented 2 years ago

Bug Report

What did you do?

I've upgraded the operator related libraries to the latest version:

<josdk.version>1.9.11</josdk.version>
<kubernetes-client.version>5.10.1</kubernetes-client.version>
<quarkus.version>2.4.2.Final</quarkus.version>
<quarkus-operator-sdk.version>2.0.1</quarkus-operator-sdk.version>

And when the operator is built, I notice:

[WARNING] [io.quarkiverse.operatorsdk.deployment.OperatorSDKProcessor] 'foo' controller is configured to watch
all namespaces, this requires a ClusterRoleBinding for which we MUST specify the namespace of the operator 
ServiceAccount.  However, at this information is not known at build time, we are leaving it blank and needs to be
provided by the user by editing the 'foo-cluster-role-binding' ClusterRoleBinding to provide the namespace in
which the operator will be deployed.

But that's not correct as in my application.properties I have:

quarkus.operator-sdk.controllers."foo".namespaces = ${foo.namespace}

where foo.namespace is resolved at runtime and set either by a configmap or an env var

What did you expect to see?

No warning should be reported

metacosm commented 2 years ago

Closing this since this is specific to the Quarkus extension. See quarkiverse/quarkus-operator-sdk#154.