Orange-OpenSource / nifikop

The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes. Apache NiFI is a free, open-source solution that support powerful and scalable directed graphs of data routing, transformation, and system mediation logic.
https://orange-opensource.github.io/nifikop/
Apache License 2.0
128 stars 34 forks source link

nifikop tries to delete nifiusers in other namespaces while deleting nificluster #105

Closed teplydat closed 3 years ago

teplydat commented 3 years ago

Bug Report

What did you do?

What did you expect to see? Nifikop shouldn't try delete nifiusers in other namespaces where the operator is not scoped to. The deletion of the nificluster should just work.

Environment

erdrix commented 3 years ago

Could you give me the configuration of the environment variable WATCH_NAMESPACE in the NiFiKop pod ? And say me if the user associated to the NiFiKop pod has the correct accesses to delete the nifi resources in openshift-kube-controller-manager namespace ?

teplydat commented 3 years ago

my launch.json (for vscode debugging):

    "go.testEnvVars": {
        "WATCH_NAMESPACE": "default",
    },
    "version": "0.2.0",
    "configurations": [
        {
            "env": {
                "WATCH_NAMESPACE": "default",
...

So it uses the correct namespace (where my nificluster is deployed).

No my user has no permissions in namespace openshift-kube-controller-manager. Nifikop should not get permissions in namespace openshift-kube-controller-managerif it is only scoped to namespace default

Please have a look in PR #106. I think then it gets clearer.

erdrix commented 3 years ago

I just released a new version (v0.6.2-release) containing the PR#109 that should fix your issues.

teplydat commented 3 years ago

@erdrix thank you very much. I tested it and it works.