* Update dependency golangci/golangci-lint to v2
* Migrate the golangci config file.
* Fix golangci-lint-flagged problems
Most of them fall in these categories:
* stop ignoring returned errors from function calls
* Apply deMorgan's law to complex negative boolean expressions
* Delete unused local variables and struct fields
* Successfully get the linter to stop complaining about
uncommented global names
* If one import in a block has an import prefix, all must
* Deal with deprecated code
* Prefer switch-blocks to if/else if/...
* Remove unnecessary intermediate struct fields.
* Orphans are now deleted only via propagation-policy
* Stop checking goimports on generated files.
* Remove unused field comment
---------
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
Co-authored-by: Eric Promislow <epromislow@suse.com>
* Add support for k8s 1.33
* Use unique ns for each test
The CI is failing with terminating namespaces with finalizer kubernetes. This has nothing to with the logic of integration tests
* Move common annotations to resources/common
* Add new annotation to opt out of creatorID
* Add comments and unit tests
* Fix integration test
* Update annotation name
* Add annotation check to project and cluster
* Move annotation check to create
* Fix unit tests
Sometimes the test to verify only one CPC can be created at a time fails
when verifying that the attempted second-object creation returns an
error. So we watch for that object to be created, and then continue the test.
- Misc. changes to CI caught during further testing:
1. There should be two shell variables, HELM_VERSION for pulling
down the right version of helm, and HELM_CHART_VERSION, for identifying
generated helm charts.
2. Similarly, `TAG` and `IMAGE_TAG` are two different things.
3. Stop using make/dapper: env vars get lost
4. Skip the RKE Machine config unit test on CI/arm64
- Written up in issue 45837
Adds validation on clusterName and projectName for prtbs to make sure
they refer to existing projects/clusters and that the project refers to
the cluster in the spec
Adds validation for the clusterName field for projects, and fixes and
unrelated error where error messages for globalRoleBindings indicated
their own name as the missing resource instead of the target GlobalRole
New validations:
- prohibit deleting the system project
- check that quota fields are consistent with one another and sufficient
for existing quota usage
New mutations:
- adds creator-role-bindings annotation