actions-runner-controller: flag provided but not defined: --watch-namespace
When installing via helm, I have the singleNamespace: true
and watchNamespace: "gitactions-xxx"
populated. I check in rancher the status of the manager and I’m seeing the error that the flag is provided but not defined.
I’m running v0.12.0 of the runner controller.
I checked the source code of the v0.12.0 and I can see the --watch-namespace feature, it’s just not working as expected when installing. To be sure, I cleared all of my namespaces, crds, and all our of rancher and tried to do a clean install of the controller.
- Controller Version: v0.12.0
- Deployment Method: Helm
the watchNamespace feature is very important in running multiple organizations with different installation ID’s. There is no documentation on how to get this working properly…
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 44 (1 by maintainers)
Commits related to this issue
- Use unique serving cert name Based on the comments in https://github.com/actions-runner-controller/actions-runner-controller/issues/782 — committed to rofafor/actions-runner-controller by rofafor 3 years ago
- Use unique serving cert name Based on the comments in https://github.com/actions-runner-controller/actions-runner-controller/issues/782 — committed to actions/actions-runner-controller by rofafor 3 years ago
@rxa313 Thanks for confirming! I reread the values.yaml comment and it was actually correct. The point was that you had to set either
singleNamespace: true
ORwatchNamespace
.You set
singleNamespace: false
before in https://github.com/actions-runner-controller/actions-runner-controller/issues/782#issuecomment-918538786 and that was why thewatchNamespace
defaulting didn’t work.The comment starts with “If `scope.singleNamespace=true”, so I believe it’s correct.
@mumoshu I got that from the
values.yml
file itself ( in regards towatchNamespace
) it says:I didn’t see it in the README, just in the
values.yml
file is where this information is displayed.I’m able to deploy “successfully” multiple controllers into a single namespace with the mentioned chart fix. However, there are other issues explained in #807
https://github.com/actions-runner-controller/actions-runner-controller/blob/master/charts/actions-runner-controller/templates/_helpers.tpl#L13 https://github.com/actions-runner-controller/actions-runner-controller/blob/master/charts/actions-runner-controller/templates/_helpers.tpl#L67
@rxa313 A lot of the resource names get set based on the
fullnameOverride
values property (andgithubWebhookServer.fullnameOverride
property for the webhook server), I don’t think there is a technical reason why multiple controllers can’t live in the same namespace as long as the resources in the chart have unique names for each install. Try setting this property (or both if you are using the webhook server) so that each install uses a unique prefix for its resources.The alternative as @mumoshu has pointed out is that you install each chart into a unique namespace, either in the namespace that that charts controller will be monitoring runners in or a unique one, just as long as no 2 chart controller installs share the same namespace.
Either way, please do try my first suggestion and report back.