mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-24 06:28:21 +01:00
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:
21
pkg/provider/kubernetes/instance_list.go
Normal file
21
pkg/provider/kubernetes/instance_list.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user