Workload

This section outlines the key attributes of the workload's API object. This object can be utilized through the API, CLI and the console's apply functionality.

id string

kind string

version integer

description string

Max Length: 250

tags object

created string

Format: date-time

lastModified string

Format: date-time

links array of objects - See Below

name string

Max Length: 49

gvc object

spec object - See Below

status object - See Below

rel string

href string

spec

type string

Default: serverless

Possible enum values:

  • serverless

  • standard

  • cron

  • stateful

identityLink string

The identityLink is used as the access scope for 3rd party cloud resources. A single identity can provide access to multiple cloud providers.

containers array of objects - See Below

firewallConfig object - See Below

defaultOptions object

Set defaultOptions for the workload in all Control Plane Locations.

localOptions object

Override defaultOptions for the workload in specific Control Plane Locations.

job object - See Below

sidecar object - See Schema

supportDynamicTags boolean

If this is enabled, Control Plane will automatically redeploy your workload when one of the container images is updated in the container registry.

rolloutOptions object - See Below

securityOptions object - See Below

containers

name string

The name of the container.

Max Length: 64

image string

The full image and tag path for a public or private docker registry. Private container images must have valid credentials configured in 'pullSecretLinks' on the GVC (Global Virtual Cloud).

workingDir string

metrics object - See Below

port integer

The port in the container which receives external traffic or traffic from other workloads. Only one container is allowed to specify a port.

ports array of objects - See Below

The ports in the container which can receive internal and external traffic. For serverless workloads only the first port will be used.

memory string

reserved memory of the workload when capacityAI is disabled. maximum memory when CapacityAI is enabled.

Max Length: 20

Default: 128Mi

readinessProbe object - See Below

livenessProbe object - See Below

cpu string

reserved CPU of the workload when capacityAI is disabled. maximum CPU when CapacityAI is enabled.

Max Length: 20

Default: 50m

minCpu string

Minimum CPU when capacityAI is enabled.

Max Length: 20

minMemory string

Minimum memory when capacityAI is enabled

Max Length: 20

env array of objects - See Below

Environment variables for the container at runtime. Default environment variables are also provided: CPLN_GVC, CPLN_LOCATION, CPLN_ORG, CPLN_PROVIDER, CPLN_WORKLOAD

gpu object - See Below

inheritEnv boolean

Enables inheritance of GVC environment variables. A variable in spec.env will override a GVC variable with the same name.

command string

Optionally override the entrypoint

args array of strings

lifecycle object - See Below

volumes array of objects - See Below

Mount Object Store (S3, GCS, AzureBlob) buckets as file system

metrics

port integer

path string

Default: /metrics

ports

The ports in the container which can receive internal and external traffic. For serverless workloads only the first port will be used.

protocol string

Default: http

Possible enum values:

  • http

  • http2

  • grpc

  • tcp

number integer

readinessProbe

A Probe to check if the workload is ready to receive additional traffic.

exec object - See Below

grpc object - See Below

tcpSocket object - See Below

httpGet object - See Below

initialDelaySeconds integer

periodSeconds integer

timeoutSeconds integer

successThreshold integer

failureThreshold integer

exec

command array of strings

grpc

port integer

tcpSocket

port integer

httpGet

path string

Default: /

port integer

httpHeaders array of objects - See Below

scheme string

Default: HTTP

Possible enum values:

  • HTTP

  • HTTPS

httpHeaders

name string

value string

livenessProbe

A Probe to check if the workload is healthy or should be restarted.

exec object - See Below

grpc object - See Below

tcpSocket object - See Below

httpGet object - See Below

initialDelaySeconds integer

periodSeconds integer

timeoutSeconds integer

successThreshold integer

failureThreshold integer

env

Environment variables for the container at runtime. Default environment variables are also provided: CPLN_GVC, CPLN_LOCATION, CPLN_ORG, CPLN_PROVIDER, CPLN_WORKLOAD

name string

Max Length: 120

value string

Max Length: 4096

gpu

nvidia object - See Below

nvidia

model object

quantity number

lifecycle

postStart object - See Below

preStop object - See Below

postStart

exec object - See Below

preStop

exec object - See Below

volumes

Mount Object Store (S3, GCS, AzureBlob) buckets as file system

uri string

recoveryPolicy string

Only applicable to persistent volumes, this determines what Control Plane will do when creating a new workload replica if a corresponding volume exists.

Default: retain

Possible enum values:

  • retain

  • recycle

path string

firewallConfig

Optional control of inbound and outbound access to the workload for external (public) and internal (service to service) traffic. Access is restricted by default.

external object - See Below

internal object - See Below

external

The external firewall is used to control access to and from the public internet.

inboundAllowCIDR array of strings

The list of ipv4/ipv6 addresses or cidr blocks that are allowed to access this workload. No external access is allowed by default. Specify '0.0.0.0/0' to allow access to the public internet.

outboundAllowHostname array of strings

Max Length: 128

outboundAllowPort array of objects - See Below

Allow outbound access to specific ports and protocols. When not specified, communication to address ranges in outboundAllowCIDR is allowed on all ports and communication to names in outboundAllowHostname is allowed on ports 80/443.

outboundAllowCIDR array of strings

outboundAllowPort

Allow outbound access to specific ports and protocols. When not specified, communication to address ranges in outboundAllowCIDR is allowed on all ports and communication to names in outboundAllowHostname is allowed on ports 80/443.

protocol string

Default: tcp

Possible enum values:

  • http

  • https

  • tcp

number integer

internal

The internal firewall is used to control access between workloads.

inboundAllowType string

Used to control the internal firewall configuration and mutual tls. 'none': no access is allowed between this workload and other workloads on Control Plane. 'same-gvc': workloads running on the same Global Virtual Cloud are allowed to access this workload internally. 'same-org': workloads running on the same Control Plane Organization are allowed to access this workload internally. 'workload-list': specific workloads provided in the 'inboundAllowWorkload' array are allowed to access this workload internally.

Default: none

Possible enum values:

  • none

  • same-gvc

  • same-org

  • workload-list

inboundAllowWorkload array of strings

job

schedule string

A standard cron schedule expression used to determine when your job should execute.

concurrencyPolicy string

Either 'Forbid' or 'Replace'. This determines what Control Plane will do when the schedule requires a job to start, while a prior instance of the job is still running.

Default: Forbid

Possible enum values:

  • Forbid

  • Replace

historyLimit integer

The maximum number of completed job instances to display. This should be an integer between 1 and 10.

restartPolicy string

Either 'OnFailure' or 'Never'. This determines what Control Plane will do when a job instance fails.

Possible enum values:

  • OnFailure

  • Never

activeDeadlineSeconds number

The maximum number of seconds Control Plane will wait for the job to complete. If a job does not succeed or fail in the allotted time, Control Plane will stop the job, moving it into the Removed status.

rolloutOptions

minReadySeconds integer

The minimum number of seconds a container must run without crashing to be considered available

maxUnavailableReplicas string

maxSurgeReplicas string

scalingPolicy string

Default: OrderedReady

Possible enum values:

  • OrderedReady

  • Parallel

securityOptions

filesystemGroupId integer

The group id assigned to any mounted volume

status

parentId string

canonicalEndpoint string

endpoint string

internalName string

healthCheck object - See Below

currentReplicaCount number

resolvedImages object - See Below

healthCheck

active boolean

success boolean

code integer

message string

failures integer

successes integer

lastChecked string

Format: date-time

resolvedImages

resolvedForVersion integer

resolvedAt string

Format: date-time

errorMessages array of strings

images array of objects - See Below

images

digest string

manifests array of objects - See Below

manifests

image string

mediaType string

digest string

platform object

Copyright © 2024 Control Plane Corporation. All rights reserved. Revision ba5c0f81
Contents