Skip to content
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

fix non sudo enable community addon #4714

Merged

Conversation

maci3jka
Copy link
Contributor

@maci3jka maci3jka commented Oct 22, 2024

Summary

This PR fixes issues when non-root user in non-strict environment tries to enable community addons.

Closes #4574

Changes

added temporary setting to git to ingnore

Testing

enabled and disabled community addon

Possible Regressions

n/a

Checklist

  • Read the contributions page.
  • Submitted the CLA form, if you are a first time contributor.
  • The introduced changes are covered by unit and/or integration tests.

Notes

@maci3jka maci3jka requested a review from a team October 22, 2024 15:10
Copy link
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too happy about this workaround, this feels like just masking the underlying issue. The safe directory wildcard also feels too wide, could we deem certain directories as safe instead of any?

@maci3jka
Copy link
Contributor Author

I'm not too happy about this workaround, this feels like just masking the underlying issue. The safe directory wildcard also feels too wide, could we deem certain directories as safe instead of any?

How about narowing it to $SNAP/addons/community/* ?

Copy link
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, almost there!

microk8s-resources/gitconfig Outdated Show resolved Hide resolved
microk8s-resources/wrappers/git.wrapper Outdated Show resolved Hide resolved
snap/snapcraft.yaml Outdated Show resolved Hide resolved
snap/hooks/install Outdated Show resolved Hide resolved
Copy link
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, can you revert the trivy changes? Let's do the trivy fix as a separate PR/card as it still seems to fail here.

This reverts commit 5bbbc2b.
@maci3jka maci3jka merged commit 32910f0 into master Nov 8, 2024
10 of 11 checks passed
@maci3jka maci3jka deleted the KU-1812/enable-git-safe-dir-when-non-root-enable-addon branch November 8, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error enabling community addon in MicroK8s 1.30.1
2 participants