Use the same install order for hooks as for normal resources (non-hooks) for hooks with equal weight.
This makes resource handling more consistent and helps, when there are hook consisting of several resources like e.g. a service account and a job using this service account.
The sort functions are changed from an in place search to an out of place sort to avoid inout parameters.
Closes#7416.
Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
Service accounts must be installed before secrets when service account tokens (secrets) are be managed by Helm. Otherwise Kubernetes will delete any service account token right after creation, since there is no service account mounting the token (see https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/#token-controller)
Closes#7159.
Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
* feat: add pkg/action to encapsulate action logic
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
* feat: replace client/server internals with action package
While we removed Tiller, we left the internal client/server architecture mostly intact. This replaces that architecture with the `pkg/action` package.
This implements the action package for list, but nothing else.
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
* feat: Add install and refactor some tests
This adds install to the action package, and then fixes up a lot of testing.
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
* fix: Move a bunch of sorters to the releaseutils package
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
* fix: updated APIs and fixed a failed test
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
* Use var for timestamper, instead of adding as a struct field
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>