Skip to content

Commit

Permalink
Merge pull request #8 from cpanato/add_initial_chart
Browse files Browse the repository at this point in the history
Add initial chart
  • Loading branch information
nrb authored Dec 18, 2019
2 parents f2750be + e32ce47 commit 4bd96bc
Show file tree
Hide file tree
Showing 32 changed files with 1,136 additions and 0 deletions.
21 changes: 21 additions & 0 deletions charts/velero/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
21 changes: 21 additions & 0 deletions charts/velero/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
appVersion: 1.2.0
description: A Helm chart for velero
name: velero
version: 2.7.3
home: https://github.com/vmware-tanzu/velero
icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png
sources:
- https://github.com/vmware-tanzu/velero
maintainers:
- name: domcar
email: [email protected]
- name: hectorj2f
email: [email protected]
- name: nrb
email: [email protected]
- name: carlisia
email: [email protected]
- name: ashish-amarnath
email: [email protected]
tillerVersion: ">=2.10.0"
10 changes: 10 additions & 0 deletions charts/velero/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
approvers:
- hectorj2f
- nrb
- carlisia
- ashish-amarnath
reviewers:
- hectorj2f
- nrb
- carlisia
- ashish-amarnath
92 changes: 92 additions & 0 deletions charts/velero/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Velero

Velero is an open source tool to safely backup and restore, perform disaster recovery, and migrate Kubernetes cluster resources and persistent volumes.

Velero has two main components: a CLI, and a server-side Kubernetes deployment.

## Installing the Velero CLI

See the different options for installing the [Velero CLI](https://velero.io/docs/v1.2.0/install-overview/#install-the-cli).

## Installing the Velero server

This helm chart installs Velero version v1.2.0 https://github.com/vmware-tanzu/velero/tree/v1.2.0. See the [#Upgrading](#upgrading) section for information on how to upgrade from other versions.

### Prerequisites

#### Tiller cluster-admin permissions

A service account and the role binding prerequisite must be added to Tiller when configuring Helm to install Velero:

```
kubectl create sa -n kube-system tiller
kubectl create clusterrolebinding tiller-cluster-admin --clusterrole cluster-admin --serviceaccount kube-system:tiller
helm init --service-account=tiller --wait --upgrade
```

#### Provider credentials

When installing using the Helm chart, the provider's credential information will need to be appended into your values. The easiest way to do this is with the `--set-file` argument, available in Helm 2.10 and higher. See your cloud provider's documentation for the contents and creation of the `credentials-velero` file.

### Installing

The default configuration values for this chart are listed in values.yaml.

See Velero's full [official documentation](https://velero.io/docs/v1.2.0/install-overview/). More specifically, find your provider in the Velero list of [supported providers](https://velero.io/docs/v1.2.0/supported-providers/) for specific configuration information and examples.

#### Option 1) CLI commands

Specify the necessary values using the --set key=value[,key=value] argument to helm install. For example,

```bash
helm install --namespace <YOUR NAMESPACE> \
--set configuration.provider=<PROVIDER NAME> \
--set-file credentials.secretContents.cloud=<FULL PATH TO FILE> \
--set configuration.backupStorageLocation.name=<PROVIDER NAME> \
--set configuration.backupStorageLocation.bucket=<BUCKET NAME> \
--set configuration.backupStorageLocation.config.region=<REGION> \
--set configuration.volumeSnapshotLocation.name=<PROVIDER NAME> \
--set configuration.volumeSnapshotLocation.config.region=<REGION> \
--set image.repository=velero/velero \
--set image.tag=v1.2.0 \
--set image.pullPolicy=IfNotPresent \
--set initContainers[0].name=velero-plugin-for-aws \
--set initContainers[0].image=velero/velero-plugin-for-aws:v1.0.0 \
--set initContainers[0].volumeMounts[0].mountPath=/target \
--set initContainers[0].volumeMounts[0].name=plugins \
stable/velero
```

#### Option 2) YAML file

Add/update the necessary values by changing the values.yaml from this repository, then running:

```bash
helm install --namespace <NAMESPACE> -f values.yaml stable/velero
```

#### Upgrade the configuration

If a value needs to be added or changed, you may do so with the `upgrade` command. An example:

```bash
helm upgrade <RELEASE NAME> --set initContainers.backupStorageLocation.name=aws,initContainers.volumeSnapshotLocation.name=aws stable/velero
```

## Upgrading

### Upgrading to v1.2.0

The [instructions found here](https://velero.io/docs/v1.2.0/upgrade-to-1.2/) will assist you in upgrading from version v1.0.0 or v1.1.0 to v1.2.0.

### Upgrading to v1.1.0

The [instructions found here](https://velero.io/docs/v1.1.0/upgrade-to-1.1/) will assist you in upgrading from version v1.0.0 to v1.1.0.

## Uninstall Velero

Note: when you uninstall the Velero server, all backups remain untouched.

```bash
helm delete <RELEASE NAME> --purge
```
10 changes: 10 additions & 0 deletions charts/velero/ci/test-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set a service account so that the CRD clean up job has proper permissions to delete CRDs
serviceAccount:
server:
name: velero

# Whether or not to clean up CustomResourceDefintions when deleting a release.
# Cleaning up CRDs will delete the BackupStorageLocation and VolumeSnapshotLocation instances, which would have to be reconfigured.
# Backup data in object storage will _not_ be deleted, however Backup instances in the Kubernetes API will.
# Always clean up CRDs in CI.
cleanUpCRDs: true
16 changes: 16 additions & 0 deletions charts/velero/crds/backups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: backups.velero.io
labels:
app.kubernetes.io/name: velero
annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
group: velero.io
version: v1
scope: Namespaced
names:
plural: backups
kind: Backup
17 changes: 17 additions & 0 deletions charts/velero/crds/backupstoragelocations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: backupstoragelocations.velero.io
labels:
app.kubernetes.io/name: "velero"

annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
group: velero.io
version: v1
scope: Namespaced
names:
plural: backupstoragelocations
kind: BackupStorageLocation
16 changes: 16 additions & 0 deletions charts/velero/crds/deletebackuprequests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: deletebackuprequests.velero.io
labels:
app.kubernetes.io/name: "velero"
annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
group: velero.io
version: v1
scope: Namespaced
names:
plural: deletebackuprequests
kind: DeleteBackupRequest
17 changes: 17 additions & 0 deletions charts/velero/crds/downloadrequests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: downloadrequests.velero.io
labels:
app.kubernetes.io/name: "velero"

annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
group: velero.io
version: v1
scope: Namespaced
names:
plural: downloadrequests
kind: DownloadRequest
16 changes: 16 additions & 0 deletions charts/velero/crds/podvolumebackups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: podvolumebackups.velero.io
labels:
app.kubernetes.io/name: "velero"
annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
group: velero.io
version: v1
scope: Namespaced
names:
plural: podvolumebackups
kind: PodVolumeBackup
16 changes: 16 additions & 0 deletions charts/velero/crds/podvolumerestores.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: podvolumerestores.velero.io
labels:
app.kubernetes.io/name: "velero"
annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
group: velero.io
version: v1
scope: Namespaced
names:
plural: podvolumerestores
kind: PodVolumeRestore
16 changes: 16 additions & 0 deletions charts/velero/crds/resticrepositories.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: resticrepositories.velero.io
labels:
app.kubernetes.io/name: "velero"
annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
group: velero.io
version: v1
scope: Namespaced
names:
plural: resticrepositories
kind: ResticRepository
16 changes: 16 additions & 0 deletions charts/velero/crds/restores.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: restores.velero.io
labels:
app.kubernetes.io/name: velero
annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
group: velero.io
version: v1
scope: Namespaced
names:
plural: restores
kind: Restore
16 changes: 16 additions & 0 deletions charts/velero/crds/schedules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: schedules.velero.io
labels:
app.kubernetes.io/name: "velero"
annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
group: velero.io
version: v1
scope: Namespaced
names:
plural: schedules
kind: Schedule
16 changes: 16 additions & 0 deletions charts/velero/crds/serverstatusrequests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: serverstatusrequests.velero.io
labels:
app.kubernetes.io/name: "velero"
annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
group: velero.io
version: v1
scope: Namespaced
names:
plural: serverstatusrequests
kind: ServerStatusRequest
16 changes: 16 additions & 0 deletions charts/velero/crds/volumesnapshotlocations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: volumesnapshotlocations.velero.io
labels:
app.kubernetes.io/name: "velero"
annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
group: velero.io
version: v1
scope: Namespaced
names:
plural: volumesnapshotlocations
kind: VolumeSnapshotLocation
13 changes: 13 additions & 0 deletions charts/velero/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Check that the velero is up and running:

kubectl get deployment/{{ include "velero.fullname" . }} -n {{ .Release.Namespace }}

Check that the secret has been created:

kubectl get secret/{{ include "velero.fullname" . }} -n {{ .Release.Namespace }}

Once velero server is up and running you need the client before you can use it
1. wget https://github.com/vmware-tanzu/velero/releases/download/{{ .Values.image.tag }}/velero-{{ .Values.image.tag }}-darwin-amd64.tar.gz
2. tar -xvf velero-{{ .Values.image.tag }}-darwin-amd64.tar.gz -C velero-client

More info on the official site: https://velero.io/docs
Loading

0 comments on commit 4bd96bc

Please sign in to comment.