restic

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvAWSAccessKeyID for anthentication.
	EnvAWSAccessKeyID = "AWS_ACCESS_KEY_ID"
	// EnvAWSSecretAccessKey for anthentication.
	EnvAWSSecretAccessKey = "AWS_SECRET_ACCESS_KEY"
	// EnvResticRepository for Restic configuration.
	EnvResticRepository = "RESTIC_REPOSITORY"
	// EnvResticPasswordFile for Restic configuration.
	EnvResticPasswordFile = "RESTIC_PASSWORD_FILE"

	// ResticPassword identifier for loading the restic password.
	ResticPassword = "password"

	// SecretDir defines the directory where secrets are mounted.
	SecretDir = "/etc/restic"
)
View Source
const (
	// EnvMySQLHostname for MySQL connection.
	EnvMySQLHostname = "MYSQL_HOSTNAME"
	// EnvMySQLDatabase for MySQL connection.
	EnvMySQLDatabase = "MYSQL_DATABASE"
	// EnvMySQLPort for MySQL connection.
	EnvMySQLPort = "MYSQL_PORT"
	// EnvMySQLUsername for MySQL connection.
	EnvMySQLUsername = "MYSQL_USERNAME"
	// EnvMySQLPassword for MySQL connection.
	EnvMySQLPassword = "MYSQL_PASSWORD"

	// VolumeMySQL identifier for mysql storage.
	VolumeMySQL = "restic-mysql"
	// VolumePublic identifier for public storage.
	VolumePublic = "restic-public"
	// VolumePrivate identifier for private storage.
	VolumePrivate = "restic-private"
)
View Source
const Prefix = "backup-restic"

Prefix for discoverying Restic resources.

View Source
const VolumeSecrets = "restic-secrets"

VolumeSecrets identifier used for Restic secret.

Variables

This section is empty.

Functions

func AttachVolume

func AttachVolume(volumes []corev1.Volume, backup *extensionsv1beta1.Backup) []corev1.Volume

AttachVolume will add the Restic secrets volume to a Pod.

func PodSpec

func PodSpec(backup *extensionsv1beta1.Backup, params PodSpecParams) (corev1.PodSpec, error)

PodSpec defines how a backup can be executed using a Pod.

func WrapContainer

func WrapContainer(container corev1.Container, key, secret, bucket string, backup *extensionsv1beta1.Backup) corev1.Container

WrapContainer with the information required to interact with Restic.

Types

type PodSpecParams

type PodSpecParams struct {
	Bucket      string
	KeyID       string
	AccessKey   string
	CPU         string
	Memory      string
	ResticImage string
	MySQLImage  string
	WorkingDir  string
	Tags        []string
}

PodSpecParams which are passed into the PodSpec function.

Jump to

Keyboard shortcuts

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