Documentation ¶
Overview ¶
Copyright 2018 the Velero contributors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type AddPVCFromPodAction
- type AddPVFromPVCAction
- type CRDV1PreserveUnknownFieldsAction
- type ChangeStorageClassAction
- type ClusterRoleBindingAction
- type JobAction
- type PVRestorer
- type PodAction
- type Request
- type ResticRestoreAction
- type Restorer
- type Result
- type RoleBindingAction
- type ServiceAccountAction
- type ServiceAction
- type VolumeSnapshotterGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddPVCFromPodAction ¶
type AddPVCFromPodAction struct {
// contains filtered or unexported fields
}
func NewAddPVCFromPodAction ¶
func NewAddPVCFromPodAction(logger logrus.FieldLogger) *AddPVCFromPodAction
func (*AddPVCFromPodAction) AppliesTo ¶
func (a *AddPVCFromPodAction) AppliesTo() (velero.ResourceSelector, error)
func (*AddPVCFromPodAction) Execute ¶
func (a *AddPVCFromPodAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type AddPVFromPVCAction ¶
type AddPVFromPVCAction struct {
// contains filtered or unexported fields
}
func NewAddPVFromPVCAction ¶
func NewAddPVFromPVCAction(logger logrus.FieldLogger) *AddPVFromPVCAction
func (*AddPVFromPVCAction) AppliesTo ¶
func (a *AddPVFromPVCAction) AppliesTo() (velero.ResourceSelector, error)
func (*AddPVFromPVCAction) Execute ¶
func (a *AddPVFromPVCAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type CRDV1PreserveUnknownFieldsAction ¶
type CRDV1PreserveUnknownFieldsAction struct {
// contains filtered or unexported fields
}
CRDV1PreserveUnknownFieldsAction will take a CRD and inspect it for the API version and the PreserveUnknownFields value. If the API Version is 1 and the PreserveUnknownFields value is True, then the x-preserve-unknown-fields value in the OpenAPIV3 schema will be set to True and PreserveUnknownFields set to False in order to allow Kubernetes 1.16+ servers to accept the object.
func NewCRDV1PreserveUnknownFieldsAction ¶
func NewCRDV1PreserveUnknownFieldsAction(logger logrus.FieldLogger) *CRDV1PreserveUnknownFieldsAction
func (*CRDV1PreserveUnknownFieldsAction) AppliesTo ¶
func (c *CRDV1PreserveUnknownFieldsAction) AppliesTo() (velero.ResourceSelector, error)
func (*CRDV1PreserveUnknownFieldsAction) Execute ¶
func (c *CRDV1PreserveUnknownFieldsAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type ChangeStorageClassAction ¶
type ChangeStorageClassAction struct {
// contains filtered or unexported fields
}
ChangeStorageClassAction updates a PV or PVC's storage class name if a mapping is found in the plugin's config map.
func NewChangeStorageClassAction ¶
func NewChangeStorageClassAction( logger logrus.FieldLogger, configMapClient corev1client.ConfigMapInterface, storageClassClient storagev1client.StorageClassInterface, ) *ChangeStorageClassAction
NewChangeStorageClassAction is the constructor for ChangeStorageClassAction.
func (*ChangeStorageClassAction) AppliesTo ¶
func (a *ChangeStorageClassAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo returns the resources that ChangeStorageClassAction should be run for.
func (*ChangeStorageClassAction) Execute ¶
func (a *ChangeStorageClassAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute updates the item's spec.storageClassName if a mapping is found in the config map for the plugin.
type ClusterRoleBindingAction ¶
type ClusterRoleBindingAction struct {
// contains filtered or unexported fields
}
ClusterRoleBindingAction handle namespace remappings for role bindings
func NewClusterRoleBindingAction ¶
func NewClusterRoleBindingAction(logger logrus.FieldLogger) *ClusterRoleBindingAction
func (*ClusterRoleBindingAction) AppliesTo ¶
func (a *ClusterRoleBindingAction) AppliesTo() (velero.ResourceSelector, error)
func (*ClusterRoleBindingAction) Execute ¶
func (a *ClusterRoleBindingAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type JobAction ¶
type JobAction struct {
// contains filtered or unexported fields
}
func NewJobAction ¶
func NewJobAction(logger logrus.FieldLogger) *JobAction
func (*JobAction) Execute ¶
func (a *JobAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type PVRestorer ¶
type PVRestorer interface {
// contains filtered or unexported methods
}
type PodAction ¶
type PodAction struct {
// contains filtered or unexported fields
}
func NewPodAction ¶
func NewPodAction(logger logrus.FieldLogger) *PodAction
func (*PodAction) Execute ¶
func (a *PodAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type Request ¶
type Request struct { *velerov1api.Restore Log logrus.FieldLogger Backup *velerov1api.Backup PodVolumeBackups []*velerov1api.PodVolumeBackup VolumeSnapshots []*volume.Snapshot BackupReader io.Reader }
type ResticRestoreAction ¶
type ResticRestoreAction struct {
// contains filtered or unexported fields
}
func NewResticRestoreAction ¶
func NewResticRestoreAction(logger logrus.FieldLogger, client corev1client.ConfigMapInterface, podVolumeBackupClient velerov1client.PodVolumeBackupInterface) *ResticRestoreAction
func (*ResticRestoreAction) AppliesTo ¶
func (a *ResticRestoreAction) AppliesTo() (velero.ResourceSelector, error)
func (*ResticRestoreAction) Execute ¶
func (a *ResticRestoreAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type Restorer ¶
type Restorer interface { // Restore restores the backup data from backupReader, returning warnings and errors. Restore(req Request, actions []velero.RestoreItemAction, snapshotLocationLister listers.VolumeSnapshotLocationLister, volumeSnapshotterGetter VolumeSnapshotterGetter, ) (Result, Result) }
Restorer knows how to restore a backup.
func NewKubernetesRestorer ¶
func NewKubernetesRestorer( discoveryHelper discovery.Helper, dynamicFactory client.DynamicFactory, resourcePriorities []string, namespaceClient corev1.NamespaceInterface, resticRestorerFactory restic.RestorerFactory, resticTimeout time.Duration, resourceTerminatingTimeout time.Duration, logger logrus.FieldLogger, ) (Restorer, error)
NewKubernetesRestorer creates a new kubernetesRestorer.
type Result ¶
type Result struct { // Velero is a slice of messages related to the operation of Velero // itself (for example, messages related to connecting to the // cloud, reading a backup file, etc.) Velero []string `json:"velero,omitempty"` // Cluster is a slice of messages related to restoring cluster- // scoped resources. Cluster []string `json:"cluster,omitempty"` // Namespaces is a map of namespace name to slice of messages // related to restoring namespace-scoped resources. Namespaces map[string][]string `json:"namespaces,omitempty"` }
Result is a collection of messages that were generated during execution of a restore. This will typically store either warning or error messages.
func (*Result) Add ¶
Add appends an error to the provided Result, either within the cluster-scoped list (if ns == "") or within the provided namespace's entry.
func (*Result) AddVeleroError ¶
AddVeleroError appends an error to the provided Result's Velero list.
type RoleBindingAction ¶
type RoleBindingAction struct {
// contains filtered or unexported fields
}
RoleBindingAction handle namespace remappings for role bindings
func NewRoleBindingAction ¶
func NewRoleBindingAction(logger logrus.FieldLogger) *RoleBindingAction
func (*RoleBindingAction) AppliesTo ¶
func (a *RoleBindingAction) AppliesTo() (velero.ResourceSelector, error)
func (*RoleBindingAction) Execute ¶
func (a *RoleBindingAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type ServiceAccountAction ¶
type ServiceAccountAction struct {
// contains filtered or unexported fields
}
func NewServiceAccountAction ¶
func NewServiceAccountAction(logger logrus.FieldLogger) *ServiceAccountAction
func (*ServiceAccountAction) AppliesTo ¶
func (a *ServiceAccountAction) AppliesTo() (velero.ResourceSelector, error)
func (*ServiceAccountAction) Execute ¶
func (a *ServiceAccountAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type ServiceAction ¶
type ServiceAction struct {
// contains filtered or unexported fields
}
func NewServiceAction ¶
func NewServiceAction(logger logrus.FieldLogger) *ServiceAction
func (*ServiceAction) AppliesTo ¶
func (a *ServiceAction) AppliesTo() (velero.ResourceSelector, error)
func (*ServiceAction) Execute ¶
func (a *ServiceAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type VolumeSnapshotterGetter ¶
type VolumeSnapshotterGetter interface {
GetVolumeSnapshotter(name string) (velero.VolumeSnapshotter, error)
}
Source Files ¶
- add_pv_from_pvc_action.go
- add_pvc_from_pod_action.go
- change_storageclass_action.go
- clusterrolebinding_action.go
- crd_v1_preserve_unknown_fields_action.go
- job_action.go
- merge_service_account.go
- pod_action.go
- pv_restorer.go
- restic_restore_action.go
- restore.go
- result.go
- rolebinding_action.go
- service_account_action.go
- service_action.go