Skip to content

Commit

Permalink
pass backend type
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Nov 30, 2023
1 parent 25c4a98 commit a35fc3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions engine/server/engine/enclave_manager/enclave_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type EnclaveManager struct {
mutex *sync.Mutex

kurtosisBackend backend_interface.KurtosisBackend
kurtosisBackendType args.KurtosisBackendType
apiContainerKurtosisBackendConfigSupplier api_container_launcher.KurtosisBackendConfigSupplier

// this is a stop gap solution, this would be stored and retrieved from the DB in the future
Expand Down Expand Up @@ -104,8 +105,9 @@ func CreateEnclaveManager(
}

enclaveManager := &EnclaveManager{
mutex: &sync.Mutex{},
kurtosisBackend: kurtosisBackend,
mutex: &sync.Mutex{},
kurtosisBackend: kurtosisBackend,
kurtosisBackendType: kurtosisBackendType,
apiContainerKurtosisBackendConfigSupplier: apiContainerKurtosisBackendConfigSupplier,
allExistingAndHistoricalIdentifiers: []*kurtosis_engine_rpc_api_bindings.EnclaveIdentifiers{},
enclaveCreator: enclaveCreator,
Expand Down Expand Up @@ -189,6 +191,7 @@ func (manager *EnclaveManager) CreateEnclave(
manager.isCI,
manager.cloudUserID,
manager.cloudInstanceID,
manager.kurtosisBackendType,
)
if err != nil {
return nil, stacktrace.Propagate(
Expand Down
3 changes: 3 additions & 0 deletions engine/server/engine/enclave_manager/enclave_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/kurtosis-tech/kurtosis/api/golang/engine/kurtosis_engine_rpc_api_bindings"
"github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_interface"
"github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_interface/objects/enclave"
"github.com/kurtosis-tech/kurtosis/engine/launcher/args"
"github.com/kurtosis-tech/kurtosis/metrics-library/golang/lib/metrics_client"
"github.com/kurtosis-tech/stacktrace"
"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -45,6 +46,7 @@ type EnclavePool struct {
// 3- Will start a subroutine in charge of filling the pool
func CreateEnclavePool(
kurtosisBackend backend_interface.KurtosisBackend,

enclaveCreator *EnclaveCreator,
poolSize uint8,
engineVersion string,
Expand Down Expand Up @@ -289,6 +291,7 @@ func (pool *EnclavePool) createNewIdleEnclave(ctx context.Context) (*kurtosis_en
pool.isCI,
pool.cloudUserID,
pool.cloudInstanceID,
args.KurtosisBackendType_Kubernetes, // enclave pool only available for k8s
)
if err != nil {
return nil, stacktrace.Propagate(
Expand Down

0 comments on commit a35fc3e

Please sign in to comment.