Skip to main content
Version: 3.6

SchedulePolicy CRD reference

SchedulePolicy represents a policy for executing actions on a schedule.

SchedulePolicy

FieldDescriptionType
apiVersionAPIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
string
kindKind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
string
policyPolicyobject

policy fields

FieldDescriptionType
policy.dailyDaily policy that will be triggered daily at a specified timeobject
policy.daily.forceFullSnapshotDayForceFullSnapshotDay specifies day of the week for full snapshot to take placestring
policy.daily.optionsOptions to be passed in to the driver. These will be passed in
to the object being triggered
object
policy.daily.retainRetain Number of objects to retain for daily policy. Defaults to
@DefaultDailyPolicyRetain
integer
policy.daily.timeTime when the policy should be triggered. Expected format is
time.Kitchen eg 12:04PM or 12:04pm
string
policy.intervalInterval policy that will be triggered at the specified intervalobject
policy.interval.optionsOptions to be passed in to the driver. These will be passed in
to the object being triggered
object
policy.interval.retainRetain Number of objects to retain for interval policy. Defaults to
@DefaultIntervalPolicyRetain
integer
policy.monthlyMonthly policy that will be triggered on the specified date of the month
at the specified time
object
policy.monthly.dateDate of the month when the policy should be triggered. If a given date
doesn't exist in a month, it will be skipped. For example, if 30 is specified,
it'll be skipped in February.
This field is used when SelectiveMonthlyPolicy and RelativeMonthlyPolicy are not set (legacy behavior)
integer
policy.monthly.optionsOptions to be passed in to the driver. These will be passed in
to the object being triggered
object
policy.monthly.relativeMonthlyPolicyRelativeMonthlyPolicy allows triggering on specific weekday of specific week
For example: "First Monday", "Last Friday", "Third Wednesday"
If SelectiveMonthlyPolicy is not set and this is set, this takes precedence over legacy Date/Time/Retain fields
object
policy.monthly.relativeMonthlyPolicy.dayDay of the week when the policy should be triggered. Only one day can be specified.
Valid values are: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
(case-insensitive, abbreviated forms like Sun, Mon also work)
string
policy.monthly.relativeMonthlyPolicy.optionsOptions to be passed in to the driver. These will be passed in
to the object being triggered
object
policy.monthly.relativeMonthlyPolicy.retainRetain Number of objects to retain for relative monthly policy. Defaults to
@DefaultMonthlyPolicyRetain
integer
policy.monthly.relativeMonthlyPolicy.timeTime when the policy should be triggered. Expected format is
time.Kitchen eg 12:04PM or 12:04pm
string
policy.monthly.relativeMonthlyPolicy.weeklyIndexWeeklyIndex specifies which occurrence of the day in the month
1 = First, 2 = Second, 3 = Third, 4 = Fourth, 5 = Last
integer
policy.monthly.retainRetain Number of objects to retain for monthly policy. Defaults to
@DefaultMonthlyPolicyRetain
This field is used when SelectiveMonthlyPolicy and RelativeMonthlyPolicy are not set (legacy behavior)
integer
policy.monthly.selectiveMonthlyPolicySelectiveMonthlyPolicy allows triggering on specific months only
If set, this takes precedence over RelativeMonthlyPolicy and legacy Date/Time/Retain fields
object
policy.monthly.selectiveMonthlyPolicy.dateDate of the month when the policy should be triggered. If a given date
doesn't exist in a month, it will be skipped. For example, if 30 is specified,
it'll be skipped in February.
integer
policy.monthly.selectiveMonthlyPolicy.monthsMonths specify the list of months on which schedule needs to be taken.
If it is empty, the schedule will be taken on every month of the year.
Valid values are: January, February, March, April, May, June, July,
August, September, October, November, December (case-insensitive)
Example: "January,March,June,December" or "jan,mar,jun,dec"
string
policy.monthly.selectiveMonthlyPolicy.optionsOptions to be passed in to the driver. These will be passed in
to the object being triggered
object
policy.monthly.selectiveMonthlyPolicy.retainRetain Number of objects to retain for selective monthly policy. Defaults to
default value 12
integer
policy.monthly.selectiveMonthlyPolicy.timeTime when the policy should be triggered. Expected format is
time.Kitchen eg 12:04PM or 12:04pm
string
policy.monthly.timeTime when the policy should be triggered. Expected format is
time.Kitchen eg 12:04PM or 12:04pm
This field is used when SelectiveMonthlyPolicy and RelativeMonthlyPolicy are not set (legacy behavior)
string
policy.weeklyWeekly policy that will be triggered on the specified day of the week at
the specified time
object
policy.weekly.biweeklyBiweekly indicates if the policy should trigger once every two weeks
instead of every week. When true, the policy triggers on the specified
days in active weeks and skips all days in inactive weeks.
boolean
policy.weekly.dayDay of the week when the policy should be triggered. Valid format are
specified in `Days` above
string
policy.weekly.optionsOptions to be passed in to the driver. These will be passed in
to the object being triggered
object
policy.weekly.retainRetain Number of objects to retain for weekly policy. Defaults to
@DefaultWeeklyPolicyRetain
integer
policy.weekly.timeTime when the policy should be triggered. Expected format is
time.Kitchen eg 12:04PM or 12:04pm
string

SchedulePolicy examples

Interval SchedulePolicy

An interval SchedulePolicy includes the following fields and values:

  • apiVersion: the version of the Stork scheduler (this example uses stork.libopenstorage.org/v1alpha1)

  • kind: as SchedulePolicy

  • metadata.name: the name of the SchedulePolicy object (this example uses testpolicy)

  • policy.interval.intervalMinutes: the interval, in minutes, after which Portworx triggers the operation (this example triggers the operation every minute)

    apiVersion: stork.libopenstorage.org/v1alpha1
    kind: SchedulePolicy
    metadata:
    name: testpolicy
    policy:
    interval:
    intervalMinutes: 1

Daily SchedulePolicy

A daily SchedulePolicy includes the following fields and values:

  • apiVersion: the version of the Stork scheduler (this example uses stork.libopenstorage.org/v1alpha1)

  • kind: as SchedulePolicy

  • metadata.name: the name of the SchedulePolicy object (this example uses testpolicy)

  • policy.daily.time: the time of the day when Portworx will trigger the operation (this example triggers the operation every day at 10:14 PM)

    apiVersion: stork.libopenstorage.org/v1alpha1
    kind: SchedulePolicy
    metadata:
    name: testpolicy
    policy:
    daily:
    time: "10:14PM"

Weekly SchedulePolicy

A weekly SchedulePolicy includes the following fields and values:

  • apiVersion: the version of the Stork scheduler (this example uses stork.libopenstorage.org/v1alpha1)

  • kind: as SchedulePolicy

  • metadata.name: the name of the SchedulePolicy object (this example uses testpolicy)

  • policy.weekly.day: the day of the week when Portworx will trigger the operation (this example triggers the operation every Thursday)

  • policy.weekly.time: the time of the day when Portworx will trigger the operation (this example triggers the operation at 10:13 PM)

    apiVersion: stork.libopenstorage.org/v1alpha1
    kind: SchedulePolicy
    metadata:
    name: testpolicy
    policy:
    weekly:
    day: "Thursday"
    time: "10:13PM"

Monthly SchedulePolicy

A monthly SchedulePolicy includes the following fields and values:

  • apiVersion: the version of the Stork scheduler (this example uses stork.libopenstorage.org/v1alpha1)

  • kind: as SchedulePolicy

  • metadata.name: the name of the SchedulePolicy object (this example uses testpolicy)

  • policy.monthly.day: the day of the month when Portworx will trigger the operation (this example triggers the operation on the 14th of every month)

  • policy.monthly.time: the time of the day when Portworx will trigger the operation (this example triggers the operation at 8:05 PM)

    apiVersion: stork.libopenstorage.org/v1alpha1
    kind: SchedulePolicy
    metadata:
    name: testpolicy
    policy:
    monthly:
    date: 14
    time: "8:05PM"
In this topic: