Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
No longer a maintainer on Velero.

Nolan Brubaker nrb

🌴
No longer a maintainer on Velero.
View GitHub Profile
@nrb
nrb / config.yaml
Last active Aug 11, 2020
Hugo files for testing Velero migration
View config.yaml
#baseURL: "https://velero.io/"
disablePathToLower: true
languageCode: en-us
DefaultContentLanguage: "en"
title: Velero
frontmatter:
date: [":filename", ":default"]
params:
author: Velero Authors
vm_logo: vm-logo.png
View downloadrequest.yaml
---
kind: DownloadRequest
apiVersion: velero.io/v1
metadata:
name: snapshot-request
namespace: velero
spec:
target:
kind: BackupVolumeSnapshots
# name here is the backup name
@nrb
nrb / elasticsearches.json
Created Apr 20, 2020
Demonstration of elasticsearches CRD after it's been taken from a Kubernetes v1.17 API server with Velero master
View elasticsearches.json
{
"apiVersion": "apiextensions.k8s.io/v1beta1",
"kind": "CustomResourceDefinition",
"metadata": {
"annotations": {
"controller-gen.kubebuilder.io/version": "v0.2.5",
},
"creationTimestamp": "2020-04-20T17:55:32Z",
"generation": 1,
"name": "elasticsearches.elasticsearch.k8s.elastic.co",
View log
I0408 20:50:53.175311 1 server.go:118] GRPC request: {}
I0408 20:50:53.175692 1 server.go:123] GRPC response: {"capabilities":[{"Type":{"Rpc":{"type":1}}},{"Type":{"Rpc":{"type":3}}}]}
I0408 20:50:53.180497 1 server.go:117] GRPC call: /csi.v1.Node/NodeStageVolume
I0408 20:50:53.180539 1 server.go:118] GRPC request: {"staging_target_path":"/var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-da43a0eb-2ee1-4dab-86a3-8ec7d6fd7dfb/globalmount","volume_capability":{"AccessType":{"Mount":{"fs_type":"ext4"}},"access_mode":{"mode":1}},"volume_context":{"storage.kubernetes.io/csiProvisionerIdentity":"1586377289887-8081-hostpath.csi.k8s.io"},"volume_id":"56ee5713-79d8-11ea-a524-028290ea0903"}
I0408 20:50:53.181583 1 server.go:123] GRPC response: {}
I0408 20:50:53.187779 1 server.go:117] GRPC call: /csi.v1.Node/NodeGetCapabilities
I0408 20:50:53.187928 1 server.go:118] GRPC request: {}
I0408 20:50:53.188603 1 server.go:123] GRPC response: {"capabilities":[{"Type":{"Rpc":{"typ
View pod-describe.txt
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 3m3s default-scheduler persistentvolumeclaim "mysql-pv-claim" not found
Normal Scheduled 3m2s default-scheduler Successfully assigned wordpress/wordpress-mysql-7f7dc5d664-zcddj to kind-worker
Normal SuccessfulAttachVolume 3m2s attachdetach-controller AttachVolume.Attach succeeded for volume "pvc-dbbba746-15b9-468f-bad3-999a553150a9"
Warning FailedMount 59s kubelet, kind-worker Unable to attach or mount volumes: unmounted volumes=[mysql-persistent-storage], unattached volumes=[mysql-persistent-storage default-token-g4nz6]: timed out waiting for the condition
Warning FailedMount 45s (x9 over 2m54s) kubelet, kind-worker MountVolume.SetUp failed for volume
View gke-install.sh
#!/usr/bin/env sh
# This script lives in ~/bin
# It mostly automates the instructions found on https://heptio.github.io/ark/v0.9.0/gcp-config, except that creating the bucket and service account has already been done.
# Source the variables since they're private information
# Defines $PROJECT, $CREDS_FILE, $SERVICE_ACCOUNT_EMAIL, and $BUCKET.
source ~/bin/gke-vars.sh
# Spin up a GKE cluster and get the credentials for kubeconfig
View velero-deploy.txt
Name: velero
Namespace: velero
CreationTimestamp: Wed, 18 Sep 2019 13:16:18 -0400
Labels: component=velero
Annotations: deployment.kubernetes.io/revision=1
Selector: deploy=velero
Replicas: 0 desired | 0 updated | 0 total | 0 available | 0 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 0
RollingUpdateStrategy: 25% max unavailable, 25% max surge
View gist:265a97971cad689655e7ea7e27aa5dd5
Name: only-velero
Namespace: velero
Labels: velero.io/storage-location=default
Annotations: <none>
Phase: Completed
Namespaces:
Included: velero
Excluded: <none>
View helm_env.yaml
env:
- name: VELERO_SCRATCH_DIR
value: /scratch
- name: VELERO_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
{{- if and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp")) }}
{{- if eq $provider "aws" }}
View match.txt
x1c in /home/nrb/go/src/github.com/heptio/velero (git) master U
% ag \"velero\" --ignore \*_test.go --ignore site/\*
changelogs/CHANGELOG-1.0.md
27:* The "ark" annotations for specifying hooks are no longer supported, and have been replaced with "velero"-based equivalents.
28:* The "ark" annotation for specifying restic backups is no longer supported, and has been replaced with a "velero"-based equivalent.
29:* The "ark" prometheus metrics no longer exist, and have been replaced with "velero"-based equivalents.
pkg/cmd/cli/plugin/add.go
38: veleroDeployment = "velero"
39: veleroContainer = "velero"