Statefile
In Nanocl, a Statefile
refers to a file that will containt the current state you want.
It will help you manage your Cargoes
, Virtual Machines
, Resources
, Jobs
and Secrets
.
ApiVersion required | string Api version to use or remote url |
Array of objects or null (StatefileArg) Arguments to pass to the Statefile | |
Array of objects or null (CargoSpecPartial) List of cargoes to create and run | |
Group | string or null Set the group of defined objects default to |
Array of objects or null (JobPartial) List of jobs to create and run | |
Namespace | string or null Namespace where the cargoes and virtual machines are deployed |
Array of objects or null (ResourcePartial) List of resources to create | |
Array of objects or null (SecretPartial) List of secrets to create | |
Array of strings or SubStateDef (object) or null (SubState) Include sub states that will be applied before the current state | |
Array of objects or null (VmSpecPartial) List of virtual machines to create and run |
{- "ApiVersion": "string",
- "Args": [
- {
- "Name": "string",
- "Kind": "String",
- "Default": "string"
}
], - "SubStates": [
- "string"
], - "Group": "string",
- "Namespace": "string",
- "Secrets": [
- {
- "Name": "string",
- "Kind": "string",
- "Immutable": true,
- "Metadata": {
- "property1": "string",
- "property2": "string"
}, - "Data": {
- "property1": "string",
- "property2": "string"
}
}
], - "Resources": [
- {
- "Name": "string",
- "Kind": "string",
- "Data": {
- "property1": "string",
- "property2": "string"
}, - "Metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "Cargoes": [
- {
- "Name": "string",
- "Metadata": {
- "property1": "string",
- "property2": "string"
}, - "InitContainer": { },
- "Secrets": [
- "string"
], - "ImagePullSecret": "string",
- "ImagePullPolicy": { },
- "Container": {
- "Hostname": "string",
- "Domainname": "string",
- "User": "string",
- "AttachStdin": true,
- "AttachStdout": true,
- "AttachStderr": true,
- "ExposedPorts": {
- "property1": {
- "property1": null,
- "property2": null
}, - "property2": {
- "property1": null,
- "property2": null
}
}, - "Tty": true,
- "OpenStdin": true,
- "StdinOnce": true,
- "Env": [
- "string"
], - "Cmd": [
- "string"
], - "Healthcheck": { },
- "ArgsEscaped": true,
- "Image": "string",
- "Volumes": {
- "property1": {
- "property1": null,
- "property2": null
}, - "property2": {
- "property1": null,
- "property2": null
}
}, - "WorkingDir": "string",
- "Entrypoint": [
- "string"
], - "NetworkDisabled": true,
- "MacAddress": "string",
- "OnBuild": [
- "string"
], - "Labels": {
- "property1": "string",
- "property2": "string"
}, - "StopSignal": "string",
- "StopTimeout": 0,
- "Shell": [
- "string"
], - "HostConfig": { },
- "NetworkingConfig": { }
}, - "Replication": { }
}
], - "VirtualMachines": [
- {
- "Name": "string",
- "Metadata": {
- "property1": "string",
- "property2": "string"
}, - "Hostname": "string",
- "User": "string",
- "Password": "string",
- "SshKey": "string",
- "Disk": {
- "Image": "string",
- "Size": 0
}, - "MacAddress": "string",
- "Labels": {
- "property1": "string",
- "property2": "string"
}, - "HostConfig": { }
}
], - "Jobs": [
- {
- "Name": "string",
- "Secrets": [
- "string"
], - "Metadata": {
- "property1": "string",
- "property2": "string"
}, - "Schedule": "string",
- "Ttl": 0,
- "ImagePullSecret": "string",
- "ImagePullPolicy": { },
- "Containers": [
- {
- "Hostname": "string",
- "Domainname": "string",
- "User": "string",
- "AttachStdin": true,
- "AttachStdout": true,
- "AttachStderr": true,
- "ExposedPorts": {
- "property1": {
- "property1": null,
- "property2": null
}, - "property2": {
- "property1": null,
- "property2": null
}
}, - "Tty": true,
- "OpenStdin": true,
- "StdinOnce": true,
- "Env": [
- "string"
], - "Cmd": [
- "string"
], - "Healthcheck": { },
- "ArgsEscaped": true,
- "Image": "string",
- "Volumes": {
- "property1": {
- "property1": null,
- "property2": null
}, - "property2": {
- "property1": null,
- "property2": null
}
}, - "WorkingDir": "string",
- "Entrypoint": [
- "string"
], - "NetworkDisabled": true,
- "MacAddress": "string",
- "OnBuild": [
- "string"
], - "Labels": {
- "property1": "string",
- "property2": "string"
}, - "StopSignal": "string",
- "StopTimeout": 0,
- "Shell": [
- "string"
], - "HostConfig": { },
- "NetworkingConfig": { }
}
]
}
]
}