copy examples/ dir as-is to release tarballs
Signed-off-by: Steve Kriss <krisss@vmware.com>pull/1406/head
parent
dda76b05a8
commit
26b940c81c
|
@ -7,7 +7,6 @@
|
|||
_obj
|
||||
_test
|
||||
_output
|
||||
config
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
|
|
|
@ -13,9 +13,6 @@
|
|||
# limitations under the License.
|
||||
|
||||
dist: _output
|
||||
before:
|
||||
hooks:
|
||||
- ./hack/set-example-tags.sh
|
||||
builds:
|
||||
- main: ./cmd/velero/main.go
|
||||
env:
|
||||
|
@ -45,7 +42,7 @@ archive:
|
|||
wrap_in_directory: true
|
||||
files:
|
||||
- LICENSE
|
||||
- config/**/*
|
||||
- examples/**/*
|
||||
checksum:
|
||||
name_template: 'CHECKSUM'
|
||||
release:
|
||||
|
|
|
@ -298,7 +298,7 @@ It can be set up for Velero by creating a role that will have required permissio
|
|||
|
||||
## Installing the nginx example (optional)
|
||||
|
||||
If you run the nginx example, in file `config/nginx-app/with-pv.yaml`:
|
||||
If you run the nginx example, in file `examples/nginx-app/with-pv.yaml`:
|
||||
|
||||
* Replace `<YOUR_STORAGE_CLASS_NAME>` with `gp2`. This is AWS's default `StorageClass` name.
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ For more complex installation needs, use either the Helm chart, or add `--dry-ru
|
|||
|
||||
## Installing the nginx example (optional)
|
||||
|
||||
If you run the nginx example, in file `config/nginx-app/with-pv.yaml`:
|
||||
If you run the nginx example, in file `examples/nginx-app/with-pv.yaml`:
|
||||
|
||||
* Replace `<YOUR_STORAGE_CLASS_NAME>` with `default`. This is Azure's default `StorageClass` name.
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ For more complex installation needs, use either the Helm chart, or add `--dry-ru
|
|||
|
||||
## Installing the nginx example (optional)
|
||||
|
||||
If you run the nginx example, in file `config/nginx-app/with-pv.yaml`:
|
||||
If you run the nginx example, in file `examples/nginx-app/with-pv.yaml`:
|
||||
|
||||
* Replace `<YOUR_STORAGE_CLASS_NAME>` with `standard`. This is GCP's default `StorageClass` name.
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ These instructions start the Velero server and a Minio instance that is accessib
|
|||
1. Start the server and the local storage service. In the Velero directory, run:
|
||||
|
||||
```bash
|
||||
kubectl apply -f config/minio/00-minio-deployment.yaml
|
||||
kubectl apply -f examples/minio/00-minio-deployment.yaml
|
||||
|
||||
velero install \
|
||||
--provider aws \
|
||||
|
@ -75,7 +75,7 @@ These instructions start the Velero server and a Minio instance that is accessib
|
|||
1. Deploy the example nginx application:
|
||||
|
||||
```bash
|
||||
kubectl apply -f config/nginx-app/base.yaml
|
||||
kubectl apply -f examples/nginx-app/base.yaml
|
||||
```
|
||||
|
||||
1. Check to see that both the Velero and nginx deployments are successfully created:
|
||||
|
@ -183,14 +183,12 @@ Once fully removed, the backup is no longer visible when you run:
|
|||
velero backup get BACKUP_NAME
|
||||
```
|
||||
|
||||
If you want to uninstall Velero but preserve the backup data in object storage and persistent volume
|
||||
snapshots, it is safe to remove the `velero` namespace and everything else created for this
|
||||
example:
|
||||
To completely uninstall Velero, minio, and the nginx example app from your Kubernetes cluster:
|
||||
|
||||
```
|
||||
kubectl delete -f config/common/
|
||||
kubectl delete -f config/minio/
|
||||
kubectl delete -f config/nginx-app/base.yaml
|
||||
kubectl delete namespace/velero clusterrolebinding/velero
|
||||
kubectl delete crds -l component=velero
|
||||
kubectl delete -f examples/nginx-app/base.yaml
|
||||
```
|
||||
|
||||
[31]: expose-minio.md
|
||||
|
|
|
@ -75,7 +75,7 @@ For more complex installation needs, use either the Helm chart, or add `--dry-ru
|
|||
|
||||
## Installing the nginx example (optional)
|
||||
|
||||
If you run the nginx example, in file `config/nginx-app/with-pv.yaml`:
|
||||
If you run the nginx example, in file `examples/nginx-app/with-pv.yaml`:
|
||||
|
||||
* Replace `<YOUR_STORAGE_CLASS_NAME>` with your `StorageClass` name.
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ After you set up the Velero server, try these examples:
|
|||
1. Start the sample nginx app:
|
||||
|
||||
```bash
|
||||
kubectl apply -f config/nginx-app/base.yaml
|
||||
kubectl apply -f examples/nginx-app/base.yaml
|
||||
```
|
||||
|
||||
1. Create a backup:
|
||||
|
@ -98,7 +98,7 @@ After you set up the Velero server, try these examples:
|
|||
1. Start the sample nginx app:
|
||||
|
||||
```bash
|
||||
kubectl apply -f config/nginx-app/with-pv.yaml
|
||||
kubectl apply -f examples/nginx-app/with-pv.yaml
|
||||
```
|
||||
|
||||
1. Create a backup with PV snapshotting:
|
||||
|
|
|
@ -49,8 +49,7 @@ Alternatively, you might be able to use the Service's `spec.loadBalancerIP` fiel
|
|||
|
||||
### Velero reports `custom resource not found` errors when starting up.
|
||||
|
||||
Velero's server will not start if the required Custom Resource Definitions are not found in Kubernetes. Apply
|
||||
the `config/common/00-prereqs.yaml` file to create these definitions, then restart Velero.
|
||||
Velero's server will not start if the required Custom Resource Definitions are not found in Kubernetes. Run `velero install` again to install any missing custom resource definitions.
|
||||
|
||||
### `velero backup logs` returns a `SignatureDoesNotMatch` error
|
||||
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
# Examples
|
||||
|
||||
This directory contains sample YAML config files for running Velero on each core provider. Starting with v0.10, these files are packaged into [the Velero release tarballs][2], and we highly recommend that you use the packaged versions of these files to ensure compatibility with the released code.
|
||||
This directory contains sample YAML config files that can be used for exploring Velero.
|
||||
|
||||
* `common/`: Contains manifests to set up Velero. Can be used across cloud provider platforms. (Note that Azure requires its own deployment file due to its unique way of loading credentials).
|
||||
* `minio/`: Used in the [Quickstart][0] to set up [Minio][1], a local S3-compatible object storage service. It provides a convenient way to test Velero without tying you to a specific cloud provider.
|
||||
|
||||
* `minio/`: Used in the [Quickstart][1] to set up [Minio][0], a local S3-compatible object storage service. It provides a convenient way to test Velero without tying you to a specific cloud provider.
|
||||
* `nginx-app/`: A sample nginx app that can be used to test backups and restores.
|
||||
|
||||
* `aws/`, `azure/`, `gcp/`, `ibm/`: Contains manifests specific to the given cloud provider's setup.
|
||||
|
||||
[0]: https://github.com/minio/minio
|
||||
[1]: /README.md#quickstart
|
||||
[2]: https://github.com/heptio/velero/releases
|
||||
[0]: /docs/get-started.md
|
||||
[1]: https://github.com/minio/minio
|
||||
|
|
|
@ -1,208 +0,0 @@
|
|||
# Copyright 2017 the Velero contributors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: backups.velero.io
|
||||
labels:
|
||||
component: velero
|
||||
spec:
|
||||
group: velero.io
|
||||
version: v1
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: backups
|
||||
kind: Backup
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: schedules.velero.io
|
||||
labels:
|
||||
component: velero
|
||||
spec:
|
||||
group: velero.io
|
||||
version: v1
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: schedules
|
||||
kind: Schedule
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: restores.velero.io
|
||||
labels:
|
||||
component: velero
|
||||
spec:
|
||||
group: velero.io
|
||||
version: v1
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: restores
|
||||
kind: Restore
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: downloadrequests.velero.io
|
||||
labels:
|
||||
component: velero
|
||||
spec:
|
||||
group: velero.io
|
||||
version: v1
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: downloadrequests
|
||||
kind: DownloadRequest
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: deletebackuprequests.velero.io
|
||||
labels:
|
||||
component: velero
|
||||
spec:
|
||||
group: velero.io
|
||||
version: v1
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: deletebackuprequests
|
||||
kind: DeleteBackupRequest
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: podvolumebackups.velero.io
|
||||
labels:
|
||||
component: velero
|
||||
spec:
|
||||
group: velero.io
|
||||
version: v1
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: podvolumebackups
|
||||
kind: PodVolumeBackup
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: podvolumerestores.velero.io
|
||||
labels:
|
||||
component: velero
|
||||
spec:
|
||||
group: velero.io
|
||||
version: v1
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: podvolumerestores
|
||||
kind: PodVolumeRestore
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: resticrepositories.velero.io
|
||||
labels:
|
||||
component: velero
|
||||
spec:
|
||||
group: velero.io
|
||||
version: v1
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: resticrepositories
|
||||
kind: ResticRepository
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: backupstoragelocations.velero.io
|
||||
labels:
|
||||
component: velero
|
||||
spec:
|
||||
group: velero.io
|
||||
version: v1
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: backupstoragelocations
|
||||
kind: BackupStorageLocation
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: volumesnapshotlocations.velero.io
|
||||
labels:
|
||||
component: velero
|
||||
spec:
|
||||
group: velero.io
|
||||
version: v1
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: volumesnapshotlocations
|
||||
kind: VolumeSnapshotLocation
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: serverstatusrequests.velero.io
|
||||
labels:
|
||||
component: velero
|
||||
spec:
|
||||
group: velero.io
|
||||
version: v1
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: serverstatusrequests
|
||||
kind: ServerStatusRequest
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: velero
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: velero
|
||||
namespace: velero
|
||||
labels:
|
||||
component: velero
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: velero
|
||||
labels:
|
||||
component: velero
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
namespace: velero
|
||||
name: velero
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: cluster-admin
|
||||
apiGroup: rbac.authorization.k8s.io
|
|
@ -1,10 +0,0 @@
|
|||
# File Structure
|
||||
|
||||
## 00-prereqs.yaml
|
||||
|
||||
This file contains the prerequisites necessary to run the Velero server:
|
||||
|
||||
- `velero` namespace
|
||||
- `velero` service account
|
||||
- RBAC rules to grant permissions to the `velero` service account
|
||||
- CRDs for the Velero-specific resources (Backup, Schedule, Restore, etc.)
|
|
@ -1,37 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2018 the Velero contributors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
GIT_TAG=$(git describe --tags --always)
|
||||
|
||||
# this script copies all of the files under examples/ into a new directory,
|
||||
# config/ (which is gitignored so it doesn't result in the git state being
|
||||
# dirty, which would prevent goreleaser from running), and then updates all
|
||||
# of the image tags in those files to use $GIT_TAG.
|
||||
|
||||
rm -rf config/ && cp -r examples/ config/
|
||||
|
||||
# the "-i'.bak'" flag to sed is necessary, with no space between the flag
|
||||
# and the value, for this to be compatible across BSD/OSX sed and GNU sed.
|
||||
# remove the ".bak" files afterwards (they're copies of the originals).
|
||||
find config/ -type f -name "*.yaml" | xargs sed -i'.bak' "s|gcr.io/heptio-images/velero:latest|gcr.io/heptio-images/velero:$GIT_TAG|g"
|
||||
find config/ -type f -name "*.bak" | xargs rm
|
||||
|
||||
find config/ -type f -name "*.yaml" | xargs sed -i'.bak' "s|gcr.io/heptio-images/fsfreeze-pause:latest|gcr.io/heptio-images/fsfreeze-pause:$GIT_TAG|g"
|
||||
find config/ -type f -name "*.bak" | xargs rm
|
Loading…
Reference in New Issue