system-upgrade-controller/doc/plan.md

8.8 KiB

API Reference

Packages

upgrade.cattle.io/v1

ContainerSpec

ContainerSpec is a simplified container template spec, used to configure the prepare and upgrade containers of the Job Pod.

Appears in:

Field Description Default Validation
image string Image name. If the tag is omitted, the value from .status.latestVersion will be used. Required: {}
command string array
args string array
envs EnvVar array
envFrom EnvFromSource array
volumes VolumeSpec array
securityContext SecurityContext

Day

Underlying type: string

Validation:

  • Enum: [0 su sun sunday 1 mo mon monday 2 tu tue tuesday 3 we wed wednesday 4 th thu thursday 5 fr fri friday 6 sa sat saturday]

Appears in:

DrainSpec

DrainSpec encapsulates kubectl drain parameters minus node/pod selectors. See:

Appears in:

Field Description Default Validation
timeout IntOrString If a string, this is passed through directly to the kubectl drain command.
If an int, this represents the duration as a count of nanoseconds, and will be converted to a duration string when passed to the kubectl drain command.
gracePeriod integer
deleteLocalData boolean
deleteEmptydirData boolean
ignoreDaemonSets boolean
force boolean
disableEviction boolean
skipWaitForDeleteTimeout integer
podSelector LabelSelector

Plan

Plan represents a set of Jobs to apply an upgrade (or other operation) to set of Nodes.

Appears in:

Field Description Default Validation
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec PlanSpec
status PlanStatus

PlanSpec

PlanSpec represents the user-configurable details of a Plan.

Appears in:

Field Description Default Validation
concurrency integer The maximum number of concurrent nodes to apply this update on.
jobActiveDeadlineSecs integer Sets ActiveDeadlineSeconds on Jobs generated to apply this Plan.
If the Job does not complete within this time, the Plan will stop processing until it is updated to trigger a redeploy.
If set to 0, Jobs have no deadline. If not set, the controller default value is used.
nodeSelector LabelSelector Select which nodes this plan can be applied to.
serviceAccountName string The service account for the pod to use. As with normal pods, if not specified the default service account from the namespace will be assigned.
channel string A URL that returns HTTP 302 with the last path element of the value returned in the Location header assumed to be an image tag (after munging "+" to "-").
version string Providing a value for version will prevent polling/resolution of the channel if specified.
secrets SecretSpec array Secrets to be mounted into the Job Pod.
tolerations Toleration array Specify which node taints should be tolerated by pods applying the upgrade.
Anything specified here is appended to the default of:
- \{key: node.kubernetes.io/unschedulable, effect: NoSchedule, operator: Exists\}
exclusive boolean Jobs for exclusive plans cannot be run alongside any other exclusive plan.
window TimeWindowSpec A time window in which to execute Jobs for this Plan.
Jobs will not be generated outside this time window, but may continue executing into the window once started.
prepare ContainerSpec The prepare init container, if specified, is run before cordon/drain which is run before the upgrade container.
upgrade ContainerSpec The upgrade container; must be specified.
cordon boolean If Cordon is true, the node is cordoned before the upgrade container is run.
If drain is specified, the value for cordon is ignored, and the node is cordoned.
If neither drain nor cordon are specified and the node is marked as schedulable=false it will not be marked as schedulable=true when the Job completes.
drain DrainSpec Configuration for draining nodes prior to upgrade. If left unspecified, no drain will be performed.
imagePullSecrets LocalObjectReference array Image Pull Secrets, used to pull images for the Job.
postCompleteDelay Duration Time after a Job for one Node is complete before a new Job will be created for the next Node.
priorityClassName string Priority Class Name of Job, if specified.

PlanStatus

PlanStatus represents the resulting state from processing Plan events.

Appears in:

Field Description Default Validation
conditions GenericCondition array LatestResolved indicates that the latest version as per the spec has been determined.
Validated indicates that the plan spec has been validated.
Complete indicates that the latest version of the plan has completed on all selected nodes. If any Jobs for the Plan fail to complete, this condition will remain false, and the reason and message will reflect the source of the error.
latestVersion string The latest version, as resolved from .spec.version, or the channel server.
latestHash string The hash of the most recently applied plan .spec.
applying string array List of Node names that the Plan is currently being applied on.

SecretSpec

SecretSpec describes a Secret to be mounted for prepare/upgrade containers.

Appears in:

Field Description Default Validation
name string Secret name Required: {}
path string Path to mount the Secret volume within the Pod. Required: {}
ignoreUpdates boolean If set to true, the Secret contents will not be hashed, and changes to the Secret will not trigger new application of the Plan.
defaultMode integer Mode to mount the Secret volume with. Optional: {}

TimeWindowSpec

TimeWindowSpec describes a time window in which a Plan should be processed.

Appears in:

Field Description Default Validation
days Day array Days that this time window is valid for Enum: [0 su sun sunday 1 mo mon monday 2 tu tue tuesday 3 we wed wednesday 4 th thu thursday 5 fr fri friday 6 sa sat saturday]
MinItems: 1
startTime string Start of the time window.
endTime string End of the time window.
timeZone string Time zone for the time window; if not specified UTC will be used.

VolumeSpec

HostPath volume to mount into the pod

Appears in:

Field Description Default Validation
name string Name of the Volume as it will appear within the Pod spec. Required: {}
source string Path on the host to mount. Required: {}
destination string Path to mount the Volume at within the Pod. Required: {}