resourcepolicies

package
v1.14.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Copyright 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.

Copyright 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.

Copyright 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

Constants

View Source
const (
	// currently only support configmap type of resource config
	ConfigmapRefType string = "configmap"
	// skip action implies the volume would be skipped from the backup operation
	Skip VolumeActionType = "skip"
	// fs-backup action implies that the volume would be backed up via file system copy method using the uploader(kopia/restic) configured by the user
	FSBackup VolumeActionType = "fs-backup"
	// snapshot action can have 3 different meaning based on velero configuration and backup spec - cloud provider based snapshots, local csi snapshots and datamover snapshots
	Snapshot VolumeActionType = "snapshot"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	// Type defined specific type of action, currently only support 'skip'
	Type VolumeActionType `yaml:"type"`
	// Parameters defined map of parameters when executing a specific action
	Parameters map[string]interface{} `yaml:"parameters,omitempty"`
}

Action defined as one action for a specific way of backup

type Policies

type Policies struct {
	// contains filtered or unexported fields
}

func GetResourcePoliciesFromConfig

func GetResourcePoliciesFromConfig(cm *v1.ConfigMap) (*Policies, error)

func (*Policies) BuildPolicy added in v1.14.0

func (p *Policies) BuildPolicy(resPolicies *ResourcePolicies) error

func (*Policies) GetMatchAction

func (p *Policies) GetMatchAction(res interface{}) (*Action, error)

func (*Policies) Validate

func (p *Policies) Validate() error

type ResourcePolicies added in v1.14.0

type ResourcePolicies struct {
	Version        string         `yaml:"version"`
	VolumePolicies []VolumePolicy `yaml:"volumePolicies"`
}

resourcePolicies currently defined slice of volume policies to handle backup

type SupportedVolume added in v1.13.0

type SupportedVolume string
const (
	AWSAzureDisk         SupportedVolume = "awsAzureDisk"
	AWSElasticBlockStore SupportedVolume = "awsElasticBlockStore"
	AzureDisk            SupportedVolume = "azureDisk"
	AzureFile            SupportedVolume = "azureFile"
	Cinder               SupportedVolume = "cinder"
	CephFS               SupportedVolume = "cephfs"
	ConfigMap            SupportedVolume = "configMap"
	CSI                  SupportedVolume = "csi"
	DownwardAPI          SupportedVolume = "downwardAPI"
	EmptyDir             SupportedVolume = "emptyDir"
	Ephemeral            SupportedVolume = "ephemeral"
	FC                   SupportedVolume = "fc"
	Flocker              SupportedVolume = "flocker"
	FlexVolume           SupportedVolume = "flexVolume"
	GitRepo              SupportedVolume = "gitRepo"
	Glusterfs            SupportedVolume = "glusterfs"
	GCEPersistentDisk    SupportedVolume = "gcePersistentDisk"
	HostPath             SupportedVolume = "hostPath"
	ISCSI                SupportedVolume = "iscsi"
	Local                SupportedVolume = "local"
	NFS                  SupportedVolume = "nfs"
	PhotonPersistentDisk SupportedVolume = "photonPersistentDisk"
	PortworxVolume       SupportedVolume = "portworxVolume"
	Projected            SupportedVolume = "projected"
	Quobyte              SupportedVolume = "quobyte"
	RBD                  SupportedVolume = "rbd"
	ScaleIO              SupportedVolume = "scaleIO"
	Secret               SupportedVolume = "secret"
	StorageOS            SupportedVolume = "storageOS"
	VsphereVolume        SupportedVolume = "vsphereVolume"
)

type VolumeActionType

type VolumeActionType string

type VolumePolicy added in v1.14.0

type VolumePolicy struct {
	// Conditions defined list of conditions to match Volumes
	Conditions map[string]interface{} `yaml:"conditions"`
	Action     Action                 `yaml:"action"`
}

volumePolicy defined policy to conditions to match Volumes and related action to handle matched Volumes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL