Search
Preparing search index...
The search index is not available
@threefold/grid_client
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
@threefold/grid_client
k8s
Class k8s
Hierarchy
BaseModule
k8s
Index
Constructors
constructor
Properties
backend
Storage
config
deployment
Factory
kubernetes
module
Name
project
Name
rmb
tf
Client
twin
Deployment
Handler
workload
Types
Methods
_add
_create
Deployment
_delete
_delete
Instance
_get
_get
Contract
Id
From
Node
Id
_get
Deployment
Node
Ids
_get
Disk
Data
_get
Machine
PubIP
_get
Masters
Ip
_get
Masters
Workload
_get
Node
Id
From
Contract
Id
_get
Workers
Workload
_get
Workloads
By
Types
_get
Zmachine
Data
_list
_update
_update
With
PubIP
_update
Without
PubIP
add_
worker
delete
delete_
worker
deploy
exists
filter_
pub_
and_
no
Pub_
deployments
get
get
Deployment
Contracts
get
Deployment
Path
get
Obj
list
reject_
update_
pubIP_
of_
old
Deployment
save
update
workload
Exists
Constructors
constructor
new k8s
(
config
:
GridClientConfig
)
:
k8s
Parameters
config:
GridClientConfig
Returns
k8s
Properties
backend
Storage
backend
Storage
:
BackendStorage
config
config
:
GridClientConfig
deployment
Factory
deployment
Factory
:
DeploymentFactory
kubernetes
kubernetes
:
KubernetesHL
module
Name
module
Name
:
string
= "kubernetes"
project
Name
project
Name
:
string
= ""
rmb
rmb
:
RMB
tf
Client
tf
Client
:
TFClient
twin
Deployment
Handler
twin
Deployment
Handler
:
TwinDeploymentHandler
workload
Types
workload
Types
:
WorkloadTypes
[]
= ...
Methods
_add
_add
(
deployment_name
:
string
, node_id
:
number
, oldDeployments
:
Deployment
[]
, twinDeployments
:
TwinDeployment
[]
, network
?:
Network
)
:
Promise
<
{
contracts
:
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
}
>
Parameters
deployment_name:
string
node_id:
number
oldDeployments:
Deployment
[]
twinDeployments:
TwinDeployment
[]
network:
Network
= null
Returns
Promise
<
{
contracts
:
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
}
>
_create
Deployment
_create
Deployment
(
options
:
K8SModel
, masterIps
?:
string
[]
)
:
Promise
<
[
TwinDeployment
[]
,
Network
,
string
]
>
Parameters
options:
K8SModel
masterIps:
string
[]
= []
Returns
Promise
<
[
TwinDeployment
[]
,
Network
,
string
]
>
_delete
_delete
(
name
:
string
)
:
Promise
<
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
>
Parameters
name:
string
Returns
Promise
<
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
>
_delete
Instance
_delete
Instance
(
module
:
ZdbHL
|
KubernetesHL
|
VMHL
, deployment_name
:
string
, name
:
string
)
:
Promise
<
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
>
Parameters
module:
ZdbHL
|
KubernetesHL
|
VMHL
deployment_name:
string
name:
string
Returns
Promise
<
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
>
_get
_get
(
name
:
string
)
:
Promise
<
Deployment
[]
>
Parameters
name:
string
Returns
Promise
<
Deployment
[]
>
_get
Contract
Id
From
Node
Id
_get
Contract
Id
From
Node
Id
(
name
:
string
, nodeId
:
number
)
:
Promise
<
number
>
Parameters
name:
string
nodeId:
number
Returns
Promise
<
number
>
_get
Deployment
Node
Ids
_get
Deployment
Node
Ids
(
name
:
string
)
:
Promise
<
number
[]
>
Parameters
name:
string
Returns
Promise
<
number
[]
>
_get
Disk
Data
_get
Disk
Data
(
deployments
:
Deployment
[]
, name
:
string
, contractId
:
number
)
:
{
cache
:
undefined
;
expected_shards
:
undefined
;
message
:
string
;
metricsEndpoint
:
undefined
;
minimal_shards
:
undefined
;
prefix
:
undefined
;
qsfs_zdbs_name
:
undefined
;
size
:
number
;
state
:
ResultStates
}
|
{
cache
:
number
;
expected_shards
:
number
;
message
:
string
;
metricsEndpoint
:
string
;
minimal_shards
:
number
;
prefix
:
string
;
qsfs_zdbs_name
:
any
;
size
:
any
;
state
:
ResultStates
}
Parameters
deployments:
Deployment
[]
name:
string
contractId:
number
Returns
{
cache
:
undefined
;
expected_shards
:
undefined
;
message
:
string
;
metricsEndpoint
:
undefined
;
minimal_shards
:
undefined
;
prefix
:
undefined
;
qsfs_zdbs_name
:
undefined
;
size
:
number
;
state
:
ResultStates
}
|
{
cache
:
number
;
expected_shards
:
number
;
message
:
string
;
metricsEndpoint
:
string
;
minimal_shards
:
number
;
prefix
:
string
;
qsfs_zdbs_name
:
any
;
size
:
any
;
state
:
ResultStates
}
_get
Machine
PubIP
_get
Machine
PubIP
(
deploymentName
:
string
, deployments
:
any
, publicIPWorkloadName
:
string
)
:
Promise
<
PublicIPResult
>
Parameters
deploymentName:
string
deployments:
any
publicIPWorkloadName:
string
Returns
Promise
<
PublicIPResult
>
_get
Masters
Ip
_get
Masters
Ip
(
deploymentName
:
string
, deployments
:
any
)
:
Promise
<
string
[]
>
Parameters
deploymentName:
string
deployments:
any
Returns
Promise
<
string
[]
>
_get
Masters
Workload
_get
Masters
Workload
(
deploymentName
:
string
, deployments
:
any
)
:
Promise
<
Workload
[]
>
Parameters
deploymentName:
string
deployments:
any
Returns
Promise
<
Workload
[]
>
_get
Node
Id
From
Contract
Id
_get
Node
Id
From
Contract
Id
(
name
:
string
, contractId
:
number
)
:
Promise
<
number
>
Parameters
name:
string
contractId:
number
Returns
Promise
<
number
>
_get
Workers
Workload
_get
Workers
Workload
(
deploymentName
:
string
, deployments
:
any
)
:
Promise
<
Workload
[]
>
Parameters
deploymentName:
string
deployments:
any
Returns
Promise
<
Workload
[]
>
_get
Workloads
By
Types
_get
Workloads
By
Types
(
deploymentName
:
string
, deployments
:
any
, types
:
WorkloadTypes
[]
)
:
Promise
<
Workload
[]
>
Parameters
deploymentName:
string
deployments:
any
types:
WorkloadTypes
[]
Returns
Promise
<
Workload
[]
>
_get
Zmachine
Data
_get
Zmachine
Data
(
deploymentName
:
string
, deployments
:
any
, workload
:
Workload
)
:
Promise
<
Record
<
string
,
unknown
>
>
Parameters
deploymentName:
string
deployments:
any
workload:
Workload
Returns
Promise
<
Record
<
string
,
unknown
>
>
_list
_list
(
)
:
Promise
<
string
[]
>
Returns
Promise
<
string
[]
>
_update
_update
(
module
:
ZdbHL
|
KubernetesHL
|
VMHL
, name
:
string
, oldDeployments
:
Deployment
[]
, twinDeployments
:
TwinDeployment
[]
, network
?:
Network
)
:
Promise
<
"Nothing found to update"
|
{
contracts
:
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
}
>
Parameters
module:
ZdbHL
|
KubernetesHL
|
VMHL
name:
string
oldDeployments:
Deployment
[]
twinDeployments:
TwinDeployment
[]
network:
Network
= null
Returns
Promise
<
"Nothing found to update"
|
{
contracts
:
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
}
>
_update
With
PubIP
_update
With
PubIP
(
module
:
ZdbHL
|
KubernetesHL
|
VMHL
, name
:
string
, oldDeployments
:
Deployment
[]
, twinDeployments
:
TwinDeployment
[]
, network
?:
Network
)
:
Promise
<
TwinDeployment
[]
>
Parameters
module:
ZdbHL
|
KubernetesHL
|
VMHL
name:
string
oldDeployments:
Deployment
[]
twinDeployments:
TwinDeployment
[]
network:
Network
= null
Returns
Promise
<
TwinDeployment
[]
>
_update
Without
PubIP
_update
Without
PubIP
(
module
:
ZdbHL
|
KubernetesHL
|
VMHL
, name
:
string
, oldDeployments
:
Deployment
[]
, twinDeployments
:
TwinDeployment
[]
, network
?:
Network
)
:
Promise
<
TwinDeployment
[]
>
Parameters
module:
ZdbHL
|
KubernetesHL
|
VMHL
name:
string
oldDeployments:
Deployment
[]
twinDeployments:
TwinDeployment
[]
network:
Network
= null
Returns
Promise
<
TwinDeployment
[]
>
add_
worker
add_
worker
(
options
:
AddWorkerModel
)
:
Promise
<
{
contracts
:
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
}
>
Parameters
options:
AddWorkerModel
Returns
Promise
<
{
contracts
:
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
}
>
delete
delete
(
options
:
K8SDeleteModel
)
:
Promise
<
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
>
Parameters
options:
K8SDeleteModel
Returns
Promise
<
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
>
delete_
worker
delete_
worker
(
options
:
DeleteWorkerModel
)
:
Promise
<
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
>
Parameters
options:
DeleteWorkerModel
Returns
Promise
<
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
>
deploy
deploy
(
options
:
K8SModel
)
:
Promise
<
{
contracts
:
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
;
wireguard_config
:
string
}
>
Parameters
options:
K8SModel
Returns
Promise
<
{
contracts
:
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
;
wireguard_config
:
string
}
>
exists
exists
(
name
:
string
)
:
Promise
<
boolean
>
Parameters
name:
string
Returns
Promise
<
boolean
>
filter_
pub_
and_
no
Pub_
deployments
filter_
pub_
and_
no
Pub_
deployments
(
deployments
:
Deployment
[]
|
TwinDeployment
[]
)
:
any
[]
[]
Parameters
deployments:
Deployment
[]
|
TwinDeployment
[]
Returns
any
[]
[]
get
get
(
options
:
K8SGetModel
)
:
Promise
<
Deployment
[]
>
Parameters
options:
K8SGetModel
Returns
Promise
<
Deployment
[]
>
get
Deployment
Contracts
get
Deployment
Contracts
(
name
:
string
)
:
Promise
<
any
>
Parameters
name:
string
Returns
Promise
<
any
>
get
Deployment
Path
get
Deployment
Path
(
name
:
string
)
:
string
Parameters
name:
string
Returns
string
get
Obj
get
Obj
(
deploymentName
:
string
)
:
Promise
<
{
masters
:
any
[]
;
workers
:
any
[]
}
>
Parameters
deploymentName:
string
Returns
Promise
<
{
masters
:
any
[]
;
workers
:
any
[]
}
>
list
list
(
)
:
Promise
<
string
[]
>
Returns
Promise
<
string
[]
>
reject_
update_
pubIP_
of_
old
Deployment
reject_
update_
pubIP_
of_
old
Deployment
(
oldDeployments
:
Deployment
[]
, twinDeployments
:
TwinDeployment
[]
, name
:
string
)
:
Promise
<
void
>
Parameters
oldDeployments:
Deployment
[]
twinDeployments:
TwinDeployment
[]
name:
string
Returns
Promise
<
void
>
save
save
(
name
:
string
, contracts
:
Record
<
string
,
unknown
[]
>
)
:
Promise
<
void
>
Parameters
name:
string
contracts:
Record
<
string
,
unknown
[]
>
Returns
Promise
<
void
>
update
update
(
options
:
K8SModel
)
:
Promise
<
"Nothing found to update"
|
{
contracts
:
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
}
>
Parameters
options:
K8SModel
Returns
Promise
<
"Nothing found to update"
|
{
contracts
:
{
created
:
any
[]
;
deleted
:
any
[]
;
updated
:
any
[]
}
}
>
workload
Exists
workload
Exists
(
name
:
string
, oldDeployment
:
Deployment
[]
)
:
boolean
Parameters
name:
string
oldDeployment:
Deployment
[]
Returns
boolean
Exports
k8s
constructor
backend
Storage
config
deployment
Factory
kubernetes
module
Name
project
Name
rmb
tf
Client
twin
Deployment
Handler
workload
Types
_add
_create
Deployment
_delete
_delete
Instance
_get
_get
Contract
Id
From
Node
Id
_get
Deployment
Node
Ids
_get
Disk
Data
_get
Machine
PubIP
_get
Masters
Ip
_get
Masters
Workload
_get
Node
Id
From
Contract
Id
_get
Workers
Workload
_get
Workloads
By
Types
_get
Zmachine
Data
_list
_update
_update
With
PubIP
_update
Without
PubIP
add_
worker
delete
delete_
worker
deploy
exists
filter_
pub_
and_
no
Pub_
deployments
get
get
Deployment
Contracts
get
Deployment
Path
get
Obj
list
reject_
update_
pubIP_
of_
old
Deployment
save
update
workload
Exists
Generated using
TypeDoc