-
Notifications
You must be signed in to change notification settings - Fork 229
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
GitRepoRestrictions not defaulting the GitRepo #3077
Comments
2 tasks
/backport v2.10.1 |
/backport v2.9.5 |
Testing steps with UI (QASE link: Fleet-153):
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GitRepoRestriction resources can be used to default GitRepos and restrict their values.
Default values for GitRepo resources, configured through a GitRepoRestriction resource are not applied, although the restrictions remain functional.
Additional QA
Problem
Default values for GitRepo resources, configured through a GitRepoRestriction resource are not applied, although the restrictions remain functional.
See https://fleet.rancher.io/namespaces#restricting-gitrepos and https://fleet.rancher.io/ref-crds#gitreporestriction for all options.
This affects these fields:
As described in https://fleet.rancher.io/multi-user#restricting-access-to-downstream-clusters one can create
GitRepoRestriction
resource to limit fields ofGitRepo
resources.Solution
Fix the code, so the the GitRepo is mutated once again.
Testing
Automated Testing
The PR adds unit tests.
QA Testing Considerations
When creating a
GitRepoRestriction
resource in the same namespace as aGitRepo
, it should overwrite the values with the defaults. This was broken in 0.11.0When a disallowed value is used, it should not process the
GitRepo
at all, this worked before and was not broken.Please test with a different service account on the downstream cluster, e.g.:
That service account must be created manually on the downstream cluster. When it doesn't have enough access to create a resource from the bundle, the deployment would fail.
This will default the https://fleet.rancher.io/ref-crds#gitrepospec
clientSecretName
to clone the gitrepo.The text was updated successfully, but these errors were encountered: