On this page
- ChangeWindow
- ChangeWindow.spec
- ChangeWindow.spec.schedules[index]
- ChangeWindow.spec.serviceAccount
- ChangeWindow.spec.targets[index]
- ChangeWindow.spec.targets[index].selector
- ChangeWindow.spec.targets[index].selector.matchExpressions[index]
- ChangeWindow.spec.actions[index]
- ChangeWindow.spec.actions[index].capture[key]
- ChangeWindow.spec.actions[index].onEnd
- ChangeWindow.spec.actions[index].onEnd.apply
- ChangeWindow.spec.actions[index].onStart
- ChangeWindow.spec.actions[index].onStart.apply
- ChangeWindow.spec.admission[index]
- ChangeWindow.spec.admission[index].audience
- ChangeWindow.spec.admission[index].audience.exclude[index]
- ChangeWindow.spec.admission[index].audience.include[index]
- ChangeWindow.spec.admission[index].matchConditions[index]
- ChangeWindow.spec.config
- ChangeWindow.spec.config.admission
- ChangeWindow.spec.config.admission.warnings[index]
- ChangeWindow.spec.config.admission.warnings[index].audience
- ChangeWindow.spec.config.admission.warnings[index].audience.exclude[index]
- ChangeWindow.spec.config.admission.warnings[index].audience.include[index]
- ChangeWindow.spec.config.admission.warnings[index].matchConditions[index]
- ChangeWindow.spec.namespaceSelectors[index]
- ChangeWindow.spec.namespaceSelectors[index].matchExpressions[index]
- ChangeWindow.status
- ChangeWindow.status.conditions[index]
API reference
Packages:
addons.projectcapsule.dev/v1alpha1
Resource Types:
ChangeWindow
ChangeWindow describes scheduled resource changes and admission restrictions.
| Name | Type | Description | Required |
|---|---|---|---|
| apiVersion | string | addons.projectcapsule.dev/v1alpha1 | true |
| kind | string | ChangeWindow | true |
| metadata | object | Refer to the Kubernetes API documentation for the fields of the `metadata` field. | true |
| spec | object | ChangeWindowSpec selects namespaces and resources for scheduled behavior. | true |
| status | object | false |
ChangeWindow.spec
ChangeWindowSpec selects namespaces and resources for scheduled behavior.
| Name | Type | Description | Required |
|---|---|---|---|
| schedules | []object | Schedules form a union of overlapping and adjacent windows. | true |
| serviceAccount | object | ServiceAccount 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 | |
| config | object | false | |
| namespaceSelectors | []object | NamespaceSelectors 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]
| Name | Type | Description | Required |
|---|---|---|---|
| cron | string | Cron is a standard five-field cron expression; seconds and TZ prefixes are not accepted. | true |
| duration | string | Duration is elapsed time, greater than zero and at most 168h. | true |
| name | string | true | |
| timeZone | string | Default: UTC | false |
ChangeWindow.spec.serviceAccount
ServiceAccount is required for every window, including admission-only windows. Resource actions use this identity for workload reads and SSA writes.
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | true | |
| namespace | string | true |
ChangeWindow.spec.targets[index]
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.
| Name | Type | Description | Required |
|---|---|---|---|
| kind | string | Kind is case-sensitive and supports * patterns, for example *Set or Deploy*. | true |
| name | string | true | |
| apiVersion | string | APIVersion 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 |
| selector | object | Selector selects resource labels. For Nodes it selects nodes directly;
for namespaced targets it applies within the selected namespaces. | false |
ChangeWindow.spec.targets[index].selector
Selector selects resource labels. For Nodes it selects nodes directly; for namespaced targets it applies within the selected namespaces.
| Name | Type | Description | Required |
|---|---|---|---|
| matchExpressions | []object | matchExpressions is a list of label selector requirements. The requirements are ANDed. | false |
| matchLabels | map[string]string | matchLabels 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]
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
| Name | Type | Description | Required |
|---|---|---|---|
| key | string | key is the label key that the selector applies to. | true |
| operator | string | operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist. | true |
| values | []string | values 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]
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | true | |
| targets | []string | true | |
| capture | map[string]object | Capture stores only explicitly selected JSON pointer values before any mutation. | false |
| onEnd | object | false | |
| onStart | object | false |
ChangeWindow.spec.actions[index].capture[key]
| Name | Type | Description | Required |
|---|---|---|---|
| path | string | Path is an RFC 6901 JSON pointer. | true |
| subresource | string | false |
ChangeWindow.spec.actions[index].onEnd
| Name | Type | Description | Required |
|---|---|---|---|
| apply | object | true |
ChangeWindow.spec.actions[index].onEnd.apply
| Name | Type | Description | Required |
|---|---|---|---|
| template | string | Template renders a partial YAML/JSON object. Identity is supplied by the controller. | true |
| force | boolean | Force explicitly transfers ownership of conflicting fields. | false |
| subresource | string | Subresource is an actual Kubernetes subresource, e.g. scale (not rollout). | false |
ChangeWindow.spec.actions[index].onStart
| Name | Type | Description | Required |
|---|---|---|---|
| apply | object | true |
ChangeWindow.spec.actions[index].onStart.apply
| Name | Type | Description | Required |
|---|---|---|---|
| template | string | Template renders a partial YAML/JSON object. Identity is supplied by the controller. | true |
| force | boolean | Force explicitly transfers ownership of conflicting fields. | false |
| subresource | string | Subresource is an actual Kubernetes subresource, e.g. scale (not rollout). | false |
ChangeWindow.spec.admission[index]
| Name | Type | Description | Required |
|---|---|---|---|
| message | string | Message is a Go template with target and window context. | true |
| name | string | true | |
| operations | []enum | Enum: CREATE, UPDATE, DELETE | true |
| targets | []string | true | |
| action | enum | Enum: Deny Default: Deny | false |
| audience | object | Audience selects authenticated request identities. Omitted or empty means everyone. | false |
| matchConditions | []object | MatchConditions 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 | []string | Subresources defaults to the parent resource only. Use "scale" for /scale,
"*" for all subresources, and ["", "*"] for parent and subresource writes. | false |
| when | enum | Enum: Active, Inactive Default: Active | false |
ChangeWindow.spec.admission[index].audience
Audience selects authenticated request identities. Omitted or empty means everyone.
| Name | Type | Description | Required |
|---|---|---|---|
| exclude | []object | false | |
| include | []object | false |
ChangeWindow.spec.admission[index].audience.exclude[index]
Subject identifies an authenticated user, group, or namespaced service account.
| Name | Type | Description | Required |
|---|---|---|---|
| kind | enum | Enum: User, Group, ServiceAccount | true |
| name | string | true | |
| namespace | string | Namespace is mandatory for ServiceAccounts and forbidden for Users and Groups. | false |
ChangeWindow.spec.admission[index].audience.include[index]
Subject identifies an authenticated user, group, or namespaced service account.
| Name | Type | Description | Required |
|---|---|---|---|
| kind | enum | Enum: User, Group, ServiceAccount | true |
| name | string | true | |
| namespace | string | Namespace is mandatory for ServiceAccounts and forbidden for Users and Groups. | false |
ChangeWindow.spec.admission[index].matchConditions[index]
MatchCondition is a named CEL boolean expression compiled with the policy.
| Name | Type | Description | Required |
|---|---|---|---|
| expression | string | true | |
| name | string | true |
ChangeWindow.spec.config
| Name | Type | Description | Required |
|---|---|---|---|
| admission | object | false |
ChangeWindow.spec.config.admission
| Name | Type | Description | Required |
|---|---|---|---|
| warnings | []object | false |
ChangeWindow.spec.config.admission.warnings[index]
| Name | Type | Description | Required |
|---|---|---|---|
| message | string | true | |
| name | string | true | |
| operations | []enum | Enum: CREATE, UPDATE, DELETE | true |
| targets | []string | true | |
| when | enum | Enum: BeforeStart, Active, BeforeEnd | true |
| audience | object | Audience selects authenticated request identities. Omitted or empty means everyone. | false |
| matchConditions | []object | MatchConditions 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 | []string | Subresources defaults to the parent resource only. Use "scale" for /scale,
"*" for all subresources, and ["", "*"] for parent and subresource writes. | false |
| within | string | Within is required for BeforeStart/BeforeEnd and must be positive, at most 168h. | false |
ChangeWindow.spec.config.admission.warnings[index].audience
Audience selects authenticated request identities. Omitted or empty means everyone.
| Name | Type | Description | Required |
|---|---|---|---|
| exclude | []object | false | |
| include | []object | false |
ChangeWindow.spec.config.admission.warnings[index].audience.exclude[index]
Subject identifies an authenticated user, group, or namespaced service account.
| Name | Type | Description | Required |
|---|---|---|---|
| kind | enum | Enum: User, Group, ServiceAccount | true |
| name | string | true | |
| namespace | string | Namespace is mandatory for ServiceAccounts and forbidden for Users and Groups. | false |
ChangeWindow.spec.config.admission.warnings[index].audience.include[index]
Subject identifies an authenticated user, group, or namespaced service account.
| Name | Type | Description | Required |
|---|---|---|---|
| kind | enum | Enum: User, Group, ServiceAccount | true |
| name | string | true | |
| namespace | string | Namespace is mandatory for ServiceAccounts and forbidden for Users and Groups. | false |
ChangeWindow.spec.config.admission.warnings[index].matchConditions[index]
MatchCondition is a named CEL boolean expression compiled with the policy.
| Name | Type | Description | Required |
|---|---|---|---|
| expression | string | true | |
| name | string | true |
ChangeWindow.spec.namespaceSelectors[index]
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.
| Name | Type | Description | Required |
|---|---|---|---|
| matchExpressions | []object | matchExpressions is a list of label selector requirements. The requirements are ANDed. | false |
| matchLabels | map[string]string | matchLabels 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]
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
| Name | Type | Description | Required |
|---|---|---|---|
| key | string | key is the label key that the selector applies to. | true |
| operator | string | operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist. | true |
| values | []string | values 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
| Name | Type | Description | Required |
|---|---|---|---|
| active | boolean | Active mirrors the Active condition for compatibility. Conditions distinguish unknown state. | false |
| conditions | []object | Conditions 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 |
| nextTransition | string | NextTransition is the active window's end or the next planned start, including after Finished. Format: date-time | false |
| observedGeneration | integer | Format: int64 | false |
| pendingResources | integer | PendingResources counts journal entries still requiring completion. Format: int32 | false |
| windowEnd | string | WindowEnd is absent when the effective end is beyond the bounded scheduling horizon. Format: date-time | false |
| windowStart | string | Format: date-time | false |
ChangeWindow.status.conditions[index]
Condition contains details for one aspect of the current state of this API Resource.
| Name | Type | Description | Required |
|---|---|---|---|
| lastTransitionTime | string | lastTransitionTime 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 |
| message | string | message is a human readable message indicating details about the transition.
This may be an empty string. | true |
| reason | string | reason 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 |
| status | enum | status of the condition, one of True, False, Unknown. Enum: True, False, Unknown | true |
| type | string | type of condition in CamelCase or in foo.example.com/CamelCase. | true |
| observedGeneration | integer | observedGeneration 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 |