velero/tilt-resources/examples/deployment.yaml

134 lines
3.3 KiB
YAML
Raw Normal View History

---
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_CREDENTIALS_FILE
value: /credentials/cloud
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /credentials/cloud
name: velero
image: velero/velero
imagePullPolicy: Always
ports:
- containerPort: 8085
name: metrics
Add Tilt configuration to debug using Delve (#3189) * Add Tilt configuration to debug using Delve This change adds support to run the Velero process in Tilt using [Delve](https://github.com/go-delve/delve). This does not include support for debugging the Velero process in the restic pods, just in the Velero deployment. For an optimal debugging experience, this change also introduces a new flag (`DEBUG`) to the `hack/build.sh` script to enable a "debug" build of the Velero binary. This flag, if enabled, will build the binary without optimisations and inlining. Disabling optimisations and inlining is recommended by Delve. Two configuration options have been added to the Tilt settings. The first, `enable_debug`, is to control whether debugging should be enabled. If enabled, the process will be started by Delve, and the Delve server port (2345) will be forwarded to the local machine. The second option, `debug_continue_on_start`, is to control whether the process should "continue" when started by Delve or should be paused. By default, debugging is disabled, and if in debug mode, the process will continue. Signed-off-by: Bridget McErlean <bmcerlean@vmware.com> * Add spaces around keyword args Starlark prefers spaces around `=` in keyword arguments: https://docs.bazel.build/versions/master/skylark/bzl-style.html#keyword-arguments Signed-off-by: Bridget McErlean <bmcerlean@vmware.com> * Remove unnecessary command from Dockerfile Signed-off-by: Bridget McErlean <bmcerlean@vmware.com> * Add note to connect after Tilt is running Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-01-22 02:12:04 +00:00
- containerPort: 2345
name: delve
resources:
limits:
cpu: "1"
memory: 512Mi
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/v1
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
Add Tilt configuration to debug using Delve (#3189) * Add Tilt configuration to debug using Delve This change adds support to run the Velero process in Tilt using [Delve](https://github.com/go-delve/delve). This does not include support for debugging the Velero process in the restic pods, just in the Velero deployment. For an optimal debugging experience, this change also introduces a new flag (`DEBUG`) to the `hack/build.sh` script to enable a "debug" build of the Velero binary. This flag, if enabled, will build the binary without optimisations and inlining. Disabling optimisations and inlining is recommended by Delve. Two configuration options have been added to the Tilt settings. The first, `enable_debug`, is to control whether debugging should be enabled. If enabled, the process will be started by Delve, and the Delve server port (2345) will be forwarded to the local machine. The second option, `debug_continue_on_start`, is to control whether the process should "continue" when started by Delve or should be paused. By default, debugging is disabled, and if in debug mode, the process will continue. Signed-off-by: Bridget McErlean <bmcerlean@vmware.com> * Add spaces around keyword args Starlark prefers spaces around `=` in keyword arguments: https://docs.bazel.build/versions/master/skylark/bzl-style.html#keyword-arguments Signed-off-by: Bridget McErlean <bmcerlean@vmware.com> * Remove unnecessary command from Dockerfile Signed-off-by: Bridget McErlean <bmcerlean@vmware.com> * Add note to connect after Tilt is running Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-01-22 02:12:04 +00:00
spec: {}