diff --git a/kubernetes_json_schema/schema/velero/backup-velero-v1.json b/kubernetes_json_schema/schema/velero/backup-velero-v1.json index 0e10a42..d196f04 100644 --- a/kubernetes_json_schema/schema/velero/backup-velero-v1.json +++ b/kubernetes_json_schema/schema/velero/backup-velero-v1.json @@ -1,13 +1,13 @@ { - "description": "Backup is a Velero resource that respresents the capture of Kubernetes cluster state at a point in time (API objects and associated volume state).", + "description": "Backup is a Velero resource that represents the capture of Kubernetes\ncluster state at a point in time (API objects and associated volume state).", "type": "object", "properties": { "apiVersion": { - "description": "APIVersion 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", + "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. 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", + "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": { @@ -17,8 +17,42 @@ "description": "BackupSpec defines the specification for a Velero backup.", "type": "object", "properties": { + "csiSnapshotTimeout": { + "description": "CSISnapshotTimeout specifies the time used to wait for CSI VolumeSnapshot status turns to\nReadyToUse during creation, before returning error as timeout.\nThe default value is 10 minute.", + "type": "string" + }, + "datamover": { + "description": "DataMover specifies the data mover to be used by the backup.\nIf DataMover is \"\" or \"velero\", the built-in data mover will be used.", + "type": "string" + }, + "defaultVolumesToFsBackup": { + "description": "DefaultVolumesToFsBackup specifies whether pod volume file system backup should be used\nfor all volumes by default.", + "type": "boolean", + "nullable": true + }, + "defaultVolumesToRestic": { + "description": "DefaultVolumesToRestic specifies whether restic should be used to take a\nbackup of all pod volumes by default.\n\n\nDeprecated: this field is no longer used and will be removed entirely in future. Use DefaultVolumesToFsBackup instead.", + "type": "boolean", + "nullable": true + }, + "excludedClusterScopedResources": { + "description": "ExcludedClusterScopedResources is a slice of cluster-scoped\nresource type names to exclude from the backup.\nIf set to \"*\", all cluster-scoped resource types are excluded.\nThe default value is empty.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "excludedNamespaceScopedResources": { + "description": "ExcludedNamespaceScopedResources is a slice of namespace-scoped\nresource type names to exclude from the backup.\nIf set to \"*\", all namespace-scoped resource types are excluded.\nThe default value is empty.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, "excludedNamespaces": { - "description": "ExcludedNamespaces contains a list of namespaces that are not included in the backup.", + "description": "ExcludedNamespaces contains a list of namespaces that are not\nincluded in the backup.", "type": "array", "items": { "type": "string" @@ -26,7 +60,7 @@ "nullable": true }, "excludedResources": { - "description": "ExcludedResources is a slice of resource names that are not included in the backup.", + "description": "ExcludedResources is a slice of resource names that are not\nincluded in the backup.", "type": "array", "items": { "type": "string" @@ -41,7 +75,7 @@ "description": "Resources are hooks that should be executed when backing up individual instances of a resource.", "type": "array", "items": { - "description": "BackupResourceHookSpec defines one or more BackupResourceHooks that should be executed based on the rules defined for namespaces, resources, and label selector.", + "description": "BackupResourceHookSpec defines one or more BackupResourceHooks that should be executed based on\nthe rules defined for namespaces, resources, and label selector.", "type": "object", "required": [ "name" @@ -64,7 +98,7 @@ "nullable": true }, "includedNamespaces": { - "description": "IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies to all namespaces.", + "description": "IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies\nto all namespaces.", "type": "array", "items": { "type": "string" @@ -72,7 +106,7 @@ "nullable": true }, "includedResources": { - "description": "IncludedResources specifies the resources to which this hook spec applies. If empty, it applies to all resources.", + "description": "IncludedResources specifies the resources to which this hook spec applies. If empty, it applies\nto all resources.", "type": "array", "items": { "type": "string" @@ -87,7 +121,7 @@ "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", "type": "array", "items": { - "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.", "type": "object", "required": [ "key", @@ -99,11 +133,11 @@ "type": "string" }, "operator": { - "description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + "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, 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.", + "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.", "type": "array", "items": { "type": "string" @@ -113,21 +147,22 @@ } }, "matchLabels": { - "description": "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.", + "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", "additionalProperties": { "type": "string" } } }, - "nullable": true + "nullable": true, + "x-kubernetes-map-type": "atomic" }, "name": { "description": "Name is the name of this hook.", "type": "string" }, "post": { - "description": "PostHooks is a list of BackupResourceHooks to execute after storing the item in the backup. These are executed after all \"additional items\" from item actions are processed.", + "description": "PostHooks is a list of BackupResourceHooks to execute after storing the item in the backup.\nThese are executed after all \"additional items\" from item actions are processed.", "type": "array", "items": { "description": "BackupResourceHook defines a hook for a resource.", @@ -152,7 +187,7 @@ } }, "container": { - "description": "Container is the container in the pod where the command should be executed. If not specified, the pod's first container is used.", + "description": "Container is the container in the pod where the command should be executed. If not specified,\nthe pod's first container is used.", "type": "string" }, "onError": { @@ -164,7 +199,7 @@ ] }, "timeout": { - "description": "Timeout defines the maximum amount of time Velero should wait for the hook to complete before considering the execution a failure.", + "description": "Timeout defines the maximum amount of time Velero should wait for the hook to complete before\nconsidering the execution a failure.", "type": "string" } } @@ -173,7 +208,7 @@ } }, "pre": { - "description": "PreHooks is a list of BackupResourceHooks to execute prior to storing the item in the backup. These are executed before any \"additional items\" from item actions are processed.", + "description": "PreHooks is a list of BackupResourceHooks to execute prior to storing the item in the backup.\nThese are executed before any \"additional items\" from item actions are processed.", "type": "array", "items": { "description": "BackupResourceHook defines a hook for a resource.", @@ -198,7 +233,7 @@ } }, "container": { - "description": "Container is the container in the pod where the command should be executed. If not specified, the pod's first container is used.", + "description": "Container is the container in the pod where the command should be executed. If not specified,\nthe pod's first container is used.", "type": "string" }, "onError": { @@ -210,7 +245,7 @@ ] }, "timeout": { - "description": "Timeout defines the maximum amount of time Velero should wait for the hook to complete before considering the execution a failure.", + "description": "Timeout defines the maximum amount of time Velero should wait for the hook to complete before\nconsidering the execution a failure.", "type": "string" } } @@ -225,12 +260,28 @@ } }, "includeClusterResources": { - "description": "IncludeClusterResources specifies whether cluster-scoped resources should be included for consideration in the backup.", + "description": "IncludeClusterResources specifies whether cluster-scoped resources\nshould be included for consideration in the backup.", "type": "boolean", "nullable": true }, + "includedClusterScopedResources": { + "description": "IncludedClusterScopedResources is a slice of cluster-scoped\nresource type names to include in the backup.\nIf set to \"*\", all cluster-scoped resource types are included.\nThe default value is empty, which means only related\ncluster-scoped resources are included.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "includedNamespaceScopedResources": { + "description": "IncludedNamespaceScopedResources is a slice of namespace-scoped\nresource type names to include in the backup.\nThe default value is \"*\".", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, "includedNamespaces": { - "description": "IncludedNamespaces is a slice of namespace names to include objects from. If empty, all namespaces are included.", + "description": "IncludedNamespaces is a slice of namespace names to include objects\nfrom. If empty, all namespaces are included.", "type": "array", "items": { "type": "string" @@ -238,22 +289,26 @@ "nullable": true }, "includedResources": { - "description": "IncludedResources is a slice of resource names to include in the backup. If empty, all resources are included.", + "description": "IncludedResources is a slice of resource names to include\nin the backup. If empty, all resources are included.", "type": "array", "items": { "type": "string" }, "nullable": true }, + "itemOperationTimeout": { + "description": "ItemOperationTimeout specifies the time used to wait for asynchronous BackupItemAction operations\nThe default value is 4 hour.", + "type": "string" + }, "labelSelector": { - "description": "LabelSelector is a metav1.LabelSelector to filter with when adding individual objects to the backup. If empty or nil, all objects are included. Optional.", + "description": "LabelSelector is a metav1.LabelSelector to filter with\nwhen adding individual objects to the backup. If empty\nor nil, all objects are included. Optional.", "type": "object", "properties": { "matchExpressions": { "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", "type": "array", "items": { - "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.", "type": "object", "required": [ "key", @@ -265,11 +320,11 @@ "type": "string" }, "operator": { - "description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + "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, 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.", + "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.", "type": "array", "items": { "type": "string" @@ -279,17 +334,113 @@ } }, "matchLabels": { - "description": "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.", + "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", + "additionalProperties": { + "type": "string" + } + } + }, + "nullable": true, + "x-kubernetes-map-type": "atomic" + }, + "metadata": { + "type": "object", + "properties": { + "labels": { "type": "object", "additionalProperties": { "type": "string" } } + } + }, + "orLabelSelectors": { + "description": "OrLabelSelectors is list of metav1.LabelSelector to filter with\nwhen adding individual objects to the backup. If multiple provided\nthey will be joined by the OR operator. LabelSelector as well as\nOrLabelSelectors cannot co-exist in backup request, only one of them\ncan be used.", + "type": "array", + "items": { + "description": "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": "array", + "items": { + "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "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.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "matchLabels": { + "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", + "additionalProperties": { + "type": "string" + } + } + }, + "x-kubernetes-map-type": "atomic" + }, + "nullable": true + }, + "orderedResources": { + "description": "OrderedResources specifies the backup order of resources of specific Kind.\nThe map key is the resource name and value is a list of object names separated by commas.\nEach resource name has format \"namespace/objectname\". For cluster resources, simply use \"objectname\".", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "resourcePolicy": { + "description": "ResourcePolicy specifies the referenced resource policies that backup should follow", + "type": "object", + "required": [ + "kind", + "name" + ], + "properties": { + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced.\nIf APIGroup is not specified, the specified Kind must be in the core API group.\nFor any other third-party types, APIGroup is required.", + "type": "string" + }, + "kind": { + "description": "Kind is the type of resource being referenced", + "type": "string" + }, + "name": { + "description": "Name is the name of resource being referenced", + "type": "string" + } }, + "x-kubernetes-map-type": "atomic" + }, + "snapshotMoveData": { + "description": "SnapshotMoveData specifies whether snapshot data should be moved", + "type": "boolean", "nullable": true }, "snapshotVolumes": { - "description": "SnapshotVolumes specifies whether to take cloud snapshots of any PV's referenced in the set of objects included in the Backup.", + "description": "SnapshotVolumes specifies whether to take snapshots\nof any PV's referenced in the set of objects included\nin the Backup.", "type": "boolean", "nullable": true }, @@ -298,9 +449,20 @@ "type": "string" }, "ttl": { - "description": "TTL is a time.Duration-parseable string describing how long the Backup should be retained for.", + "description": "TTL is a time.Duration-parseable string describing how long\nthe Backup should be retained for.", "type": "string" }, + "uploaderConfig": { + "description": "UploaderConfig specifies the configuration for the uploader.", + "type": "object", + "properties": { + "parallelFilesUpload": { + "description": "ParallelFilesUpload is the number of files parallel uploads to perform when using the uploader.", + "type": "integer" + } + }, + "nullable": true + }, "volumeSnapshotLocations": { "description": "VolumeSnapshotLocations is a list containing names of VolumeSnapshotLocations associated with this backup.", "type": "array", @@ -314,14 +476,34 @@ "description": "BackupStatus captures the current status of a Velero backup.", "type": "object", "properties": { + "backupItemOperationsAttempted": { + "description": "BackupItemOperationsAttempted is the total number of attempted\nasync BackupItemAction operations for this backup.", + "type": "integer" + }, + "backupItemOperationsCompleted": { + "description": "BackupItemOperationsCompleted is the total number of successfully completed\nasync BackupItemAction operations for this backup.", + "type": "integer" + }, + "backupItemOperationsFailed": { + "description": "BackupItemOperationsFailed is the total number of async\nBackupItemAction operations for this backup which ended with an error.", + "type": "integer" + }, "completionTimestamp": { - "description": "CompletionTimestamp records the time a backup was completed. Completion time is recorded even on failed backups. Completion time is recorded before uploading the backup object. The server's time is used for CompletionTimestamps", + "description": "CompletionTimestamp records the time a backup was completed.\nCompletion time is recorded even on failed backups.\nCompletion time is recorded before uploading the backup object.\nThe server's time is used for CompletionTimestamps", "type": "string", "format": "date-time", "nullable": true }, + "csiVolumeSnapshotsAttempted": { + "description": "CSIVolumeSnapshotsAttempted is the total number of attempted\nCSI VolumeSnapshots for this backup.", + "type": "integer" + }, + "csiVolumeSnapshotsCompleted": { + "description": "CSIVolumeSnapshotsCompleted is the total number of successfully\ncompleted CSI VolumeSnapshots for this backup.", + "type": "integer" + }, "errors": { - "description": "Errors is a count of all error messages that were generated during execution of the backup. The actual errors are in the backup's log file in object storage.", + "description": "Errors is a count of all error messages that were generated during\nexecution of the backup. The actual errors are in the backup's log\nfile in object storage.", "type": "integer" }, "expiration": { @@ -330,6 +512,29 @@ "format": "date-time", "nullable": true }, + "failureReason": { + "description": "FailureReason is an error that caused the entire backup to fail.", + "type": "string" + }, + "formatVersion": { + "description": "FormatVersion is the backup format version, including major, minor, and patch version.", + "type": "string" + }, + "hookStatus": { + "description": "HookStatus contains information about the status of the hooks.", + "type": "object", + "properties": { + "hooksAttempted": { + "description": "HooksAttempted is the total number of attempted hooks\nSpecifically, HooksAttempted represents the number of hooks that failed to execute\nand the number of hooks that executed successfully.", + "type": "integer" + }, + "hooksFailed": { + "description": "HooksFailed is the total number of hooks which ended with an error", + "type": "integer" + } + }, + "nullable": true + }, "phase": { "description": "Phase is the current state of the Backup.", "type": "string", @@ -337,20 +542,39 @@ "New", "FailedValidation", "InProgress", + "WaitingForPluginOperations", + "WaitingForPluginOperationsPartiallyFailed", + "Finalizing", + "FinalizingPartiallyFailed", "Completed", "PartiallyFailed", "Failed", "Deleting" ] }, + "progress": { + "description": "Progress contains information about the backup's execution progress. Note\nthat this information is best-effort only -- if Velero fails to update it\nduring a backup for any reason, it may be inaccurate/stale.", + "type": "object", + "properties": { + "itemsBackedUp": { + "description": "ItemsBackedUp is the number of items that have actually been written to the\nbackup tarball so far.", + "type": "integer" + }, + "totalItems": { + "description": "TotalItems is the total number of items to be backed up. This number may change\nthroughout the execution of the backup due to plugins that return additional related\nitems to back up, the velero.io/exclude-from-backup label, and various other\nfilters that happen as items are processed.", + "type": "integer" + } + }, + "nullable": true + }, "startTimestamp": { - "description": "StartTimestamp records the time a backup was started. Separate from CreationTimestamp, since that value changes on restores. The server's time is used for StartTimestamps", + "description": "StartTimestamp records the time a backup was started.\nSeparate from CreationTimestamp, since that value changes\non restores.\nThe server's time is used for StartTimestamps", "type": "string", "format": "date-time", "nullable": true }, "validationErrors": { - "description": "ValidationErrors is a slice of all validation errors (if applicable).", + "description": "ValidationErrors is a slice of all validation errors (if\napplicable).", "type": "array", "items": { "type": "string" @@ -358,22 +582,22 @@ "nullable": true }, "version": { - "description": "Version is the backup format version.", + "description": "Version is the backup format major version.\nDeprecated: Please see FormatVersion", "type": "integer" }, "volumeSnapshotsAttempted": { - "description": "VolumeSnapshotsAttempted is the total number of attempted volume snapshots for this backup.", + "description": "VolumeSnapshotsAttempted is the total number of attempted\nvolume snapshots for this backup.", "type": "integer" }, "volumeSnapshotsCompleted": { - "description": "VolumeSnapshotsCompleted is the total number of successfully completed volume snapshots for this backup.", + "description": "VolumeSnapshotsCompleted is the total number of successfully\ncompleted volume snapshots for this backup.", "type": "integer" }, "warnings": { - "description": "Warnings is a count of all warning messages that were generated during execution of the backup. The actual warnings are in the backup's log file in object storage.", + "description": "Warnings is a count of all warning messages that were generated during\nexecution of the backup. The actual warnings are in the backup's log\nfile in object storage.", "type": "integer" } } } } -} +} \ No newline at end of file diff --git a/kubernetes_json_schema/schema/velero/restore-velero-v1.json b/kubernetes_json_schema/schema/velero/restore-velero-v1.json new file mode 100644 index 0000000..270adb6 --- /dev/null +++ b/kubernetes_json_schema/schema/velero/restore-velero-v1.json @@ -0,0 +1,514 @@ +{ + "description": "Restore is a Velero resource that represents the application of\nresources from a Velero backup to a target Kubernetes cluster.", + "type": "object", + "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": "RestoreSpec defines the specification for a Velero restore.", + "type": "object", + "properties": { + "backupName": { + "description": "BackupName is the unique name of the Velero backup to restore\nfrom.", + "type": "string" + }, + "excludedNamespaces": { + "description": "ExcludedNamespaces contains a list of namespaces that are not\nincluded in the restore.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "excludedResources": { + "description": "ExcludedResources is a slice of resource names that are not\nincluded in the restore.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "existingResourcePolicy": { + "description": "ExistingResourcePolicy specifies the restore behavior for the Kubernetes resource to be restored", + "type": "string", + "nullable": true + }, + "hooks": { + "description": "Hooks represent custom behaviors that should be executed during or post restore.", + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "description": "RestoreResourceHookSpec defines one or more RestoreResrouceHooks that should be executed based on\nthe rules defined for namespaces, resources, and label selector.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "excludedNamespaces": { + "description": "ExcludedNamespaces specifies the namespaces to which this hook spec does not apply.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "excludedResources": { + "description": "ExcludedResources specifies the resources to which this hook spec does not apply.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "includedNamespaces": { + "description": "IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies\nto all namespaces.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "includedResources": { + "description": "IncludedResources specifies the resources to which this hook spec applies. If empty, it applies\nto all resources.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "labelSelector": { + "description": "LabelSelector, if specified, filters the resources to which this hook spec applies.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": "array", + "items": { + "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "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.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "matchLabels": { + "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", + "additionalProperties": { + "type": "string" + } + } + }, + "nullable": true, + "x-kubernetes-map-type": "atomic" + }, + "name": { + "description": "Name is the name of this hook.", + "type": "string" + }, + "postHooks": { + "description": "PostHooks is a list of RestoreResourceHooks to execute during and after restoring a resource.", + "type": "array", + "items": { + "description": "RestoreResourceHook defines a restore hook for a resource.", + "type": "object", + "properties": { + "exec": { + "description": "Exec defines an exec restore hook.", + "type": "object", + "required": [ + "command" + ], + "properties": { + "command": { + "description": "Command is the command and arguments to execute from within a container after a pod has been restored.", + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "container": { + "description": "Container is the container in the pod where the command should be executed. If not specified,\nthe pod's first container is used.", + "type": "string" + }, + "execTimeout": { + "description": "ExecTimeout defines the maximum amount of time Velero should wait for the hook to complete before\nconsidering the execution a failure.", + "type": "string" + }, + "onError": { + "description": "OnError specifies how Velero should behave if it encounters an error executing this hook.", + "type": "string", + "enum": [ + "Continue", + "Fail" + ] + }, + "waitForReady": { + "description": "WaitForReady ensures command will be launched when container is Ready instead of Running.", + "type": "boolean", + "nullable": true + }, + "waitTimeout": { + "description": "WaitTimeout defines the maximum amount of time Velero should wait for the container to be Ready\nbefore attempting to run the command.", + "type": "string" + } + } + }, + "init": { + "description": "Init defines an init restore hook.", + "type": "object", + "properties": { + "initContainers": { + "description": "InitContainers is list of init containers to be added to a pod during its restore.", + "type": "array", + "items": { + "type": "object", + "x-kubernetes-preserve-unknown-fields": true + }, + "x-kubernetes-preserve-unknown-fields": true + }, + "timeout": { + "description": "Timeout defines the maximum amount of time Velero should wait for the initContainers to complete.", + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "includeClusterResources": { + "description": "IncludeClusterResources specifies whether cluster-scoped resources\nshould be included for consideration in the restore. If null, defaults\nto true.", + "type": "boolean", + "nullable": true + }, + "includedNamespaces": { + "description": "IncludedNamespaces is a slice of namespace names to include objects\nfrom. If empty, all namespaces are included.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "includedResources": { + "description": "IncludedResources is a slice of resource names to include\nin the restore. If empty, all resources in the backup are included.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "itemOperationTimeout": { + "description": "ItemOperationTimeout specifies the time used to wait for RestoreItemAction operations\nThe default value is 4 hour.", + "type": "string" + }, + "labelSelector": { + "description": "LabelSelector is a metav1.LabelSelector to filter with\nwhen restoring individual objects from the backup. If empty\nor nil, all objects are included. Optional.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": "array", + "items": { + "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "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.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "matchLabels": { + "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", + "additionalProperties": { + "type": "string" + } + } + }, + "nullable": true, + "x-kubernetes-map-type": "atomic" + }, + "namespaceMapping": { + "description": "NamespaceMapping is a map of source namespace names\nto target namespace names to restore into. Any source\nnamespaces not included in the map will be restored into\nnamespaces of the same name.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "orLabelSelectors": { + "description": "OrLabelSelectors is list of metav1.LabelSelector to filter with\nwhen restoring individual objects from the backup. If multiple provided\nthey will be joined by the OR operator. LabelSelector as well as\nOrLabelSelectors cannot co-exist in restore request, only one of them\ncan be used", + "type": "array", + "items": { + "description": "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": "array", + "items": { + "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "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.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "matchLabels": { + "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", + "additionalProperties": { + "type": "string" + } + } + }, + "x-kubernetes-map-type": "atomic" + }, + "nullable": true + }, + "preserveNodePorts": { + "description": "PreserveNodePorts specifies whether to restore old nodePorts from backup.", + "type": "boolean", + "nullable": true + }, + "resourceModifier": { + "description": "ResourceModifier specifies the reference to JSON resource patches that should be applied to resources before restoration.", + "type": "object", + "required": [ + "kind", + "name" + ], + "properties": { + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced.\nIf APIGroup is not specified, the specified Kind must be in the core API group.\nFor any other third-party types, APIGroup is required.", + "type": "string" + }, + "kind": { + "description": "Kind is the type of resource being referenced", + "type": "string" + }, + "name": { + "description": "Name is the name of resource being referenced", + "type": "string" + } + }, + "nullable": true, + "x-kubernetes-map-type": "atomic" + }, + "restorePVs": { + "description": "RestorePVs specifies whether to restore all included\nPVs from snapshot", + "type": "boolean", + "nullable": true + }, + "restoreStatus": { + "description": "RestoreStatus specifies which resources we should restore the status\nfield. If nil, no objects are included. Optional.", + "type": "object", + "properties": { + "excludedResources": { + "description": "ExcludedResources specifies the resources to which will not restore the status.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "includedResources": { + "description": "IncludedResources specifies the resources to which will restore the status.\nIf empty, it applies to all resources.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + }, + "scheduleName": { + "description": "ScheduleName is the unique name of the Velero schedule to restore\nfrom. If specified, and BackupName is empty, Velero will restore\nfrom the most recent successful backup created from this schedule.", + "type": "string" + }, + "uploaderConfig": { + "description": "UploaderConfig specifies the configuration for the restore.", + "type": "object", + "properties": { + "parallelFilesDownload": { + "description": "ParallelFilesDownload is the concurrency number setting for restore.", + "type": "integer" + }, + "writeSparseFiles": { + "description": "WriteSparseFiles is a flag to indicate whether write files sparsely or not.", + "type": "boolean", + "nullable": true + } + }, + "nullable": true + } + } + }, + "status": { + "description": "RestoreStatus captures the current status of a Velero restore", + "type": "object", + "properties": { + "completionTimestamp": { + "description": "CompletionTimestamp records the time the restore operation was completed.\nCompletion time is recorded even on failed restore.\nThe server's time is used for StartTimestamps", + "type": "string", + "format": "date-time", + "nullable": true + }, + "errors": { + "description": "Errors is a count of all error messages that were generated during\nexecution of the restore. The actual errors are stored in object storage.", + "type": "integer" + }, + "failureReason": { + "description": "FailureReason is an error that caused the entire restore to fail.", + "type": "string" + }, + "hookStatus": { + "description": "HookStatus contains information about the status of the hooks.", + "type": "object", + "properties": { + "hooksAttempted": { + "description": "HooksAttempted is the total number of attempted hooks\nSpecifically, HooksAttempted represents the number of hooks that failed to execute\nand the number of hooks that executed successfully.", + "type": "integer" + }, + "hooksFailed": { + "description": "HooksFailed is the total number of hooks which ended with an error", + "type": "integer" + } + }, + "nullable": true + }, + "phase": { + "description": "Phase is the current state of the Restore", + "type": "string", + "enum": [ + "New", + "FailedValidation", + "InProgress", + "WaitingForPluginOperations", + "WaitingForPluginOperationsPartiallyFailed", + "Completed", + "PartiallyFailed", + "Failed", + "Finalizing", + "FinalizingPartiallyFailed" + ] + }, + "progress": { + "description": "Progress contains information about the restore's execution progress. Note\nthat this information is best-effort only -- if Velero fails to update it\nduring a restore for any reason, it may be inaccurate/stale.", + "type": "object", + "properties": { + "itemsRestored": { + "description": "ItemsRestored is the number of items that have actually been restored so far", + "type": "integer" + }, + "totalItems": { + "description": "TotalItems is the total number of items to be restored. This number may change\nthroughout the execution of the restore due to plugins that return additional related\nitems to restore", + "type": "integer" + } + }, + "nullable": true + }, + "restoreItemOperationsAttempted": { + "description": "RestoreItemOperationsAttempted is the total number of attempted\nasync RestoreItemAction operations for this restore.", + "type": "integer" + }, + "restoreItemOperationsCompleted": { + "description": "RestoreItemOperationsCompleted is the total number of successfully completed\nasync RestoreItemAction operations for this restore.", + "type": "integer" + }, + "restoreItemOperationsFailed": { + "description": "RestoreItemOperationsFailed is the total number of async\nRestoreItemAction operations for this restore which ended with an error.", + "type": "integer" + }, + "startTimestamp": { + "description": "StartTimestamp records the time the restore operation was started.\nThe server's time is used for StartTimestamps", + "type": "string", + "format": "date-time", + "nullable": true + }, + "validationErrors": { + "description": "ValidationErrors is a slice of all validation errors (if\napplicable)", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "warnings": { + "description": "Warnings is a count of all warning messages that were generated during\nexecution of the restore. The actual warnings are stored in object storage.", + "type": "integer" + } + } + } + } +} \ No newline at end of file