brutil

package
v0.0.0-...-9ade6f3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KlusterletBackup = BackupRestoreObject{
	Scheme: veleroScheme.Scheme,
	GVR:    velerov1.SchemeGroupVersion,
	Object: &velerov1.Backup{
		ObjectMeta: metav1.ObjectMeta{
			Name:      mgmtparams.LCAKlusterletName,
			Namespace: mgmtparams.LCAOADPNamespace,
			Labels: map[string]string{
				"velero.io/storage-location": "default",
			},
		},
		Spec: velerov1.BackupSpec{
			IncludedNamespaces: []string{
				mgmtparams.LCAKlusterletNamespace,
			},
			IncludedClusterScopedResources: []string{
				"klusterlets.operator.open-cluster-management.io",
				"clusterclaims.cluster.open-cluster-management.io",
				"clusterroles.rbac.authorization.k8s.io",
				"clusterrolebindings.rbac.authorization.k8s.io",
			},
			IncludedNamespaceScopedResources: []string{
				"deployments",
				"serviceaccounts",
				"secrets",
			},
		},
	},
}

KlusterletBackup represents ibu klusterlet backup.

View Source
var KlusterletRestore = BackupRestoreObject{
	Scheme: veleroScheme.Scheme,
	GVR:    velerov1.SchemeGroupVersion,
	Object: &velerov1.Restore{
		ObjectMeta: metav1.ObjectMeta{
			Name:      mgmtparams.LCAKlusterletName,
			Namespace: mgmtparams.LCAOADPNamespace,
			Labels: map[string]string{
				"velero.io/storage-location": "default",
			},
		},
		Spec: velerov1.RestoreSpec{
			BackupName: mgmtparams.LCAKlusterletName,
		},
	},
}

KlusterletRestore represents ibu klusterlet restore.

View Source
var WorkloadBackup = BackupRestoreObject{
	Scheme: veleroScheme.Scheme,
	GVR:    velerov1.SchemeGroupVersion,
	Object: &velerov1.Backup{
		ObjectMeta: metav1.ObjectMeta{
			Name:      mgmtparams.LCAWorkloadName,
			Namespace: mgmtparams.LCAOADPNamespace,
			Labels: map[string]string{
				"velero.io/storage-location": "default",
			},
		},
		Spec: velerov1.BackupSpec{
			IncludedNamespaces: []string{
				mgmtparams.LCAWorkloadName,
			},
			IncludedNamespaceScopedResources: []string{
				"deployments",
				"services",
				"routes",
			},
			ExcludedClusterScopedResources: []string{
				"persistentVolumes",
			},
		},
	},
}

WorkloadBackup represents ibu-workload backup.

View Source
var WorkloadRestore = BackupRestoreObject{
	Scheme: veleroScheme.Scheme,
	GVR:    velerov1.SchemeGroupVersion,
	Object: &velerov1.Restore{
		ObjectMeta: metav1.ObjectMeta{
			Name:      mgmtparams.LCAWorkloadName,
			Namespace: mgmtparams.LCAOADPNamespace,
			Labels: map[string]string{
				"velero.io/storage-location": "default",
			},
		},
		Spec: velerov1.RestoreSpec{
			BackupName: mgmtparams.LCAWorkloadName,
		},
	},
}

WorkloadRestore represents ibu-workload restore.

Functions

This section is empty.

Types

type BackupRestoreObject

type BackupRestoreObject struct {
	Scheme *runtime.Scheme
	GVR    schema.GroupVersion
	Object runtime.Object
}

BackupRestoreObject contains information for generating string representations of API resources.

func NewBackRestoreObject

func NewBackRestoreObject(object runtime.Object, scheme *runtime.Scheme, gvr schema.GroupVersion) *BackupRestoreObject

NewBackRestoreObject returns a BackupRestoreObject.

func (*BackupRestoreObject) String

func (b *BackupRestoreObject) String() (string, error)

String returns a string representation of the object passed to BackupRestoreObject.

Jump to

Keyboard shortcuts

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