Documentation ¶
Index ¶
- Variables
- func AllCRDs() *unstructured.UnstructuredList
- func AllResources(o *DatamgrOptions, withCRDs bool) (*unstructured.UnstructuredList, error)
- func DaemonSet(namespace string, opts ...podTemplateOption) *appsv1.DaemonSet
- func DaemonSetIsReady(factory client.DynamicFactory, namespace string, nNodes int) (bool, error)
- func Install(factory client.DynamicFactory, resources *unstructured.UnstructuredList, ...) error
- func WithAnnotations(annotations map[string]string) podTemplateOption
- func WithDefaultResticMaintenanceFrequency(val time.Duration) podTemplateOption
- func WithImage(image string) podTemplateOption
- func WithResources(resources corev1.ResourceRequirements) podTemplateOption
- func WithRestoreOnly() podTemplateOption
- func WithSecret(secretPresent bool) podTemplateOption
- type DatamgrOptions
- type ResourceGroup
Constants ¶
This section is empty.
Variables ¶
var ( DefaultImage = imageRegistry() + "/data-manager-for-plugin:" + imageVersion() DefaultImageLocalMode = imageLocalMode() DefaultDatamgrPodCPURequest = "0" DefaultDatamgrPodMemRequest = "0" DefaultDatamgrPodCPULimit = "0" DefaultDatamgrPodMemLimit = "0" )
DefaultImage is the default image to use for the Velero deployment and restic daemonset containers.
var CRDsList = []string{
"backupstoragelocations.velero.io",
"volumesnapshotlocations.velero.io",
}
Functions ¶
func AllCRDs ¶
func AllCRDs() *unstructured.UnstructuredList
func AllResources ¶
func AllResources(o *DatamgrOptions, withCRDs bool) (*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 DaemonSetIsReady ¶
DaemonSetIsReady will poll the kubernetes API server to ensure the restic daemonset is ready, i.e. that pods are scheduled and available on all of the the desired nodes.
func Install ¶
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 WithAnnotations ¶
func WithResources ¶
func WithResources(resources corev1.ResourceRequirements) podTemplateOption
func WithRestoreOnly ¶
func WithRestoreOnly() podTemplateOption
func WithSecret ¶
func WithSecret(secretPresent bool) podTemplateOption
Types ¶
type DatamgrOptions ¶
type ResourceGroup ¶
type ResourceGroup struct { CRDResources []*unstructured.Unstructured OtherResources []*unstructured.Unstructured }
ResourceGroup represents a collection of kubernetes objects with a common ready conditon
func GroupResources ¶
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