How do you restrict which repositories a project can use?
Short answer
Set sourceRepos on the AppProject to an allow-list (with wildcards) of permitted repo URLs. Apps in that project can only pull from those repos, preventing teams from deploying arbitrary or untrusted sources.
Advertisement
AModel answer
Set sourceRepos on the AppProject to an allow-list (with wildcards) of permitted repo URLs. Apps in that project can only pull from those repos, preventing teams from deploying arbitrary or untrusted sources.
spec:
sourceRepos: [ 'https://github.com/org/team-a-*' ]Real-world example
Team A's project only permits its own repos, so it can't deploy manifests from an unapproved source.
Likely follow-ups
- Where is the repo allow-list set? | Why restrict source repos?
Related topics