Fixes problem when multiple namespaces are watched
Fixes problem when scaleStsPvc is set to true\
When multiple namespaces are watched, configured by set env.WATCH_NAMESPACE=ns1,ns2, a role needs to be created in each of the namespaces.
Also, a clusterrole with list/get permission on storage.k8s.io api is needed in order for scaleStsPvc to work. All roles need to bind to the operator's service account.
This PR has:
[X] been tested on a real K8S cluster to ensure creation of a brand new Druid cluster works.
[X] been tested for backward compatibility on a real K*S cluster by applying the changes introduced here on an existing Druid cluster. If there are any backward incompatible changes then they have been noted in the PR description.
[ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
[ ] added documentation for new or modified features or behaviors.
Fixes #308
Description
scaleStsPvc
is set totrue
\When multiple namespaces are watched, configured by set
env.WATCH_NAMESPACE=ns1,ns2
, a role needs to be created in each of the namespaces. Also, a clusterrole with list/get permission onstorage.k8s.io
api is needed in order forscaleStsPvc
to work. All roles need to bind to the operator's service account.This PR has:
Key changed/added files in this PR
chart/template/role.yaml
chart/templates/role_binding.yaml
chart/templates/watched_namespace.yaml