Documentation ¶
Overview ¶
Package install provides public functions for easily creating and installing resources necessary for Velero to operate. Some default settings are assumed with these functions.
Index ¶
- Variables
- func AllResources(o *VeleroOptions) (*unstructured.UnstructuredList, error)
- func BackupStorageLocation(namespace, provider, bucket, prefix string, config map[string]string) *v1.BackupStorageLocation
- func CRDs() []*apiextv1beta1.CustomResourceDefinition
- func ClusterRoleBinding(namespace string) *rbacv1beta1.ClusterRoleBinding
- func DaemonSet(namespace string, opts ...podTemplateOption) *appsv1.DaemonSet
- func Deployment(namespace string, opts ...podTemplateOption) *appsv1beta1.Deployment
- func DeploymentIsReady(factory client.DynamicFactory, namespace string) (bool, error)
- func Install(factory client.DynamicFactory, resources *unstructured.UnstructuredList, ...) error
- func Namespace(namespace string) *corev1.Namespace
- func Secret(namespace string, data []byte) *corev1.Secret
- func ServiceAccount(namespace string) *corev1.ServiceAccount
- func VolumeSnapshotLocation(namespace, provider string, config map[string]string) *v1.VolumeSnapshotLocation
- func WithEnvFromSecretKey(varName, secret, key string) podTemplateOption
- func WithImage(image string) podTemplateOption
- func WithRestoreOnly() podTemplateOption
- func WithoutCredentialsVolume() podTemplateOption
- type ResourceGroup
- type VeleroOptions
Constants ¶
This section is empty.
Variables ¶
var DefaultImage = "gcr.io/heptio-images/velero:" + buildinfo.Version
DefaultImage is the default image to use for the Velero deployment and restic daemonset containers.
Functions ¶
func AllResources ¶ added in v1.0.0
func AllResources(o *VeleroOptions) (*unstructured.UnstructuredList, error)
AllResources returns a list of all resources necessary to install Velero, in the appropriate order, into a Kubernetes cluster. Items are unstructured, since there are different data types returned.
func BackupStorageLocation ¶ added in v1.0.0
func BackupStorageLocation(namespace, provider, bucket, prefix string, config map[string]string) *v1.BackupStorageLocation
func CRDs ¶
func CRDs() []*apiextv1beta1.CustomResourceDefinition
CRDs returns a list of the CRD types for all of the required Velero CRDs
func ClusterRoleBinding ¶
func ClusterRoleBinding(namespace string) *rbacv1beta1.ClusterRoleBinding
func Deployment ¶
func Deployment(namespace string, opts ...podTemplateOption) *appsv1beta1.Deployment
func DeploymentIsReady ¶ added in v1.0.0
func DeploymentIsReady(factory client.DynamicFactory, namespace string) (bool, error)
DeploymentIsReady will poll the kubernetes API server to see if the velero deployment is ready to service user requests.
func Install ¶ added in v1.0.0
func Install(factory client.DynamicFactory, resources *unstructured.UnstructuredList, w io.Writer) error
Install creates resources on the Kubernetes cluster. An unstructured list of resources is sent, one at a time, to the server. These are assumed to be in the preferred order already. Resources will be sorted into CustomResourceDefinitions and any other resource type, and the function will wait up to 1 minute for CRDs to be ready before proceeding. An io.Writer can be used to output to a log or the console.
func ServiceAccount ¶
func ServiceAccount(namespace string) *corev1.ServiceAccount
func VolumeSnapshotLocation ¶ added in v1.0.0
func VolumeSnapshotLocation(namespace, provider string, config map[string]string) *v1.VolumeSnapshotLocation
func WithEnvFromSecretKey ¶
func WithEnvFromSecretKey(varName, secret, key string) podTemplateOption
func WithRestoreOnly ¶
func WithRestoreOnly() podTemplateOption
func WithoutCredentialsVolume ¶
func WithoutCredentialsVolume() podTemplateOption
Types ¶
type ResourceGroup ¶ added in v1.0.0
type ResourceGroup struct { CRDResources []*unstructured.Unstructured OtherResources []*unstructured.Unstructured }
ResourceGroup represents a collection of kubernetes objects with a common ready conditon
func GroupResources ¶ added in v1.0.0
func GroupResources(resources *unstructured.UnstructuredList) *ResourceGroup
GroupResources groups resources based on whether the resources are CustomResourceDefinitions or other types of kubernetes objects This is useful to wait for readiness before creating CRD objects