* 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>
This commit decouples parseFromRawArgs from the keyValueArgs receiver.
Simplifies the logic and results in improved performance.
Updates getKubeAPIServerArgs to return errors to the UI.
Follow up to https://github.com/rancher/webhook/pull/913
The usage of key-value struct:
- ensures no key duplication, if any last occurrence takes precedence.
- preserves the sequence of arguments passed in the cluster's machineConfigGlobal.
* Ignore namespace delete operation
Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
* Prevent deletion of `local` and `fleet-local` namespaces
Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
* Prevent deletion of local cluster
It prevents deletion of both clusters.provisioning.cattle.io and
cluster.management.cattle.io resources of the named local.
* Fixes to tests based on CI feedback
---------
Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
* Upgrade go version to 1.23
Signed-off-by: Vatsal Parekh <vatsalparekh@outlook.com>
* Update golangci-lint to v1.63.4 for Go 1.23 support
* Add codegen fix for Go 1.23 support
---------
Signed-off-by: Vatsal Parekh <vatsalparekh@outlook.com>
Co-authored-by: Tom Lebreux <tom.lebreux@suse.com>
* Prevent deletion of `local` cluster
It prevents deletion of both clusters.provisioning.cattle.io and
cluster.management.cattle.io of the name `local`.
Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
* Prevent deletion of `local` and `fleet-local` namespaces
Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
* Parameter type grouping
Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
---------
Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
* Add resource request and limit validation when creating a namespace
* Update test for number of namespace admitters
* cleaning up lint errors
* Allow for empty resource limit annotation to be present
* Update to allow for partial request/limits
* Revert "[0.6] Make sure to update the name in the mutator (#535)"
This reverts commit 7e0627b265.
* Revert "[v0.6] Populate backing namespace field for projects (#532)"
This reverts commit b17444735b.