Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

cannot disable clustergittrackobjects CRD #138

Open
terinjokes opened this issue May 10, 2019 · 2 comments
Open

cannot disable clustergittrackobjects CRD #138

terinjokes opened this issue May 10, 2019 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@terinjokes
Copy link
Contributor

I'm looking at using Faros to manage individual namespaces, where all resources managed are namespaced. It's not currently possible to run Faros without permission to list ClusterGitTrackObjects, as the controllers don't start until after the initial informer listing.

I'm proposing a flag that could be used in conjunction with --namespace to disable support for cluster-scoped resources entirely.

@JoelSpeed
Copy link
Contributor

We had a chat internally about this and decided that a flag called --namespaced-only would probably be a good feature to add.

The behaviour of the flag would disable listing and watching cluster scoped resources (fixing RBAC issues) and then, in the GitTrack controller, if any resource found in the repository is not namespaced, the resource should be ignored with an appropriate error message, eg. Cluster scoped resources are not managed by this Faros

@JoelSpeed JoelSpeed added enhancement New feature or request help wanted Extra attention is needed labels May 13, 2019
@terinjokes
Copy link
Contributor Author

terinjokes commented May 13, 2019

I was thinking --no-cluster but don't want to split hairs on names. Otherwise, the behavior matches what I had in mind. I'll work on this and try to get a PR to you this week.

terinjokes added a commit to terinjokes/faros that referenced this issue May 27, 2019
When running an namespace-scoped instance of Faros in a shared cluster,
listing and modifying cluster-scoped resources may not be allowed. As
Faros begins by listing cluster-scoped resources, this prevents Faros
from operating entirely.

This changelist adds a new flag to the controller `--namespaced-only`
which modifies the behavior of Faros:

1. Faros no longer lists ClusterGitTrackObjects at controller startup.
   Any previously created ClusterGitTrackObjects are abandoned and must
   be cleaned up by the operator.
2. Faros no longer manages any cluster-scoped resources it finds in
   a Git repository, instead adding them to the ignored objects list.

Fixes: pusher#138
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants