fix(kubernetes): consider workload not ready when scaled to 0 (#543)

* test(kubernetes): use testcontainers for test

* fix(kubernetes): get state properly reports the workload as down when scaled to 0

* refactor(kubernetes): split provider in multiple files

* refactor(provider): use Instance prefix for actions

* test(testcontainers): use provider.PullImage

* squash

* Revert "test(testcontainers): use provider.PullImage"

This reverts commit 6f958c48a5.

* test: add random generator thread safety
This commit is contained in:
Alexis Couvreur
2025-03-02 23:30:59 -05:00
committed by GitHub
parent 198ed6cb35
commit edbf7d9d15
50 changed files with 946 additions and 652 deletions

View File

@@ -0,0 +1,21 @@
package kubernetes
import (
"context"
"github.com/sablierapp/sablier/app/types"
"github.com/sablierapp/sablier/pkg/provider"
)
func (p *KubernetesProvider) InstanceList(ctx context.Context, options provider.InstanceListOptions) ([]types.Instance, error) {
deployments, err := p.DeploymentList(ctx, options)
if err != nil {
return nil, err
}
statefulSets, err := p.StatefulSetList(ctx, options)
if err != nil {
return nil, err
}
return append(deployments, statefulSets...), nil
}