Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/ateapi/internal/controlapi/actor_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ func ValidateCustom_Resources_Limits(_ context.Context, _ operation.Operation, f
return errs
}

// ValidateCustom_ActorTemplate_SnapshotsConfig mirrors the ActorTemplate
// ValidateCustom_SnapshotsConfig mirrors the ActorTemplate
// CRD's CEL rule: on_commit must be a subset of on_pause. UNSPECIFIED means
// FULL, so an unset on_commit over a DATA on_pause is rejected too.
func ValidateCustom_ActorTemplate_SnapshotsConfig(_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *ateapipb.SnapshotsConfig) field.ErrorList {
func ValidateCustom_SnapshotsConfig(_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *ateapipb.SnapshotsConfig) field.ErrorList {
if value.GetOnPause() == ateapipb.SnapshotContentScope_SNAPSHOT_CONTENT_SCOPE_DATA &&
value.GetOnCommit() != ateapipb.SnapshotContentScope_SNAPSHOT_CONTENT_SCOPE_DATA {
return field.ErrorList{field.Invalid(fldPath.Child("on_commit"), value.GetOnCommit().String(), "must be a subset of on_pause")}
Expand Down
9 changes: 5 additions & 4 deletions cmd/ateapi/internal/controlapi/zz_generated.validation.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pkg/proto/ateapipb/ateapi.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pkg/proto/ateapipb/ateapi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,6 @@ message ActorTemplate {
repeated Volume volumes = 4;

// +k8s:required
// +k8s:customValidation # on_commit must be a subset of on_pause
SnapshotsConfig snapshots_config = 5;

// sandbox_config selects the sandbox runtime this version's actors run on.
Expand Down Expand Up @@ -808,6 +807,7 @@ message SandboxConfig {
string config_name = 2;
}

// +k8s:customValidation # on_commit must be a subset of on_pause
message SnapshotsConfig {
// on_pause selects what is captured during pause actor. UNSPECIFIED is
// tolerated for compatibility and reads as FULL.
Expand Down Expand Up @@ -897,6 +897,9 @@ message Container {
// +k8s:eachVal=+k8s:maxLength=4096 # argv strings; guardrail, not a contract
repeated string args = 4;

// Env variables to set in the container's process environment. Unlike
// Kubernetes, $(VAR_NAME) references are NOT expanded in this field.
//
// +k8s:optional
// +k8s:maxItems=32
// +k8s:listType=map # each variable is set at most once
Expand Down
Loading