Skip to content

controller won't run on k8s > 1.20 without fsGroup #890

Closed

Description

@TheKangaroo

I identified an issue while upgrading our (outdated) 1.17 cluster to 1.21.
With the TokenRequest and TokenRequestProjection featuregates graduated to GA in 1.20 the SerivceAccount token is now mounted via the projected volume API.
Since metallb runs as nobody user and the projected token is only readable by root(600) or root and fsGroup if set(640) we need to set the fsGroup in the helm chart, or at least, make securityContext configurable via values.yaml.

I'll happily provide a PR for the chart, I'm just curious if I'm doing something wrong and there's another way to run metallb on k8s > 1.20 or if just nobody run it on 1.20+ yet (what I couldn't imagine tbh).

Activity

  1. added a commit that references this issue on Jun 15, 2021
    46482a1
  2. changed the title [-]controller won't run on k8s > 1.20 without gsGroup[/-] [+]controller won't run on k8s > 1.20 without fsGroup[/+] on Jun 15, 2021
  3. added 2 commits that reference this issue on Jun 15, 2021
    aa5f1b3
    3575b26
  4. champtar commented on Jun 15, 2021

    @champtar
    Contributor

    Maybe the projected token should be configured to be readable by everyone instead of running the controller as root again

  5. TheKangaroo commented on Jun 16, 2021

    @TheKangaroo
    ContributorAuthor

    @champtar theres no need to run the controller as root. As discussed in kubernetes/kubernetes#82573 and fixed in kubernetes/kubernetes#89193 you can make the token readable by a specific group by setting fsGroup. Theres no way to make the projected token readable by everyone as far as I know so the fsGroup is the only viable solution.

  6. champtar commented on Jun 16, 2021

    @champtar
    Contributor

    why not just add fsGroup and fix it for everyone instead of making it configurable ?

  7. TheKangaroo commented on Jun 16, 2021

    @TheKangaroo
    ContributorAuthor

    Sure I can change the PR. I wasn't 100% sure if it would brake things for some use cases, so I wanted to make it optional. I'll adjust my PR.

  8. added a commit that references this issue on Jun 16, 2021
    f0adf22
  9. champtar commented on Jun 16, 2021

    @champtar
    Contributor

    Or make it configurable but the new default need to fix the issue and if it breaks old use cases we will rethink, the idea is to have everything working out of the box

  10. added a commit that references this issue on Jun 17, 2021
    88dde68
  11. TheKangaroo commented on Jun 17, 2021

    @TheKangaroo
    ContributorAuthor

    Good point @champtar, I made securityContext configurable via values and set fsGroup as default. So it clould be overwritten if necessary, but default should work out of the box.

  12. added 2 commits that reference this issue on Jun 17, 2021
    b9a7c0e
    6f49679
  13. added 3 commits that reference this issue on Jun 17, 2021
    114ec39
    b6fbce5
    a1e200d
  14. added 4 commits that reference this issue on Jun 17, 2021
    3c44904
    42f2dd9
    d36e8dd
    3eda15f
  15. added this to the v0.10.3 milestone on Oct 7, 2021
  16. added 2 commits that reference this issue on Feb 17, 2022
    68a7b90
    86054b4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions