-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MicroK8s addon enabled checks can give false positives for unrelated resources/files that contain the check_status value #4245
Comments
Closing this PR as it's no longer an issue with canonical/microk8s-community-addons#166 merged |
Can we reopen this? The same issue exists with many other addons ( This logic to search for substring in all namespaces is too error prone: microk8s/scripts/wrappers/common/utils.py Lines 553 to 579 in ee4558a
Perhaps we can add a namespace option to each addon. The namespaces appear to be hard-coded in the addons anyway. cc @ktsakalozos perhaps you have better context/suggestions for this? |
Note
This issue is raised as part of issue 165 logged in the community addons repo. I've made this issue here because the fix could require updating the is_enabled function mentioned here.
Summary
I'm working at Portainer, and we came across a bug relating to the way that our addon is detected...
Given I have community addons enabled
When I install the portainer-agent (not the portainer server) in my MicroK8s cluster using a manifest file like this
And I run microk8s status, then currently Portainer shows up as an enabled addon
What Should Happen Instead?
The portainer addon should not be detected as enabled.
Reproduction Steps
microk8s kubectl apply -f https://downloads.portainer.io/ee2-18/portainer-agent-k8s-nodeport.yaml
microk8s status
to check the enabled addonsCan you suggest a fix?
The current Portainer addon check_status, pod/portainer is matching for both pod/portainer-agent-xxx and pod/portainer-xxx causing Portainer to be detected as enabled when the agent is installed, as well as the server.
I propose to introduce an optional regex_check_status field, that when specified, does a more exact regex search (in the is_enabled util function) for matching files or kube resources, as well as updating the portainer section of addons.yaml to use this new regex_check_status. In issue 165 I suggested other fixes, but this seems like the best one while also enhancing MicroK8s.
Are you interested in contributing with a fix?
yes
The text was updated successfully, but these errors were encountered: