From 5dbc0f11600f5fed9a1adbbe10bcb918ef89aa84 Mon Sep 17 00:00:00 2001 From: AvivGuiser Date: Thu, 5 Sep 2024 20:05:08 +0300 Subject: [PATCH] add snapschedule crd (#379) --- .../snapshotschedule_v1.json | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 snapscheduler.backube/snapshotschedule_v1.json diff --git a/snapscheduler.backube/snapshotschedule_v1.json b/snapscheduler.backube/snapshotschedule_v1.json new file mode 100644 index 0000000..426fa6b --- /dev/null +++ b/snapscheduler.backube/snapshotschedule_v1.json @@ -0,0 +1,167 @@ +{ + "description": "SnapshotSchedule defines a schedule for taking automated snapshots of PVC(s)", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "type": "object" + }, + "spec": { + "description": "SnapshotScheduleSpec defines the desired state of SnapshotSchedule", + "properties": { + "claimSelector": { + "description": "A filter to select which PVCs to snapshot via this schedule", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + "items": { + "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.", + "properties": { + "key": { + "description": "key is the label key that the selector applies to.", + "type": "string" + }, + "operator": { + "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.", + "type": "string" + }, + "values": { + "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "key", + "operator" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "matchLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + "type": "object" + } + }, + "type": "object", + "x-kubernetes-map-type": "atomic", + "additionalProperties": false + }, + "disabled": { + "description": "Indicates that this schedule should be temporarily disabled", + "type": "boolean" + }, + "retention": { + "description": "Retention determines how long this schedule's snapshots will be kept.", + "properties": { + "expires": { + "description": "The length of time (time.Duration) after which a given Snapshot will be\ndeleted.", + "pattern": "^\\d+(h|m|s)$", + "type": "string" + }, + "maxCount": { + "description": "The maximum number of snapshots to retain per PVC", + "format": "int32", + "minimum": 1, + "type": "integer" + } + }, + "type": "object", + "additionalProperties": false + }, + "schedule": { + "description": "Schedule is a Cronspec specifying when snapshots should be taken. See\nhttps://en.wikipedia.org/wiki/Cron for a description of the format.", + "pattern": "^(@(annually|yearly|monthly|weekly|daily|hourly))|((((\\d+,)*\\d+|(\\d+(\\/|-)\\d+)|\\*(\\/\\d+)?)\\s?){5})$", + "type": "string" + }, + "snapshotTemplate": { + "description": "A template to customize the Snapshots.", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "A list of labels that should be added to each Snapshot created by this\nschedule.", + "type": "object" + }, + "snapshotClassName": { + "description": "The name of the VolumeSnapshotClass to be used when creating Snapshots.", + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + }, + "status": { + "description": "SnapshotScheduleStatus defines the observed state of SnapshotSchedule", + "properties": { + "conditions": { + "description": "Conditions is a list of conditions related to operator reconciliation.", + "items": { + "description": "Condition represents the state of the operator's\nreconciliation functionality.", + "properties": { + "lastHeartbeatTime": { + "format": "date-time", + "type": "string" + }, + "lastTransitionTime": { + "format": "date-time", + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "description": "ConditionType is the state of the operator's reconciliation functionality.", + "type": "string" + } + }, + "required": [ + "status", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "lastSnapshotTime": { + "description": "The time of the most recent snapshot taken by this schedule", + "format": "date-time", + "type": "string" + }, + "nextSnapshotTime": { + "description": "The time of the next scheduled snapshot", + "format": "date-time", + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object" +}