Documentation
¶
Index ¶
- Variables
- func FirewallFingerprint(cfg any, org, gvc string) string
- func FirewallHash(validated any) string
- func FirewallNormalized(cfg any, org, gvc string) (map[string]any, string, error)
- func SandboxDefaultFirewall() map[string]any
- func SandboxInboundDefault() map[string]any
- func SessionFirewallRefused(fw map[string]any) string
- type CIDR
- type CIDRList
- type ContainerImage
- type ContainerName
- type ContainerOverride
- type ContainerSpec
- type ContainerSpecGpu
- type ContainerSpecGpuCustom
- type ContainerSpecGpuNvidia
- type ContainerSpecLifecycle
- type ContainerSpecLifecyclePostStart
- type ContainerSpecLifecyclePostStartExec
- type ContainerSpecLifecyclePreStop
- type ContainerSpecLifecyclePreStopExec
- type ContainerSpecLivenessProbe
- type ContainerSpecLivenessProbeExec
- type ContainerSpecLivenessProbeGrpc
- type ContainerSpecLivenessProbeHttpGet
- type ContainerSpecLivenessProbeHttpGetHttpHeaders
- type ContainerSpecLivenessProbeHttpGetScheme
- type ContainerSpecLivenessProbeTcpSocket
- type ContainerSpecMetrics
- type ContainerSpecPorts
- type ContainerSpecPortsProtocol
- type ContainerSpecReadinessProbe
- type ContainerSpecReadinessProbeExec
- type ContainerSpecReadinessProbeGrpc
- type ContainerSpecReadinessProbeHttpGet
- type ContainerSpecReadinessProbeHttpGetHttpHeaders
- type ContainerSpecReadinessProbeHttpGetScheme
- type ContainerSpecReadinessProbeTcpSocket
- type Cpu
- type CronWorkloadContainerOverride
- type DisruptionBudget
- type DnsName
- type Extras
- type ExtrasMetadata
- type ExtrasMetadataLabels
- type FirewallSpec
- type FirewallSpecExternal
- type FirewallSpecExternalHttp
- type FirewallSpecExternalOutboundAllowPort
- type FirewallSpecExternalOutboundAllowPortProtocol
- type FirewallSpecInternal
- type FirewallSpecInternalInboundAllowType
- type GpuResource
- type GpuResourceCustom
- type GpuResourceName
- type GpuResourceNvidia
- type GpuRuntimeClassName
- type HeaderFilter
- type HeaderFilterList
- type HealthCheckSpec
- type HealthCheckSpecExec
- type HealthCheckSpecGrpc
- type HealthCheckSpecHttpGet
- type HealthCheckSpecHttpGetHttpHeaders
- type HealthCheckSpecHttpGetScheme
- type HealthCheckSpecTcpSocket
- type HealthCheckStatus
- type IdentityLink
- type IntOrPercent
- type IpSetLink
- type JobSpec
- type JobSpecConcurrencyPolicy
- type JobSpecRestartPolicy
- type LivenessHttpHeaderList
- type LivenessProbe
- type LivenessProbeExec
- type LivenessProbeGrpc
- type LivenessProbeHttpGet
- type LivenessProbeHttpGetHttpHeaders
- type LivenessProbeHttpGetScheme
- type LivenessProbeTcpSocket
- type LoadBalancerPort
- type LoadBalancerPortProtocol
- type LoadBalancerPortScheme
- type LoadBalancerSpec
- type LoadBalancerSpecDirect
- type LoadBalancerSpecGeoLocation
- type LoadBalancerSpecGeoLocationHeaders
- type LoadBalancerStatus
- type Memory
- type PodZoneMap
- type ReadinessHttpHeaderList
- type ReadinessProbe
- type ReadinessProbeExec
- type ReadinessProbeGrpc
- type ReadinessProbeHttpGet
- type ReadinessProbeHttpGetHttpHeaders
- type ReadinessProbeHttpGetScheme
- type ReadinessProbeTcpSocket
- type RequestRetryPolicy
- type ResolvedImage
- type ResolvedImageManifests
- type ResolvedImageManifestsPlatform
- type ResolvedImages
- type RetryCondition
- type RolloutOptions
- type RolloutOptionsScalingPolicy
- type ScheduleType
- type SchedulerName
- type SecurityOptions
- type VolumeList
- type WorkingDir
- type Workload
- type WorkloadConfig
- type WorkloadConfigCapabilities
- type WorkloadConfigLocationPodZoneMap
- type WorkloadConfigPodZoneMap
- type WorkloadConfigProxy
- type WorkloadConfigScheduling
- type WorkloadConfigSeccomp
- type WorkloadConfigSubsets
- type WorkloadHealth
- type WorkloadLink
- type WorkloadLinkList
- type WorkloadName
- type WorkloadSpec
- type WorkloadSpecExtras
- type WorkloadSpecExtrasMetadata
- type WorkloadSpecExtrasMetadataLabels
- type WorkloadSpecFirewallConfig
- type WorkloadSpecFirewallConfigExternal
- type WorkloadSpecFirewallConfigExternalHttp
- type WorkloadSpecFirewallConfigExternalOutboundAllowPort
- type WorkloadSpecFirewallConfigExternalOutboundAllowPortProtocol
- type WorkloadSpecFirewallConfigInternal
- type WorkloadSpecFirewallConfigInternalInboundAllowType
- type WorkloadSpecJob
- type WorkloadSpecJobConcurrencyPolicy
- type WorkloadSpecJobRestartPolicy
- type WorkloadSpecLoadBalancer
- type WorkloadSpecLoadBalancerDirect
- type WorkloadSpecLoadBalancerGeoLocation
- type WorkloadSpecLoadBalancerGeoLocationHeaders
- type WorkloadSpecNetworking
- type WorkloadSpecNetworkingInternal
- type WorkloadSpecNetworkingInternalRouting
- type WorkloadSpecRequestRetryPolicy
- type WorkloadSpecRolloutOptions
- type WorkloadSpecRolloutOptionsScalingPolicy
- type WorkloadSpecSecurityOptions
- type WorkloadSpecSidecar
- type WorkloadSpecSidecarEnvoy
- type WorkloadStatus
- type WorkloadStatusHealthCheck
- type WorkloadStatusResolvedImages
- type WorkloadTags
- type WorkloadType
Constants ¶
This section is empty.
Variables ¶
var SessionFirewallForbidden = [][]string{
{"external", "inboundAllowCIDR"},
{"external", "inboundBlockedCIDR"},
{"external", "http"},
{"internal"},
}
SessionFirewallForbidden are the keys a session firewall may not set, in the order the schema reports them.
Functions ¶
func FirewallFingerprint ¶
FirewallFingerprint is the fingerprint of a firewall config; "" for none or one that does not validate.
func FirewallHash ¶
FirewallHash fingerprints a validated config: maskless IPv4 as /32, lists sorted and deduplicated, empty lists and blocks dropped.
func FirewallNormalized ¶
FirewallNormalized validates a firewall config as the workload schema does and fingerprints the result; internal links validate in org/gvc.
func SandboxDefaultFirewall ¶
SandboxDefaultFirewall is the firewall a sandbox gets when none is given: inbound open to the platform, egress open.
func SandboxInboundDefault ¶
SandboxInboundDefault is the inbound part of the sandbox firewall default: open, since the platform reaches a sandbox through its endpoint.
func SessionFirewallRefused ¶
SessionFirewallRefused is the first forbidden key a session firewall sets, dotted; "" when none.
Types ¶
type CIDR ¶
type CIDR string
CIDR resolves to ipCidrRule (ipv4/ipv6 with optional cidr).
func (CIDR) ValidationRule ¶
CIDR ports `Joi.string().ip({version:[ipv4,ipv6], cidr:'optional'})`.
type CIDRList ¶
type CIDRList []CIDR
CIDRList ports the firewall CIDR arrays' makeUnique(empty) dedupe. (sort / max / default=[] remain declarative field tags.)
func (CIDRList) ValidationRule ¶
type ContainerImage ¶
type ContainerImage string
ContainerImage is a workload container image reference (a literal image string or an org/gvc image link) — the strongly-typed replacement for the `imageLink` tag. Its rule is base.ImageLink (format check for literals, expand+toKind for links).
func (ContainerImage) ValidationRule ¶
func (ContainerImage) ValidationRule() *validate.Rule
type ContainerName ¶
type ContainerName string
ContainerName ports ContainerSpec.name: `regex(name)` + the excluded-names disallow + the cpln-/debugger- prefix check (max/unmodifiable stay field tags).
func (ContainerName) ValidationRule ¶
func (ContainerName) ValidationRule() *validate.Rule
type ContainerOverride ¶ added in v1.1.2
type ContainerOverride struct {
Name string `json:"name" validate:"required"`
Env env.EnvCollection `json:"env,omitzero"`
EnvFrom []env.EnvFromSource `json:"envFrom,omitzero"`
Command string `json:"command,omitzero" validate:"max=256"`
Args []string `json:"args,omitzero"`
Memory Memory `json:"memory,omitzero"`
Cpu Cpu `json:"cpu,omitzero"`
Image ContainerImage `json:"image,omitzero"`
}
type ContainerSpec ¶
type ContainerSpec struct {
Name ContainerName `json:"name,omitzero" validate:"max=64,unmodifiable"`
Image ContainerImage `json:"image,omitzero"`
WorkingDir WorkingDir `json:"workingDir,omitzero" validate:"max=128"`
Metrics *ContainerSpecMetrics `json:"metrics,omitzero"`
Port *port.Port `json:"port,omitzero"`
Ports []ContainerSpecPorts `json:"ports,omitzero"`
Memory Memory `json:"memory,omitzero" validate:"default=128Mi"`
ReadinessProbe *ContainerSpecReadinessProbe `json:"readinessProbe,omitzero"`
LivenessProbe *ContainerSpecLivenessProbe `json:"livenessProbe,omitzero"`
Cpu Cpu `json:"cpu,omitzero" validate:"default=50m"`
MinCpu Cpu `json:"minCpu,omitzero"`
MinMemory Memory `json:"minMemory,omitzero"`
Env env.EnvCollection `json:"env,omitzero"`
EnvFrom []env.EnvFromSource `json:"envFrom,omitzero"`
Gpu *ContainerSpecGpu `json:"gpu,omitzero"`
InheritEnv *bool `json:"inheritEnv,omitzero" validate:"default=false"`
Command string `json:"command,omitzero" validate:"max=256"`
Args []string `json:"args,omitzero"`
Lifecycle *ContainerSpecLifecycle `json:"lifecycle,omitzero"`
Volumes VolumeList `json:"volumes,omitzero" validate:"max=15"`
}
type ContainerSpecGpu ¶
type ContainerSpecGpu struct {
Nvidia *ContainerSpecGpuNvidia `json:"nvidia,omitzero"`
Custom *ContainerSpecGpuCustom `json:"custom,omitzero"`
}
func (ContainerSpecGpu) ValidationRule ¶
func (ContainerSpecGpu) ValidationRule() *validate.Rule
ValidationRule ports GpuResource's `.xor('nvidia','custom')` + `.error()` remap (workload.ts:289-300). TS remaps ONLY object.xor, so the "neither present" branch keeps Joi's own object.missing message — hence Or() for that branch and the refine for the conflict, rather than one Xor() whose message cannot be overridden.
type ContainerSpecGpuCustom ¶
type ContainerSpecGpuCustom struct {
Resource GpuResourceName `json:"resource" validate:"max=64,required"`
RuntimeClass GpuRuntimeClassName `json:"runtimeClass,omitzero" validate:"max=64"`
Quantity *float64 `json:"quantity,omitzero" validate:"min=0,max=8,default=1"`
}
type ContainerSpecGpuNvidia ¶
type ContainerSpecLifecycle ¶
type ContainerSpecLifecycle struct {
PostStart *ContainerSpecLifecyclePostStart `json:"postStart,omitzero"`
PreStop *ContainerSpecLifecyclePreStop `json:"preStop,omitzero"`
}
type ContainerSpecLifecyclePostStart ¶
type ContainerSpecLifecyclePostStart struct {
Exec *ContainerSpecLifecyclePostStartExec `json:"exec,omitzero"`
}
type ContainerSpecLifecyclePostStartExec ¶
type ContainerSpecLifecyclePostStartExec struct {
Command []string `json:"command,omitzero" validate:"max=256"`
}
type ContainerSpecLifecyclePreStop ¶
type ContainerSpecLifecyclePreStop struct {
Exec *ContainerSpecLifecyclePreStopExec `json:"exec,omitzero"`
}
type ContainerSpecLifecyclePreStopExec ¶
type ContainerSpecLifecyclePreStopExec struct {
Command []string `json:"command,omitzero" validate:"max=256"`
}
type ContainerSpecLivenessProbe ¶
type ContainerSpecLivenessProbe struct {
Exec *ContainerSpecLivenessProbeExec `json:"exec,omitzero"`
Grpc *ContainerSpecLivenessProbeGrpc `json:"grpc,omitzero"`
TcpSocket *ContainerSpecLivenessProbeTcpSocket `json:"tcpSocket,omitzero"`
HttpGet *ContainerSpecLivenessProbeHttpGet `json:"httpGet,omitzero"`
PeriodSeconds *float64 `json:"periodSeconds,omitzero" validate:"integer,min=1,max=600,default=10"`
TimeoutSeconds *float64 `json:"timeoutSeconds,omitzero" validate:"integer,min=1,max=600,default=1"`
SuccessThreshold *float64 `json:"successThreshold,omitzero" validate:"integer,min=1,max=20,default=1"`
FailureThreshold *float64 `json:"failureThreshold,omitzero" validate:"integer,min=1,max=20,default=3"`
InitialDelaySeconds *float64 `json:"initialDelaySeconds,omitzero" validate:"integer,min=0,max=600,default=60"`
}
func (ContainerSpecLivenessProbe) ValidationRule ¶
func (ContainerSpecLivenessProbe) ValidationRule() *validate.Rule
type ContainerSpecLivenessProbeExec ¶
type ContainerSpecLivenessProbeExec struct {
Command []string `json:"command,omitzero" validate:"min=1"`
}
type ContainerSpecLivenessProbeHttpGet ¶
type ContainerSpecLivenessProbeHttpGet struct {
Path string `json:"path,omitzero" validate:"default=/,max=256"`
Port *port.Port `json:"port,omitzero"`
HttpHeaders LivenessHttpHeaderList `json:"httpHeaders,omitzero"`
Scheme ContainerSpecLivenessProbeHttpGetScheme `json:"scheme,omitzero" validate:"default=HTTP"`
}
type ContainerSpecLivenessProbeHttpGetScheme ¶
type ContainerSpecLivenessProbeHttpGetScheme string
const ( ContainerSpecLivenessProbeHttpGetSchemeHttp ContainerSpecLivenessProbeHttpGetScheme = "HTTP" ContainerSpecLivenessProbeHttpGetSchemeHttps ContainerSpecLivenessProbeHttpGetScheme = "HTTPS" )
func (ContainerSpecLivenessProbeHttpGetScheme) EnumValues ¶
func (ContainerSpecLivenessProbeHttpGetScheme) EnumValues() []string
type ContainerSpecMetrics ¶
type ContainerSpecPorts ¶
type ContainerSpecPorts struct {
Protocol ContainerSpecPortsProtocol `json:"protocol,omitzero" validate:"default=http"`
Number port.Port `json:"number" validate:"required"`
}
type ContainerSpecPortsProtocol ¶
type ContainerSpecPortsProtocol string
const ( ContainerSpecPortsProtocolHttp ContainerSpecPortsProtocol = "http" ContainerSpecPortsProtocolHttp2 ContainerSpecPortsProtocol = "http2" ContainerSpecPortsProtocolGrpc ContainerSpecPortsProtocol = "grpc" ContainerSpecPortsProtocolTcp ContainerSpecPortsProtocol = "tcp" )
func (ContainerSpecPortsProtocol) EnumValues ¶
func (ContainerSpecPortsProtocol) EnumValues() []string
type ContainerSpecReadinessProbe ¶
type ContainerSpecReadinessProbe struct {
Exec *ContainerSpecReadinessProbeExec `json:"exec,omitzero"`
Grpc *ContainerSpecReadinessProbeGrpc `json:"grpc,omitzero"`
TcpSocket *ContainerSpecReadinessProbeTcpSocket `json:"tcpSocket,omitzero"`
HttpGet *ContainerSpecReadinessProbeHttpGet `json:"httpGet,omitzero"`
InitialDelaySeconds *float64 `json:"initialDelaySeconds,omitzero" validate:"integer,min=0,max=600,default=10"`
PeriodSeconds *float64 `json:"periodSeconds,omitzero" validate:"integer,min=1,max=600,default=10"`
TimeoutSeconds *float64 `json:"timeoutSeconds,omitzero" validate:"integer,min=1,max=600,default=1"`
SuccessThreshold *float64 `json:"successThreshold,omitzero" validate:"integer,min=1,max=20,default=1"`
FailureThreshold *float64 `json:"failureThreshold,omitzero" validate:"integer,min=1,max=20,default=3"`
}
func (ContainerSpecReadinessProbe) ValidationRule ¶
func (ContainerSpecReadinessProbe) ValidationRule() *validate.Rule
type ContainerSpecReadinessProbeExec ¶
type ContainerSpecReadinessProbeExec struct {
Command []string `json:"command,omitzero" validate:"min=1"`
}
type ContainerSpecReadinessProbeHttpGet ¶
type ContainerSpecReadinessProbeHttpGet struct {
Path string `json:"path,omitzero" validate:"default=/,max=256"`
Port *port.Port `json:"port,omitzero"`
HttpHeaders ReadinessHttpHeaderList `json:"httpHeaders,omitzero"`
Scheme ContainerSpecReadinessProbeHttpGetScheme `json:"scheme,omitzero" validate:"default=HTTP"`
}
type ContainerSpecReadinessProbeHttpGetScheme ¶
type ContainerSpecReadinessProbeHttpGetScheme string
const ( ContainerSpecReadinessProbeHttpGetSchemeHttp ContainerSpecReadinessProbeHttpGetScheme = "HTTP" ContainerSpecReadinessProbeHttpGetSchemeHttps ContainerSpecReadinessProbeHttpGetScheme = "HTTPS" )
func (ContainerSpecReadinessProbeHttpGetScheme) EnumValues ¶
func (ContainerSpecReadinessProbeHttpGetScheme) EnumValues() []string
type Cpu ¶
type Cpu string
func (Cpu) ValidationRule ¶
Cpu ports `Cpu = Joi.string().regex(cpuFmt).max(20)`.
type CronWorkloadContainerOverride ¶
type CronWorkloadContainerOverride struct {
Name string `json:"name" validate:"required"`
Env env.EnvCollection `json:"env,omitzero"`
Command string `json:"command,omitzero"`
Args []string `json:"args,omitzero"`
}
CronWorkloadContainerOverride is the CLOSED containerOverride schema for the ORG-level executeCronWorkload command (orgCommands.ts:12-21 cronWorkloadContainerOverrides). It is deliberately NOT the generic ContainerOverride: it carries NO memory/cpu/image keys (a submitted one is rejected as unknown) and NO command length cap (TS command has no max).
type DisruptionBudget ¶
type DisruptionBudget struct {
MinAvailable string `json:"minAvailable,omitzero"`
}
DisruptionBudget ports workload.ts DisruptionBudget (master f94fb6d78): set either minAvailable or maxUnavailable (oxor), each a whole number or whole percentage.
func (DisruptionBudget) ValidationRule ¶
func (DisruptionBudget) ValidationRule() *validate.Rule
DisruptionBudget: oxor(minAvailable,maxUnavailable); each is a whole number or whole percentage (WholeNumberOrPercent) with its own eviction-sanity custom (workload.ts).
type DnsName ¶
type DnsName string
DnsName resolves to dnsWildcardRule (DnsWildcardPrefix).
func (DnsName) ValidationRule ¶
DnsName ports DnsWildcardPrefix (workload.ts:111) — Go RE2 has no lookahead, so the not-all-digits / not-trailing-dash / optional-leading-* checks are procedural.
type Extras ¶
type Extras struct {
Affinity any `json:"affinity,omitzero"`
Tolerations []any `json:"tolerations,omitzero"`
TopologySpreadConstraints []any `json:"topologySpreadConstraints,omitzero"`
SchedulerName SchedulerName `json:"schedulerName,omitzero"`
Metadata *ExtrasMetadata `json:"metadata,omitzero"`
}
type ExtrasMetadata ¶ added in v1.1.23
type ExtrasMetadata struct {
Labels ExtrasMetadataLabels `json:"labels,omitzero"`
}
type ExtrasMetadataLabels ¶ added in v1.1.23
func (ExtrasMetadataLabels) ValidationRule ¶
func (ExtrasMetadataLabels) ValidationRule() *validate.Rule
The generator emits the extras subtree twice (once for the exported Extras type, once inlined under WorkloadSpec); both carry the same rule.
type FirewallSpec ¶
type FirewallSpec struct {
External *FirewallSpecExternal `json:"external,omitzero"`
Internal *FirewallSpecInternal `json:"internal,omitzero"`
}
type FirewallSpecExternal ¶
type FirewallSpecExternal struct {
InboundAllowCIDR []string `json:"inboundAllowCIDR,omitzero"`
InboundBlockedCIDR []string `json:"inboundBlockedCIDR,omitzero"`
OutboundAllowHostname []string `json:"outboundAllowHostname,omitzero"`
OutboundAllowPort []FirewallSpecExternalOutboundAllowPort `json:"outboundAllowPort,omitzero"`
OutboundAllowCIDR []string `json:"outboundAllowCIDR,omitzero"`
OutboundBlockedCIDR []string `json:"outboundBlockedCIDR,omitzero"`
Http *FirewallSpecExternalHttp `json:"http,omitzero"`
}
type FirewallSpecExternalHttp ¶
type FirewallSpecExternalHttp struct {
InboundHeaderFilter []HeaderFilter `json:"inboundHeaderFilter,omitzero"`
}
type FirewallSpecExternalOutboundAllowPort ¶
type FirewallSpecExternalOutboundAllowPort struct {
Protocol FirewallSpecExternalOutboundAllowPortProtocol `json:"protocol,omitzero" validate:"required"`
Number float64 `json:"number"`
}
type FirewallSpecExternalOutboundAllowPortProtocol ¶
type FirewallSpecExternalOutboundAllowPortProtocol string
const ( FirewallSpecExternalOutboundAllowPortProtocolHttp FirewallSpecExternalOutboundAllowPortProtocol = "http" FirewallSpecExternalOutboundAllowPortProtocolHttps FirewallSpecExternalOutboundAllowPortProtocol = "https" FirewallSpecExternalOutboundAllowPortProtocolTcp FirewallSpecExternalOutboundAllowPortProtocol = "tcp" )
type FirewallSpecInternal ¶
type FirewallSpecInternal struct {
InboundAllowType FirewallSpecInternalInboundAllowType `json:"inboundAllowType,omitzero"`
InboundAllowWorkload []string `json:"inboundAllowWorkload,omitzero"`
}
type FirewallSpecInternalInboundAllowType ¶
type FirewallSpecInternalInboundAllowType string
const ( FirewallSpecInternalInboundAllowTypeNone FirewallSpecInternalInboundAllowType = "none" FirewallSpecInternalInboundAllowTypeSameGvc FirewallSpecInternalInboundAllowType = "same-gvc" FirewallSpecInternalInboundAllowTypeSameOrg FirewallSpecInternalInboundAllowType = "same-org" FirewallSpecInternalInboundAllowTypeWorkloadList FirewallSpecInternalInboundAllowType = "workload-list" )
type GpuResource ¶
type GpuResource struct {
Nvidia *GpuResourceNvidia `json:"nvidia,omitzero"`
Custom *GpuResourceCustom `json:"custom,omitzero"`
}
type GpuResourceCustom ¶
type GpuResourceName ¶
type GpuResourceName string
GpuResourceName ports gpu.custom.resource `regex(/^[a-zA-Z0-9./_-]*$/)` (workload.ts:274-278) — a k8s extended-resource name, which may carry `_`/`-`.
func (GpuResourceName) ValidationRule ¶
func (GpuResourceName) ValidationRule() *validate.Rule
type GpuResourceNvidia ¶
type GpuRuntimeClassName ¶
type GpuRuntimeClassName string
GpuRuntimeClassName ports gpu.custom.runtimeClass `regex(/^[a-zA-Z0-9./]*$/)` (workload.ts:279-283) — the NARROWER of the two; sharing one type with Resource rejected every `_`/`-` resource name TS accepts.
func (GpuRuntimeClassName) ValidationRule ¶
func (GpuRuntimeClassName) ValidationRule() *validate.Rule
type HeaderFilter ¶
type HeaderFilter struct {
Key string `json:"key" validate:"max=128,required"`
AllowedValues []base.Regex `json:"allowedValues,omitzero"`
BlockedValues []base.Regex `json:"blockedValues,omitzero"`
}
func (HeaderFilter) ValidationRule ¶
func (HeaderFilter) ValidationRule() *validate.Rule
type HeaderFilterList ¶
type HeaderFilterList []HeaderFilter
HeaderFilterList ports firewall inboundHeaderFilter makeUnique('key').
func (HeaderFilterList) ValidationRule ¶
func (HeaderFilterList) ValidationRule() *validate.Rule
type HealthCheckSpec ¶
type HealthCheckSpec struct {
Exec *HealthCheckSpecExec `json:"exec,omitzero"`
Grpc *HealthCheckSpecGrpc `json:"grpc,omitzero"`
TcpSocket *HealthCheckSpecTcpSocket `json:"tcpSocket,omitzero"`
HttpGet *HealthCheckSpecHttpGet `json:"httpGet,omitzero"`
InitialDelaySeconds *float64 `json:"initialDelaySeconds,omitzero"`
PeriodSeconds *float64 `json:"periodSeconds,omitzero"`
TimeoutSeconds *float64 `json:"timeoutSeconds,omitzero"`
SuccessThreshold *float64 `json:"successThreshold,omitzero"`
FailureThreshold *float64 `json:"failureThreshold,omitzero"`
}
type HealthCheckSpecExec ¶
type HealthCheckSpecExec struct {
Command []string `json:"command,omitzero"`
}
type HealthCheckSpecGrpc ¶
type HealthCheckSpecGrpc struct {
Port *float64 `json:"port,omitzero"`
}
type HealthCheckSpecHttpGet ¶
type HealthCheckSpecHttpGet struct {
Path string `json:"path,omitzero"`
Port *float64 `json:"port,omitzero"`
HttpHeaders []HealthCheckSpecHttpGetHttpHeaders `json:"httpHeaders,omitzero"`
Scheme HealthCheckSpecHttpGetScheme `json:"scheme,omitzero"`
}
type HealthCheckSpecHttpGetScheme ¶
type HealthCheckSpecHttpGetScheme string
const ( HealthCheckSpecHttpGetSchemeHttp HealthCheckSpecHttpGetScheme = "HTTP" HealthCheckSpecHttpGetSchemeHttps HealthCheckSpecHttpGetScheme = "HTTPS" )
type HealthCheckSpecTcpSocket ¶
type HealthCheckSpecTcpSocket struct {
Port *float64 `json:"port,omitzero"`
}
type HealthCheckStatus ¶
type HealthCheckStatus struct {
Active bool `json:"active" validate:"required"`
Success *bool `json:"success,omitzero"`
Code *float64 `json:"code,omitzero" validate:"integer,min=200,max=599"`
Message string `json:"message,omitzero"`
Failures *float64 `json:"failures,omitzero" validate:"integer,min=0"`
Successes *float64 `json:"successes,omitzero" validate:"integer,min=0"`
LastChecked string `json:"lastChecked,omitzero" validate:"date"`
}
type IdentityLink ¶
type IdentityLink string
IdentityLink resolves to LocalLink+ToKind("identity"): a localLink to a kind-identity resource.
func (IdentityLink) ValidationRule ¶
func (IdentityLink) ValidationRule() *validate.Rule
IdentityLink ports LocalLink().custom(toKind("identity")): a localLink pointing to a resource of kind identity.
type IntOrPercent ¶
type IntOrPercent string
IntOrPercent ports rolloutOptions maxUnavailable/maxSurge (integer or percent).
func (IntOrPercent) ValidationRule ¶
func (IntOrPercent) ValidationRule() *validate.Rule
type IpSetLink ¶
type IpSetLink string
IpSetLink resolves to LocalLink+ToKind("ipset"): a localLink to a kind-ipset resource.
func (IpSetLink) ValidationRule ¶
IpSetLink ports LocalLink().custom(toKind("ipset")): a localLink pointing to a resource of kind ipset.
type JobSpec ¶
type JobSpec struct {
Schedule string `json:"schedule"`
ConcurrencyPolicy JobSpecConcurrencyPolicy `json:"concurrencyPolicy,omitzero"`
HistoryLimit *float64 `json:"historyLimit,omitzero"`
RestartPolicy JobSpecRestartPolicy `json:"restartPolicy,omitzero"`
ActiveDeadlineSeconds *float64 `json:"activeDeadlineSeconds,omitzero"`
}
type JobSpecConcurrencyPolicy ¶
type JobSpecConcurrencyPolicy string
const ( JobSpecConcurrencyPolicyForbid JobSpecConcurrencyPolicy = "Forbid" JobSpecConcurrencyPolicyReplace JobSpecConcurrencyPolicy = "Replace" JobSpecConcurrencyPolicyAllow JobSpecConcurrencyPolicy = "Allow" )
type JobSpecRestartPolicy ¶
type JobSpecRestartPolicy string
const ( JobSpecRestartPolicyOnFailure JobSpecRestartPolicy = "OnFailure" JobSpecRestartPolicyNever JobSpecRestartPolicy = "Never" )
type LivenessHttpHeaderList ¶
type LivenessHttpHeaderList []ContainerSpecLivenessProbeHttpGetHttpHeaders
LivenessHttpHeaderList ports livenessProbe.httpGet.httpHeaders makeUnique('name').
func (LivenessHttpHeaderList) ValidationRule ¶
func (LivenessHttpHeaderList) ValidationRule() *validate.Rule
type LivenessProbe ¶ added in v1.1.13
type LivenessProbe struct {
Exec *LivenessProbeExec `json:"exec,omitzero"`
Grpc *LivenessProbeGrpc `json:"grpc,omitzero"`
TcpSocket *LivenessProbeTcpSocket `json:"tcpSocket,omitzero"`
HttpGet *LivenessProbeHttpGet `json:"httpGet,omitzero"`
PeriodSeconds *float64 `json:"periodSeconds,omitzero"`
TimeoutSeconds *float64 `json:"timeoutSeconds,omitzero"`
SuccessThreshold *float64 `json:"successThreshold,omitzero"`
FailureThreshold *float64 `json:"failureThreshold,omitzero"`
InitialDelaySeconds *float64 `json:"initialDelaySeconds,omitzero"`
}
type LivenessProbeExec ¶ added in v1.1.13
type LivenessProbeExec struct {
Command []string `json:"command,omitzero"`
}
type LivenessProbeGrpc ¶ added in v1.1.13
type LivenessProbeGrpc struct {
Port *float64 `json:"port,omitzero"`
}
type LivenessProbeHttpGet ¶ added in v1.1.13
type LivenessProbeHttpGet struct {
Path string `json:"path,omitzero"`
Port *float64 `json:"port,omitzero"`
HttpHeaders []LivenessProbeHttpGetHttpHeaders `json:"httpHeaders,omitzero"`
Scheme LivenessProbeHttpGetScheme `json:"scheme,omitzero"`
}
type LivenessProbeHttpGetHttpHeaders ¶ added in v1.1.13
type LivenessProbeHttpGetScheme ¶ added in v1.1.13
type LivenessProbeHttpGetScheme string
const ( LivenessProbeHttpGetSchemeHttp LivenessProbeHttpGetScheme = "HTTP" LivenessProbeHttpGetSchemeHttps LivenessProbeHttpGetScheme = "HTTPS" )
type LivenessProbeTcpSocket ¶ added in v1.1.13
type LivenessProbeTcpSocket struct {
Port *float64 `json:"port,omitzero"`
}
type LoadBalancerPort ¶
type LoadBalancerPort struct {
ExternalPort float64 `json:"externalPort" validate:"min=22,max=32768,required"`
Protocol LoadBalancerPortProtocol `json:"protocol,omitzero" validate:"required"`
Scheme LoadBalancerPortScheme `json:"scheme,omitzero"`
ContainerPort *port.Port `json:"containerPort,omitzero"`
}
type LoadBalancerPortProtocol ¶
type LoadBalancerPortProtocol string
const ( LoadBalancerPortProtocolTcp LoadBalancerPortProtocol = "TCP" LoadBalancerPortProtocolUdp LoadBalancerPortProtocol = "UDP" )
func (LoadBalancerPortProtocol) EnumValues ¶
func (LoadBalancerPortProtocol) EnumValues() []string
type LoadBalancerPortScheme ¶
type LoadBalancerPortScheme string
const ( LoadBalancerPortSchemeHttp LoadBalancerPortScheme = "http" LoadBalancerPortSchemeTcp LoadBalancerPortScheme = "tcp" LoadBalancerPortSchemeHttps LoadBalancerPortScheme = "https" LoadBalancerPortSchemeWs LoadBalancerPortScheme = "ws" LoadBalancerPortSchemeWss LoadBalancerPortScheme = "wss" )
func (LoadBalancerPortScheme) EnumValues ¶
func (LoadBalancerPortScheme) EnumValues() []string
type LoadBalancerSpec ¶
type LoadBalancerSpec struct {
Direct *LoadBalancerSpecDirect `json:"direct,omitzero"`
GeoLocation *LoadBalancerSpecGeoLocation `json:"geoLocation,omitzero"`
ReplicaDirect *bool `json:"replicaDirect,omitzero"`
}
type LoadBalancerSpecDirect ¶
type LoadBalancerSpecDirect struct {
Enabled bool `json:"enabled"`
Ports []LoadBalancerPort `json:"ports,omitzero"`
IpSet *string `json:"ipSet,omitzero"`
}
type LoadBalancerSpecGeoLocation ¶
type LoadBalancerSpecGeoLocation struct {
Enabled *bool `json:"enabled,omitzero"`
Headers *LoadBalancerSpecGeoLocationHeaders `json:"headers,omitzero"`
}
type LoadBalancerStatus ¶
type Memory ¶
type Memory string
func (Memory) ValidationRule ¶
Memory ports `Memory = Joi.string().regex(memFmt).max(20).custom(normalize)`.
type PodZoneMap ¶
type ReadinessHttpHeaderList ¶
type ReadinessHttpHeaderList []ContainerSpecReadinessProbeHttpGetHttpHeaders
ReadinessHttpHeaderList ports readinessProbe.httpGet.httpHeaders makeUnique('name').
func (ReadinessHttpHeaderList) ValidationRule ¶
func (ReadinessHttpHeaderList) ValidationRule() *validate.Rule
SortBy precedes the dedupe, matching workload.ts:155 `.sort({by:'name'}) .custom(makeUnique())` — the sort was missing, so headers persisted in submitted order.
type ReadinessProbe ¶ added in v1.1.13
type ReadinessProbe struct {
Exec *ReadinessProbeExec `json:"exec,omitzero"`
Grpc *ReadinessProbeGrpc `json:"grpc,omitzero"`
TcpSocket *ReadinessProbeTcpSocket `json:"tcpSocket,omitzero"`
HttpGet *ReadinessProbeHttpGet `json:"httpGet,omitzero"`
InitialDelaySeconds *float64 `json:"initialDelaySeconds,omitzero"`
PeriodSeconds *float64 `json:"periodSeconds,omitzero"`
TimeoutSeconds *float64 `json:"timeoutSeconds,omitzero"`
SuccessThreshold *float64 `json:"successThreshold,omitzero"`
FailureThreshold *float64 `json:"failureThreshold,omitzero"`
}
type ReadinessProbeExec ¶ added in v1.1.13
type ReadinessProbeExec struct {
Command []string `json:"command,omitzero"`
}
type ReadinessProbeGrpc ¶ added in v1.1.13
type ReadinessProbeGrpc struct {
Port *float64 `json:"port,omitzero"`
}
type ReadinessProbeHttpGet ¶ added in v1.1.13
type ReadinessProbeHttpGet struct {
Path string `json:"path,omitzero"`
Port *float64 `json:"port,omitzero"`
HttpHeaders []ReadinessProbeHttpGetHttpHeaders `json:"httpHeaders,omitzero"`
Scheme ReadinessProbeHttpGetScheme `json:"scheme,omitzero"`
}
type ReadinessProbeHttpGetHttpHeaders ¶ added in v1.1.13
type ReadinessProbeHttpGetScheme ¶ added in v1.1.13
type ReadinessProbeHttpGetScheme string
const ( ReadinessProbeHttpGetSchemeHttp ReadinessProbeHttpGetScheme = "HTTP" ReadinessProbeHttpGetSchemeHttps ReadinessProbeHttpGetScheme = "HTTPS" )
type ReadinessProbeTcpSocket ¶ added in v1.1.13
type ReadinessProbeTcpSocket struct {
Port *float64 `json:"port,omitzero"`
}
type RequestRetryPolicy ¶
type ResolvedImage ¶
type ResolvedImage struct {
Digest string `json:"digest,omitzero"`
Manifests []ResolvedImageManifests `json:"manifests,omitzero"`
}
type ResolvedImageManifests ¶
type ResolvedImageManifests struct {
Image string `json:"image" validate:"required"`
MediaType string `json:"mediaType" validate:"required"`
Digest string `json:"digest" validate:"required"`
Platform ResolvedImageManifestsPlatform `json:"platform,omitzero"`
}
type ResolvedImageManifestsPlatform ¶
func (ResolvedImageManifestsPlatform) ValidationRule ¶
func (ResolvedImageManifestsPlatform) ValidationRule() *validate.Rule
ResolvedImageManifestsPlatform ports `Joi.object().pattern(Joi.string(), Joi.string().allow(”))` (workload.ts:575). The generic map rule rejected the empty string (Joi string.empty), so a manifest whose platform carries e.g. `variant: ""` — what a registry actually returns — was refused where TS stores it.
type ResolvedImages ¶
type ResolvedImages struct {
ResolvedForVersion *float64 `json:"resolvedForVersion,omitzero" validate:"integer"`
ResolvedAt string `json:"resolvedAt,omitzero" validate:"date"`
ErrorMessages []string `json:"errorMessages,omitzero"`
NextRetryAt string `json:"nextRetryAt,omitzero" validate:"date"`
Images []ResolvedImage `json:"images,omitzero"`
}
type RetryCondition ¶
type RetryCondition string
RetryCondition resolves to String().Max(32).Custom(retryOn).
func (RetryCondition) ValidationRule ¶
func (RetryCondition) ValidationRule() *validate.Rule
RetryCondition ports the requestRetryPolicy.retryOn[] element check.
type RolloutOptions ¶
type RolloutOptions struct {
MinReadySeconds *float64 `json:"minReadySeconds,omitzero"`
MaxSurgeReplicas string `json:"maxSurgeReplicas,omitzero"`
ScalingPolicy RolloutOptionsScalingPolicy `json:"scalingPolicy,omitzero"`
TerminationGracePeriodSeconds *float64 `json:"terminationGracePeriodSeconds,omitzero"`
}
type RolloutOptionsScalingPolicy ¶
type RolloutOptionsScalingPolicy string
const ( RolloutOptionsScalingPolicyOrderedReady RolloutOptionsScalingPolicy = "OrderedReady" RolloutOptionsScalingPolicyParallel RolloutOptionsScalingPolicy = "Parallel" )
type ScheduleType ¶
type ScheduleType string //ts:export
func (ScheduleType) ValidationRule ¶
func (ScheduleType) ValidationRule() *validate.Rule
ScheduleType ports `ScheduleType = Joi.string().custom(cron)`.
type SchedulerName ¶
type SchedulerName string
SchedulerName is the pod schedulerName routing pods to a custom scheduler (workload.ts Extras, 2e07953ae). A DNS-1123 subdomain — what k8s accepts here.
func (SchedulerName) ValidationRule ¶
func (SchedulerName) ValidationRule() *validate.Rule
type SecurityOptions ¶
type VolumeList ¶
type VolumeList []volumeSpec.VolumeSpec
VolumeList ports container volumes .unique() + mount-path parent/dup checks.
func (VolumeList) ValidationRule ¶
func (VolumeList) ValidationRule() *validate.Rule
type WorkingDir ¶
type WorkingDir string
WorkingDir ports ContainerSpec.workingDir (absolute-path custom).
func (WorkingDir) ValidationRule ¶
func (WorkingDir) ValidationRule() *validate.Rule
type Workload ¶
type Workload struct {
Id string `json:"id,omitzero" validate:"uuid,readOnly"`
Kind base.Kind `json:"kind,omitzero"`
Version *float64 `json:"version,omitzero" validate:"positive,integer,readOnly"`
Description string `json:"description,omitzero" validate:"trim,max=250,allow="`
Tags WorkloadTags `json:"tags,omitzero" validate:"default={}"`
Created string `json:"created,omitzero" validate:"date,readOnly"`
LastModified string `json:"lastModified,omitzero" validate:"date,readOnly"`
Links base.Links `json:"links,omitzero" validate:"readOnly"`
Name WorkloadName `json:"name,omitzero" validate:"max=49,unmodifiable"`
Gvc string `json:"gvc,omitzero" validate:"allow=,max=64"`
Health *WorkloadHealth `json:"health,omitzero"`
Spec WorkloadSpec `json:"spec" validate:"required"`
Status *WorkloadStatus `json:"status,omitzero"`
}
func (Workload) ValidationRule ¶
Workload is the schema the "workload" kind validates against.
type WorkloadConfig ¶ added in v1.1.9
type WorkloadConfig struct {
Scheduling *WorkloadConfigScheduling `json:"scheduling,omitzero"`
ThinProvision *float64 `json:"thinProvision,omitzero"`
PodZoneMap WorkloadConfigPodZoneMap `json:"podZoneMap,omitzero"`
LocationPodZoneMap WorkloadConfigLocationPodZoneMap `json:"locationPodZoneMap,omitzero"`
Proxy *WorkloadConfigProxy `json:"proxy,omitzero"`
Subsets *WorkloadConfigSubsets `json:"subsets,omitzero"`
Capabilities *WorkloadConfigCapabilities `json:"capabilities,omitzero"`
Seccomp *WorkloadConfigSeccomp `json:"seccomp,omitzero"`
}
type WorkloadConfigCapabilities ¶
type WorkloadConfigCapabilities struct {
Drop []string `json:"drop,omitzero"`
Keep []string `json:"keep,omitzero"`
}
Capabilities (master ccfd1ae08) and Seccomp (master 40bb798c0) are config-driven actuator overrides. Like the rest of WorkloadConfig they are private and unvalidated, so drop/keep stay plain []string rather than the LinuxCapabilities enum.
type WorkloadConfigLocationPodZoneMap ¶ added in v1.1.9
type WorkloadConfigLocationPodZoneMap map[string]PodZoneMap
type WorkloadConfigPodZoneMap ¶ added in v1.1.9
type WorkloadConfigProxy ¶ added in v1.1.9
type WorkloadConfigProxy struct {
MinCpu *float64 `json:"minCpu,omitzero"`
}
type WorkloadConfigScheduling ¶ added in v1.1.9
type WorkloadConfigSeccomp ¶
type WorkloadConfigSeccomp struct {
Unconfined *bool `json:"unconfined,omitzero"`
}
type WorkloadConfigSubsets ¶ added in v1.1.9
type WorkloadConfigSubsets struct {
Enabled *bool `json:"enabled,omitzero"`
}
type WorkloadHealth ¶ added in v1.1.5
type WorkloadHealth struct {
Readiness string `json:"readiness,omitzero"`
SyncFailed *bool `json:"syncFailed,omitzero"`
ReadyLocations *float64 `json:"readyLocations,omitzero" validate:"integer,min=0"`
TotalLocations *float64 `json:"totalLocations,omitzero" validate:"integer,min=0"`
ReadyReplicas *float64 `json:"readyReplicas,omitzero" validate:"integer,min=0"`
TotalReplicas *float64 `json:"totalReplicas,omitzero" validate:"integer,min=0"`
} //ts:export
type WorkloadLink ¶
type WorkloadLink string
WorkloadLink resolves to LocalLink+ToKind("!workload","internal","agent").
func (WorkloadLink) ValidationRule ¶
func (WorkloadLink) ValidationRule() *validate.Rule
WorkloadLink ports LocalLink + ToKind("!workload","internal","agent").
type WorkloadLinkList ¶
type WorkloadLinkList []WorkloadLink
WorkloadLinkList ports firewall inboundAllowWorkload makeUnique(empty).
func (WorkloadLinkList) ValidationRule ¶
func (WorkloadLinkList) ValidationRule() *validate.Rule
type WorkloadName ¶
type WorkloadName string
WorkloadName ports Workload.name `regex(name)` (max/unmodifiable stay field tags).
func (WorkloadName) ValidationRule ¶
func (WorkloadName) ValidationRule() *validate.Rule
type WorkloadSpec ¶
type WorkloadSpec struct {
Type WorkloadType `json:"type,omitzero" validate:"default=serverless"`
IdentityLink *IdentityLink `json:"identityLink,omitzero"`
Containers []ContainerSpec `json:"containers" validate:"min=1,max=8,required"`
FirewallConfig *WorkloadSpecFirewallConfig `json:"firewallConfig,omitzero"`
DefaultOptions *workloadOptions.DefaultOptions `json:"defaultOptions,omitzero"`
LocalOptions workloadOptions.LocalOptions `json:"localOptions,omitzero"`
Job *WorkloadSpecJob `json:"job,omitzero"`
Sidecar *WorkloadSpecSidecar `json:"sidecar,omitzero"`
SupportDynamicTags *bool `json:"supportDynamicTags,omitzero" validate:"default=false"`
RolloutOptions *WorkloadSpecRolloutOptions `json:"rolloutOptions,omitzero"`
DisruptionBudget *DisruptionBudget `json:"disruptionBudget,omitzero"`
SecurityOptions *WorkloadSpecSecurityOptions `json:"securityOptions,omitzero"`
LoadBalancer *WorkloadSpecLoadBalancer `json:"loadBalancer,omitzero"`
Networking *WorkloadSpecNetworking `json:"networking,omitzero"`
Extras *WorkloadSpecExtras `json:"extras,omitzero"`
RequestRetryPolicy *WorkloadSpecRequestRetryPolicy `json:"requestRetryPolicy,omitzero"`
Vm *vm.VmSpec `json:"vm,omitzero"`
Sandbox *sandbox.SandboxSpec `json:"sandbox,omitzero" validate:"optional"`
}
func (WorkloadSpec) ValidationRule ¶
func (WorkloadSpec) ValidationRule() *validate.Rule
type WorkloadSpecExtras ¶
type WorkloadSpecExtras struct {
Affinity any `json:"affinity,omitzero"`
Tolerations []any `json:"tolerations,omitzero"`
TopologySpreadConstraints []any `json:"topologySpreadConstraints,omitzero"`
SchedulerName SchedulerName `json:"schedulerName,omitzero"`
Metadata *WorkloadSpecExtrasMetadata `json:"metadata,omitzero"`
}
type WorkloadSpecExtrasMetadata ¶ added in v1.1.23
type WorkloadSpecExtrasMetadata struct {
Labels WorkloadSpecExtrasMetadataLabels `json:"labels,omitzero"`
}
type WorkloadSpecExtrasMetadataLabels ¶ added in v1.1.23
func (WorkloadSpecExtrasMetadataLabels) ValidationRule ¶
func (WorkloadSpecExtrasMetadataLabels) ValidationRule() *validate.Rule
type WorkloadSpecFirewallConfig ¶
type WorkloadSpecFirewallConfig struct {
External *WorkloadSpecFirewallConfigExternal `json:"external,omitzero"`
Internal *WorkloadSpecFirewallConfigInternal `json:"internal,omitzero"`
}
type WorkloadSpecFirewallConfigExternal ¶
type WorkloadSpecFirewallConfigExternal struct {
InboundAllowCIDR CIDRList `json:"inboundAllowCIDR,omitzero" validate:"max=250,sort,default=[]"`
InboundBlockedCIDR CIDRList `json:"inboundBlockedCIDR,omitzero" validate:"sort,default=[]"`
OutboundAllowHostname []DnsName `json:"outboundAllowHostname,omitzero" validate:"default=[]"`
OutboundAllowPort []WorkloadSpecFirewallConfigExternalOutboundAllowPort `json:"outboundAllowPort,omitzero"`
OutboundAllowCIDR CIDRList `json:"outboundAllowCIDR,omitzero" validate:"default=[],sort"`
OutboundBlockedCIDR CIDRList `json:"outboundBlockedCIDR,omitzero" validate:"default=[],sort"`
Http *WorkloadSpecFirewallConfigExternalHttp `json:"http,omitzero"`
}
type WorkloadSpecFirewallConfigExternalHttp ¶
type WorkloadSpecFirewallConfigExternalHttp struct {
InboundHeaderFilter HeaderFilterList `json:"inboundHeaderFilter,omitzero"`
}
type WorkloadSpecFirewallConfigExternalOutboundAllowPort ¶
type WorkloadSpecFirewallConfigExternalOutboundAllowPort struct {
Protocol WorkloadSpecFirewallConfigExternalOutboundAllowPortProtocol `json:"protocol,omitzero" validate:"default=tcp,required"`
Number port.Port `json:"number" validate:"positive,max=65000,required"`
}
type WorkloadSpecFirewallConfigExternalOutboundAllowPortProtocol ¶
type WorkloadSpecFirewallConfigExternalOutboundAllowPortProtocol string
const ( WorkloadSpecFirewallConfigExternalOutboundAllowPortProtocolHttp WorkloadSpecFirewallConfigExternalOutboundAllowPortProtocol = "http" WorkloadSpecFirewallConfigExternalOutboundAllowPortProtocolHttps WorkloadSpecFirewallConfigExternalOutboundAllowPortProtocol = "https" WorkloadSpecFirewallConfigExternalOutboundAllowPortProtocolTcp WorkloadSpecFirewallConfigExternalOutboundAllowPortProtocol = "tcp" )
func (WorkloadSpecFirewallConfigExternalOutboundAllowPortProtocol) EnumValues ¶
func (WorkloadSpecFirewallConfigExternalOutboundAllowPortProtocol) EnumValues() []string
type WorkloadSpecFirewallConfigInternal ¶
type WorkloadSpecFirewallConfigInternal struct {
InboundAllowType WorkloadSpecFirewallConfigInternalInboundAllowType `json:"inboundAllowType,omitzero" validate:"default=none"`
InboundAllowWorkload WorkloadLinkList `json:"inboundAllowWorkload,omitzero" validate:"default=[],sort"`
}
type WorkloadSpecFirewallConfigInternalInboundAllowType ¶
type WorkloadSpecFirewallConfigInternalInboundAllowType string
const ( WorkloadSpecFirewallConfigInternalInboundAllowTypeNone WorkloadSpecFirewallConfigInternalInboundAllowType = "none" WorkloadSpecFirewallConfigInternalInboundAllowTypeSameGvc WorkloadSpecFirewallConfigInternalInboundAllowType = "same-gvc" WorkloadSpecFirewallConfigInternalInboundAllowTypeSameOrg WorkloadSpecFirewallConfigInternalInboundAllowType = "same-org" WorkloadSpecFirewallConfigInternalInboundAllowTypeWorkloadList WorkloadSpecFirewallConfigInternalInboundAllowType = "workload-list" )
func (WorkloadSpecFirewallConfigInternalInboundAllowType) EnumValues ¶
func (WorkloadSpecFirewallConfigInternalInboundAllowType) EnumValues() []string
type WorkloadSpecJob ¶
type WorkloadSpecJob struct {
Schedule ScheduleType `json:"schedule" validate:"required"`
ConcurrencyPolicy WorkloadSpecJobConcurrencyPolicy `json:"concurrencyPolicy,omitzero" validate:"default=Forbid"`
HistoryLimit *float64 `json:"historyLimit,omitzero" validate:"integer,default=5,min=1,max=10"`
RestartPolicy WorkloadSpecJobRestartPolicy `json:"restartPolicy,omitzero"`
ActiveDeadlineSeconds *float64 `json:"activeDeadlineSeconds,omitzero" validate:"min=1,max=86400"`
}
type WorkloadSpecJobConcurrencyPolicy ¶
type WorkloadSpecJobConcurrencyPolicy string
const ( WorkloadSpecJobConcurrencyPolicyForbid WorkloadSpecJobConcurrencyPolicy = "Forbid" WorkloadSpecJobConcurrencyPolicyReplace WorkloadSpecJobConcurrencyPolicy = "Replace" WorkloadSpecJobConcurrencyPolicyAllow WorkloadSpecJobConcurrencyPolicy = "Allow" )
func (WorkloadSpecJobConcurrencyPolicy) EnumValues ¶
func (WorkloadSpecJobConcurrencyPolicy) EnumValues() []string
type WorkloadSpecJobRestartPolicy ¶
type WorkloadSpecJobRestartPolicy string
const ( WorkloadSpecJobRestartPolicyOnFailure WorkloadSpecJobRestartPolicy = "OnFailure" WorkloadSpecJobRestartPolicyNever WorkloadSpecJobRestartPolicy = "Never" )
func (WorkloadSpecJobRestartPolicy) EnumValues ¶
func (WorkloadSpecJobRestartPolicy) EnumValues() []string
type WorkloadSpecLoadBalancer ¶
type WorkloadSpecLoadBalancer struct {
Direct *WorkloadSpecLoadBalancerDirect `json:"direct,omitzero"`
GeoLocation *WorkloadSpecLoadBalancerGeoLocation `json:"geoLocation,omitzero"`
ReplicaDirect *bool `json:"replicaDirect,omitzero" validate:"default=false"`
}
func (WorkloadSpecLoadBalancer) ValidationRule ¶
func (WorkloadSpecLoadBalancer) ValidationRule() *validate.Rule
type WorkloadSpecLoadBalancerDirect ¶
type WorkloadSpecLoadBalancerDirect struct {
Enabled bool `json:"enabled" validate:"required"`
Ports []LoadBalancerPort `json:"ports,omitzero"`
IpSet *IpSetLink `json:"ipSet,omitzero"`
}
type WorkloadSpecLoadBalancerGeoLocation ¶
type WorkloadSpecLoadBalancerGeoLocation struct {
Enabled *bool `json:"enabled,omitzero" validate:"default=false"`
Headers *WorkloadSpecLoadBalancerGeoLocationHeaders `json:"headers,omitzero"`
}
type WorkloadSpecNetworking ¶ added in v1.1.25
type WorkloadSpecNetworking struct {
Internal *WorkloadSpecNetworkingInternal `json:"internal,omitzero"`
}
type WorkloadSpecNetworkingInternal ¶ added in v1.1.25
type WorkloadSpecNetworkingInternal struct {
Routing WorkloadSpecNetworkingInternalRouting `json:"routing,omitzero"`
}
type WorkloadSpecNetworkingInternalRouting ¶ added in v1.1.25
type WorkloadSpecNetworkingInternalRouting string
const ( WorkloadSpecNetworkingInternalRoutingLocationEndpoint WorkloadSpecNetworkingInternalRouting = "locationEndpoint" WorkloadSpecNetworkingInternalRoutingGvcEndpoint WorkloadSpecNetworkingInternalRouting = "gvcEndpoint" )
func (WorkloadSpecNetworkingInternalRouting) EnumValues ¶
func (WorkloadSpecNetworkingInternalRouting) EnumValues() []string
type WorkloadSpecRequestRetryPolicy ¶
type WorkloadSpecRequestRetryPolicy struct {
Attempts *float64 `json:"attempts,omitzero" validate:"integer,min=0,max=4294967295,default=2"`
RetryOn []RetryCondition `json:"retryOn,omitzero"`
}
func (WorkloadSpecRequestRetryPolicy) ValidationRule ¶
func (WorkloadSpecRequestRetryPolicy) ValidationRule() *validate.Rule
type WorkloadSpecRolloutOptions ¶ added in v1.1.9
type WorkloadSpecRolloutOptions struct {
MinReadySeconds *float64 `json:"minReadySeconds,omitzero" validate:"integer,default=0"`
MaxSurgeReplicas IntOrPercent `json:"maxSurgeReplicas,omitzero" validate:"max=5"`
ScalingPolicy WorkloadSpecRolloutOptionsScalingPolicy `json:"scalingPolicy,omitzero" validate:"default=OrderedReady"`
TerminationGracePeriodSeconds *float64 `json:"terminationGracePeriodSeconds,omitzero" validate:"min=0,max=3600,default=90"`
RolloutOnReferenceChange *bool `json:"rolloutOnReferenceChange,omitzero"`
}
type WorkloadSpecRolloutOptionsScalingPolicy ¶ added in v1.1.9
type WorkloadSpecRolloutOptionsScalingPolicy string
const ( WorkloadSpecRolloutOptionsScalingPolicyOrderedReady WorkloadSpecRolloutOptionsScalingPolicy = "OrderedReady" WorkloadSpecRolloutOptionsScalingPolicyParallel WorkloadSpecRolloutOptionsScalingPolicy = "Parallel" )
func (WorkloadSpecRolloutOptionsScalingPolicy) EnumValues ¶
func (WorkloadSpecRolloutOptionsScalingPolicy) EnumValues() []string
type WorkloadSpecSidecar ¶
type WorkloadSpecSidecar struct {
Envoy *WorkloadSpecSidecarEnvoy `json:"envoy,omitzero"`
}
type WorkloadSpecSidecarEnvoy ¶
type WorkloadSpecSidecarEnvoy = envoy.EnvoyFilters
WorkloadSpecSidecarEnvoy is the SAME shape gvc's sidecar carries. It used to be a structural duplicate, which meant every object-level rule on envoy.EnvoyFilters (the root refine, the xor groups) reached gvc and silently missed workload.
type WorkloadStatus ¶
type WorkloadStatus struct {
ParentId string `json:"parentId,omitzero" validate:"uuid"`
CanonicalEndpoint string `json:"canonicalEndpoint,omitzero" validate:"uri"`
Endpoint string `json:"endpoint,omitzero" validate:"uri"`
InternalName string `json:"internalName,omitzero"`
ReplicaInternalNames []string `json:"replicaInternalNames,omitzero"`
HealthCheck *WorkloadStatusHealthCheck `json:"healthCheck,omitzero"`
CurrentReplicaCount *float64 `json:"currentReplicaCount,omitzero"`
ResolvedImages *WorkloadStatusResolvedImages `json:"resolvedImages,omitzero"`
LoadBalancer []LoadBalancerStatus `json:"loadBalancer,omitzero"`
SuspendedStatus string `json:"suspendedStatus,omitzero"`
// WorkloadStatus is .unknown(true) (validate.go:401): properties it does not
// name round-trip untouched.
Extras base.Extras `json:"-"`
}
func (WorkloadStatus) MarshalJSON ¶
func (s WorkloadStatus) MarshalJSON() ([]byte, error)
func (*WorkloadStatus) UnmarshalJSON ¶
func (s *WorkloadStatus) UnmarshalJSON(b []byte) error
func (WorkloadStatus) ValidationRule ¶
func (WorkloadStatus) ValidationRule() *validate.Rule
type WorkloadStatusHealthCheck ¶
type WorkloadStatusHealthCheck struct {
Active bool `json:"active" validate:"required"`
Success *bool `json:"success,omitzero"`
Code *float64 `json:"code,omitzero" validate:"integer,min=200,max=599"`
Message string `json:"message,omitzero"`
Failures *float64 `json:"failures,omitzero" validate:"integer,min=0"`
Successes *float64 `json:"successes,omitzero" validate:"integer,min=0"`
LastChecked string `json:"lastChecked,omitzero" validate:"date"`
}
type WorkloadStatusResolvedImages ¶
type WorkloadStatusResolvedImages struct {
ResolvedForVersion *float64 `json:"resolvedForVersion,omitzero" validate:"integer"`
ResolvedAt string `json:"resolvedAt,omitzero" validate:"date"`
ErrorMessages []string `json:"errorMessages,omitzero"`
NextRetryAt string `json:"nextRetryAt,omitzero" validate:"date"`
Images []ResolvedImage `json:"images,omitzero"`
}
type WorkloadTags ¶
type WorkloadType ¶
type WorkloadType string
const ( WorkloadTypeServerless WorkloadType = "serverless" WorkloadTypeStandard WorkloadType = "standard" WorkloadTypeCron WorkloadType = "cron" WorkloadTypeStateful WorkloadType = "stateful" WorkloadTypeVm WorkloadType = "vm" )
func (WorkloadType) EnumValues ¶
func (WorkloadType) EnumValues() []string