Packages:

addons.projectcapsule.dev/v1alpha1

Resource Types:

ChangeWindow

↩ Parent

ChangeWindow describes scheduled resource changes and admission restrictions.

NameTypeDescriptionRequired
apiVersionstringaddons.projectcapsule.dev/v1alpha1true
kindstringChangeWindowtrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobjectChangeWindowSpec selects namespaces and resources for scheduled behavior.
true
statusobject
false

ChangeWindow.spec

↩ Parent

ChangeWindowSpec selects namespaces and resources for scheduled behavior.

NameTypeDescriptionRequired
schedules[]objectSchedules form a union of overlapping and adjacent windows.
true
serviceAccountobjectServiceAccount is required for every window, including admission-only windows. Resource actions use this identity for workload reads and SSA writes.
true
targets[]object
true
actions[]object
false
admission[]object
false
configobject
false
namespaceSelectors[]objectNamespaceSelectors are ORed for namespaced targets. Required when any target is namespaced. Omit for Node-only windows; Node targets use their own label selector. An explicit empty selector matches all non-protected namespaces.
false

ChangeWindow.spec.schedules[index]

↩ Parent

NameTypeDescriptionRequired
cronstringCron is a standard five-field cron expression; seconds and TZ prefixes are not accepted.
true
durationstringDuration is elapsed time, greater than zero and at most 168h.
true
namestring
true
timeZonestring

Default: UTC
false

ChangeWindow.spec.serviceAccount

↩ Parent

ServiceAccount is required for every window, including admission-only windows. Resource actions use this identity for workload reads and SSA writes.

NameTypeDescriptionRequired
namestring
true
namespacestring
true

ChangeWindow.spec.targets[index]

↩ Parent

Target selects a resource kind and labels. Admission targets support Capsule GVK patterns and match namespaced resources only, except concrete v1 Node targets. Scheduled actions require a concrete namespaced apiVersion and kind.

NameTypeDescriptionRequired
kindstringKind is case-sensitive and supports * patterns, for example *Set or Deploy*.
true
namestring
true
apiVersionstringAPIVersion uses Capsule GVK matching: omitted/empty means core v1; apps matches any apps version, apps/v1 is exact, and * matches all groups and versions. Partial patterns such as apps/* and *.example.com/v1 work too.
false
selectorobjectSelector selects resource labels. For Nodes it selects nodes directly; for namespaced targets it applies within the selected namespaces.
false

ChangeWindow.spec.targets[index].selector

↩ Parent

Selector selects resource labels. For Nodes it selects nodes directly; for namespaced targets it applies within the selected namespaces.

NameTypeDescriptionRequired
matchExpressions[]objectmatchExpressions is a list of label selector requirements. The requirements are ANDed.
false
matchLabelsmap[string]stringmatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
false

ChangeWindow.spec.targets[index].selector.matchExpressions[index]

↩ Parent

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

NameTypeDescriptionRequired
keystringkey is the label key that the selector applies to.
true
operatorstringoperator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
true
values[]stringvalues is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
false

ChangeWindow.spec.actions[index]

↩ Parent

NameTypeDescriptionRequired
namestring
true
targets[]string
true
capturemap[string]objectCapture stores only explicitly selected JSON pointer values before any mutation.
false
onEndobject
false
onStartobject
false

ChangeWindow.spec.actions[index].capture[key]

↩ Parent

NameTypeDescriptionRequired
pathstringPath is an RFC 6901 JSON pointer.
true
subresourcestring
false

ChangeWindow.spec.actions[index].onEnd

↩ Parent

NameTypeDescriptionRequired
applyobject
true

ChangeWindow.spec.actions[index].onEnd.apply

↩ Parent

NameTypeDescriptionRequired
templatestringTemplate renders a partial YAML/JSON object. Identity is supplied by the controller.
true
forcebooleanForce explicitly transfers ownership of conflicting fields.
false
subresourcestringSubresource is an actual Kubernetes subresource, e.g. scale (not rollout).
false

ChangeWindow.spec.actions[index].onStart

↩ Parent

NameTypeDescriptionRequired
applyobject
true

ChangeWindow.spec.actions[index].onStart.apply

↩ Parent

NameTypeDescriptionRequired
templatestringTemplate renders a partial YAML/JSON object. Identity is supplied by the controller.
true
forcebooleanForce explicitly transfers ownership of conflicting fields.
false
subresourcestringSubresource is an actual Kubernetes subresource, e.g. scale (not rollout).
false

ChangeWindow.spec.admission[index]

↩ Parent

NameTypeDescriptionRequired
messagestringMessage is a Go template with target and window context.
true
namestring
true
operations[]enum

Enum: CREATE, UPDATE, DELETE
true
targets[]string
true
actionenum

Enum: Deny
Default: Deny
false
audienceobjectAudience selects authenticated request identities. Omitted or empty means everyone.
false
matchConditions[]objectMatchConditions are ANDed CEL expressions. An empty list matches all requests. A false result skips this entry. Evaluation errors fail closed for denial rules; warning errors return a diagnostic warning without denying the request. Variables: object, oldObject, request, namespaceObject. Objects are the actual admission payloads (e.g. Scale for /scale); absent objects are null.
false
subresources[]stringSubresources defaults to the parent resource only. Use "scale" for /scale, "*" for all subresources, and ["", "*"] for parent and subresource writes.
false
whenenum

Enum: Active, Inactive
Default: Active
false

ChangeWindow.spec.admission[index].audience

↩ Parent

Audience selects authenticated request identities. Omitted or empty means everyone.

NameTypeDescriptionRequired
exclude[]object
false
include[]object
false

ChangeWindow.spec.admission[index].audience.exclude[index]

↩ Parent

Subject identifies an authenticated user, group, or namespaced service account.

NameTypeDescriptionRequired
kindenum

Enum: User, Group, ServiceAccount
true
namestring
true
namespacestringNamespace is mandatory for ServiceAccounts and forbidden for Users and Groups.
false

ChangeWindow.spec.admission[index].audience.include[index]

↩ Parent

Subject identifies an authenticated user, group, or namespaced service account.

NameTypeDescriptionRequired
kindenum

Enum: User, Group, ServiceAccount
true
namestring
true
namespacestringNamespace is mandatory for ServiceAccounts and forbidden for Users and Groups.
false

ChangeWindow.spec.admission[index].matchConditions[index]

↩ Parent

MatchCondition is a named CEL boolean expression compiled with the policy.

NameTypeDescriptionRequired
expressionstring
true
namestring
true

ChangeWindow.spec.config

↩ Parent

NameTypeDescriptionRequired
admissionobject
false

ChangeWindow.spec.config.admission

↩ Parent

NameTypeDescriptionRequired
warnings[]object
false

ChangeWindow.spec.config.admission.warnings[index]

↩ Parent

NameTypeDescriptionRequired
messagestring
true
namestring
true
operations[]enum

Enum: CREATE, UPDATE, DELETE
true
targets[]string
true
whenenum

Enum: BeforeStart, Active, BeforeEnd
true
audienceobjectAudience selects authenticated request identities. Omitted or empty means everyone.
false
matchConditions[]objectMatchConditions are ANDed CEL expressions. An empty list matches all requests. A false result skips this entry. Evaluation errors fail closed for denial rules; warning errors return a diagnostic warning without denying the request. Variables: object, oldObject, request, namespaceObject. Objects are the actual admission payloads (e.g. Scale for /scale); absent objects are null.
false
subresources[]stringSubresources defaults to the parent resource only. Use "scale" for /scale, "*" for all subresources, and ["", "*"] for parent and subresource writes.
false
withinstringWithin is required for BeforeStart/BeforeEnd and must be positive, at most 168h.
false

ChangeWindow.spec.config.admission.warnings[index].audience

↩ Parent

Audience selects authenticated request identities. Omitted or empty means everyone.

NameTypeDescriptionRequired
exclude[]object
false
include[]object
false

ChangeWindow.spec.config.admission.warnings[index].audience.exclude[index]

↩ Parent

Subject identifies an authenticated user, group, or namespaced service account.

NameTypeDescriptionRequired
kindenum

Enum: User, Group, ServiceAccount
true
namestring
true
namespacestringNamespace is mandatory for ServiceAccounts and forbidden for Users and Groups.
false

ChangeWindow.spec.config.admission.warnings[index].audience.include[index]

↩ Parent

Subject identifies an authenticated user, group, or namespaced service account.

NameTypeDescriptionRequired
kindenum

Enum: User, Group, ServiceAccount
true
namestring
true
namespacestringNamespace is mandatory for ServiceAccounts and forbidden for Users and Groups.
false

ChangeWindow.spec.config.admission.warnings[index].matchConditions[index]

↩ Parent

MatchCondition is a named CEL boolean expression compiled with the policy.

NameTypeDescriptionRequired
expressionstring
true
namestring
true

ChangeWindow.spec.namespaceSelectors[index]

↩ Parent

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

NameTypeDescriptionRequired
matchExpressions[]objectmatchExpressions is a list of label selector requirements. The requirements are ANDed.
false
matchLabelsmap[string]stringmatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
false

ChangeWindow.spec.namespaceSelectors[index].matchExpressions[index]

↩ Parent

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

NameTypeDescriptionRequired
keystringkey is the label key that the selector applies to.
true
operatorstringoperator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
true
values[]stringvalues is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
false

ChangeWindow.status

↩ Parent

NameTypeDescriptionRequired
activebooleanActive mirrors the Active condition for compatibility. Conditions distinguish unknown state.
false
conditions[]objectConditions report reconciliation readiness (Ready) and schedule occupancy (Active). Active reasons are Planned before the first observed window, Active during a window, Finishing while restoration is outstanding, and Finished after an observed window completes. Finished persists until another window starts. Unknown denotes invalid policy; Unscheduled means no occurrence is available and none has been observed.
false
nextTransitionstringNextTransition is the active window's end or the next planned start, including after Finished.

Format: date-time
false
observedGenerationinteger

Format: int64
false
pendingResourcesintegerPendingResources counts journal entries still requiring completion.

Format: int32
false
windowEndstringWindowEnd is absent when the effective end is beyond the bounded scheduling horizon.

Format: date-time
false
windowStartstring

Format: date-time
false

ChangeWindow.status.conditions[index]

↩ Parent

Condition contains details for one aspect of the current state of this API Resource.

NameTypeDescriptionRequired
lastTransitionTimestringlastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.

Format: date-time
true
messagestringmessage is a human readable message indicating details about the transition. This may be an empty string.
true
reasonstringreason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
true
statusenumstatus of the condition, one of True, False, Unknown.

Enum: True, False, Unknown
true
typestringtype of condition in CamelCase or in foo.example.com/CamelCase.
true
observedGenerationintegerobservedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.

Format: int64
Minimum: 0
false