Add Tilt configs (#3119)

* Adding Tilt configs

Signed-off-by: Carlisia <carlisia@vmware.com>

* Fix spelling

Signed-off-by: Carlisia <carlisia@vmware.com>

* Reuse sample BSL yaml file

Signed-off-by: Carlisia <carlisia@vmware.com>

* Minor fix and more documentation

Signed-off-by: Carlisia <carlisia@vmware.com>

* Reuse our build.sh script

Signed-off-by: Carlisia <carlisia@vmware.com>

* Finish tweaking Tilt build

Signed-off-by: Carlisia <carlisia@vmware.com>

* Improvements

Signed-off-by: Carlisia <carlisia@vmware.com>

* This will make a better startup config

Signed-off-by: Carlisia <carlisia@vmware.com>

* Code review + improvements

Signed-off-by: Carlisia <carlisia@vmware.com>

* Improvements

Signed-off-by: Carlisia <carlisia@vmware.com>

* Reset go.sum

Signed-off-by: Carlisia <carlisia@vmware.com>

* Address code reviews

Signed-off-by: Carlisia <carlisia@vmware.com>

* Improve Tilt code

Signed-off-by: Carlisia <carlisia@vmware.com>

* Address code reviews

Signed-off-by: Carlisia <carlisia@vmware.com>

* Fix links

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add CSI image to example deployment

Signed-off-by: Carlisia <carlisia@vmware.com>
This commit is contained in:
Carlisia Thompson
2020-12-08 10:42:03 -08:00
committed by GitHub
parent 7727d535a4
commit 5eb64eb84b
13 changed files with 818 additions and 3 deletions

View File

@@ -0,0 +1,3 @@
[default]
aws_access_key_id = minio
aws_secret_access_key = minio123

View File

@@ -0,0 +1,131 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
component: velero
name: velero
namespace: velero
spec:
selector:
matchLabels:
deploy: velero
strategy: {}
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "8085"
prometheus.io/scrape: "true"
labels:
component: velero
deploy: velero
spec:
containers:
- args:
- server
- --log-level
- debug
command:
- /velero
env:
- name: VELERO_SCRATCH_DIR
value: /scratch
- name: VELERO_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: LD_LIBRARY_PATH
value: /plugins
- name: AWS_SHARED_CREDENTIALS_FILE
value: /credentials/cloud
- name: AZURE_SHARED_CREDENTIALS_FILE
value: /credentials/cloud
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /credentials/cloud
name: velero
image: velero/velero
imagePullPolicy: Always
ports:
- containerPort: 8085
name: metrics
resources:
limits:
cpu: "1"
memory: 256Mi
requests:
cpu: 500m
memory: 128Mi
volumeMounts:
- mountPath: /scratch
name: scratch
- mountPath: /plugins
name: plugins
- mountPath: /credentials
name: cloud-credentials
initContainers:
- image: velero/velero-plugin-for-aws
imagePullPolicy: Always
name: velero-plugin-for-aws
volumeMounts:
- mountPath: /target
name: plugins
- image: velero/velero-plugin-for-gcp
imagePullPolicy: Always
name: velero-plugin-for-gcp
volumeMounts:
- mountPath: /target
name: plugins
- image: velero/velero-plugin-for-microsoft-azure
imagePullPolicy: Always
name: velero-plugin-for-microsoft-azure
volumeMounts:
- mountPath: /target
name: plugins
- image: velero/velero-plugin-for-csi
imagePullPolicy: Always
name: velero-plugin-for-csi
volumeMounts:
- mountPath: /target
name: plugins
restartPolicy: Always
serviceAccountName: velero
volumes:
- emptyDir: {}
name: scratch
- emptyDir: {}
name: plugins
- name: cloud-credentials
secret:
secretName: cloud-credentials
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
labels:
component: velero
name: velero
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: velero
namespace: velero
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
component: velero
name: velero
namespace: velero
---
apiVersion: v1
kind: Namespace
metadata:
labels:
component: velero
name: velero
spec: {}

View File

@@ -0,0 +1,68 @@
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
creationTimestamp: null
labels:
component: velero
name: restic
namespace: velero
spec:
selector:
matchLabels:
name: restic
template:
metadata:
creationTimestamp: null
labels:
component: velero
name: restic
spec:
containers:
- args:
- restic
- server
command:
- /velero
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: VELERO_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: VELERO_SCRATCH_DIR
value: /scratch
- name: AWS_SHARED_CREDENTIALS_FILE
value: /credentials/cloud
- name: AZURE_SHARED_CREDENTIALS_FILE
value: /credentials/cloud
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /credentials/cloud
image: velero/velero:latest
imagePullPolicy: Always
name: restic
resources: {}
volumeMounts:
- mountPath: /host_pods
mountPropagation: HostToContainer
name: host-pods
- mountPath: /scratch
name: scratch
- mountPath: /credentials
name: cloud-credentials
securityContext:
runAsUser: 0
serviceAccountName: velero
volumes:
- hostPath:
path: /var/lib/kubelet/pods
name: host-pods
- emptyDir: {}
name: scratch
- name: cloud-credentials
secret:
secretName: cloud-credentials
updateStrategy: {}

View File

@@ -0,0 +1,21 @@
{
"default_registry": "",
"enable_providers": [
"aws",
"gcp",
"azure",
"csi"
],
"providers": {
"aws": "../velero-plugin-for-aws",
"gcp": "../velero-plugin-for-gcp",
"azure": "../velero-plugin-for-microsoft-azure",
"csi": "../velero-plugin-for-csi"
},
"allowed_contexts": [
"development"
],
"enable_restic": false,
"create_backup_locations": true,
"setup-minio": true
}

View File

@@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
generatorOptions:
disableNameSuffixHash: true
labels:
component: velero
secretGenerator:
- name: cloud-credentials
namespace: velero
files:
- "cloud"