mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-28 18:18:41 +00:00
Compare commits
37 Commits
v0.32.1
...
platform-a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98194a7414 | ||
|
|
6ed1243f86 | ||
|
|
d1275ecd08 | ||
|
|
6c9d8bb47f | ||
|
|
1f240387f9 | ||
|
|
1d3964352e | ||
|
|
512277fa93 | ||
|
|
cd7fec68fc | ||
|
|
d12d07fd5c | ||
|
|
00bd212886 | ||
|
|
d19d6b58d0 | ||
|
|
f953db50da | ||
|
|
55e11fcc7b | ||
|
|
12184bc2b9 | ||
|
|
39daa3a38a | ||
|
|
a5ff9bf65b | ||
|
|
036fa6f888 | ||
|
|
792f6b4af8 | ||
|
|
52714f5cce | ||
|
|
bc54bd7bb0 | ||
|
|
0b85a52bee | ||
|
|
b3a2bc85e3 | ||
|
|
d097433266 | ||
|
|
2d294f0546 | ||
|
|
78b4d06b25 | ||
|
|
ae90969b7e | ||
|
|
6732205b24 | ||
|
|
60dee45a61 | ||
|
|
70cd3ce3e7 | ||
|
|
9dc21c6c2d | ||
|
|
4648c7b4c1 | ||
|
|
6a080fbf5d | ||
|
|
72f40f32ad | ||
|
|
cfc8c269f3 | ||
|
|
1da45ff039 | ||
|
|
c6ee006d6b | ||
|
|
848abc4bd1 |
24
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
24
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<!-- Thank you for making a contribution! Here are some tips for you:
|
||||
- Start the PR title with the [label] of Cozystack component:
|
||||
- For system components: [platform], [system], [linstor], [cilium], [kube-ovn], [dashboard], [cluster-api], etc.
|
||||
- For managed apps: [apps], [tenant], [kubernetes], [postgres], [virtual-machine] etc.
|
||||
- For development and maintenance: [tests], [ci], [docs], [maintenance].
|
||||
- If it's a work in progress, consider creating this PR as a draft.
|
||||
- Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft.
|
||||
- Add the label `backport` if it's a bugfix that needs to be backported to a previous version.
|
||||
-->
|
||||
|
||||
## What this PR does
|
||||
|
||||
|
||||
### Release note
|
||||
|
||||
<!-- Write a release note:
|
||||
- Explain what has changed internally and for users.
|
||||
- Start with the same [label] as in the PR title
|
||||
- Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
|
||||
-->
|
||||
|
||||
```release-note
|
||||
[]
|
||||
```
|
||||
2
.github/workflows/pre-commit.yml
vendored
2
.github/workflows/pre-commit.yml
vendored
@@ -2,7 +2,7 @@ name: Pre-Commit Checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [labeled, opened, synchronize, reopened]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
concurrency:
|
||||
group: pre-commit-${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
|
||||
2
.github/workflows/pull-requests-release.yaml
vendored
2
.github/workflows/pull-requests-release.yaml
vendored
@@ -3,6 +3,8 @@ name: "Releasing PR"
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
paths-ignore:
|
||||
- 'docs/**/*'
|
||||
|
||||
# Cancel in‑flight runs for the same PR when a new push arrives.
|
||||
concurrency:
|
||||
|
||||
115
.github/workflows/pull-requests.yaml
vendored
115
.github/workflows/pull-requests.yaml
vendored
@@ -2,7 +2,9 @@ name: Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [labeled, opened, synchronize, reopened]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths-ignore:
|
||||
- 'docs/**/*'
|
||||
|
||||
# Cancel in‑flight runs for the same PR when a new push arrives.
|
||||
concurrency:
|
||||
@@ -44,6 +46,17 @@ jobs:
|
||||
|
||||
- name: Build Talos image
|
||||
run: make -C packages/core/installer talos-nocloud
|
||||
|
||||
- name: Save git diff as patch
|
||||
if: "!contains(github.event.pull_request.labels.*.name, 'release')"
|
||||
run: git diff HEAD > _out/assets/pr.patch
|
||||
|
||||
- name: Upload git diff patch
|
||||
if: "!contains(github.event.pull_request.labels.*.name, 'release')"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pr-patch
|
||||
path: _out/assets/pr.patch
|
||||
|
||||
- name: Upload installer
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -126,6 +139,10 @@ jobs:
|
||||
if: ${{ always() && (needs.build.result == 'success' || needs.resolve_assets.result == 'success') }}
|
||||
|
||||
steps:
|
||||
# ▸ Checkout and prepare the codebase
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# ▸ Regular PR path – download artefacts produced by the *build* job
|
||||
- name: "Download Talos image (regular PR)"
|
||||
if: "!contains(github.event.pull_request.labels.*.name, 'release')"
|
||||
@@ -134,6 +151,17 @@ jobs:
|
||||
name: talos-image
|
||||
path: _out/assets
|
||||
|
||||
- name: Download PR patch
|
||||
if: "!contains(github.event.pull_request.labels.*.name, 'release')"
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: pr-patch
|
||||
path: _out/assets
|
||||
|
||||
- name: Apply patch
|
||||
if: "!contains(github.event.pull_request.labels.*.name, 'release')"
|
||||
run: |
|
||||
git apply _out/assets/pr.patch
|
||||
|
||||
# ▸ Release PR path – fetch artefacts from the corresponding draft release
|
||||
- name: Download assets from draft release (release PR)
|
||||
@@ -145,27 +173,28 @@ jobs:
|
||||
env:
|
||||
GH_PAT: ${{ secrets.GH_PAT }}
|
||||
|
||||
# ▸ Start actual job steps
|
||||
- name: Set sandbox ID
|
||||
run: echo "SANDBOX_NAME=cozy-e2e-sandbox-$(echo "${GITHUB_REPOSITORY}:${GITHUB_WORKFLOW}:${GITHUB_REF}" | sha256sum | cut -c1-10)" >> $GITHUB_ENV
|
||||
|
||||
# ▸ Start actual job steps
|
||||
- name: Prepare workspace
|
||||
run: |
|
||||
cd ..
|
||||
rm -rf /tmp/$SANDBOX_NAME
|
||||
cp -r cozystack /tmp/$SANDBOX_NAME
|
||||
sudo systemctl stop "rm-workspace-$SANDBOX_NAME.timer" "rm-workspace-$SANDBOX_NAME.service" 2>/dev/null || true
|
||||
sudo systemctl reset-failed "rm-workspace-$SANDBOX_NAME.timer" "rm-workspace-$SANDBOX_NAME.service" 2>/dev/null || true
|
||||
sudo systemctl daemon-reexec
|
||||
sudo systemd-run \
|
||||
--on-calendar="$(date -d 'now + 24 hours' '+%Y-%m-%d %H:%M:%S')" \
|
||||
--unit=rm-workspace-$SANDBOX_NAME \
|
||||
rm -rf /tmp/$SANDBOX_NAME
|
||||
|
||||
cp -r ${{ github.workspace }} /tmp/$SANDBOX_NAME
|
||||
|
||||
- name: Prepare environment
|
||||
run: |
|
||||
cd /tmp/$SANDBOX_NAME
|
||||
make SANDBOX_NAME=$SANDBOX_NAME prepare-env
|
||||
attempt=0
|
||||
until make SANDBOX_NAME=$SANDBOX_NAME prepare-env; do
|
||||
attempt=$((attempt + 1))
|
||||
if [ $attempt -ge 3 ]; then
|
||||
echo "❌ Attempt $attempt failed, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
echo "❌ Attempt $attempt failed, retrying..."
|
||||
done
|
||||
echo "✅ The task completed successfully after $attempt attempts"
|
||||
|
||||
install_cozystack:
|
||||
name: "Install Cozystack"
|
||||
@@ -202,10 +231,24 @@ jobs:
|
||||
- name: Set sandbox ID
|
||||
run: echo "SANDBOX_NAME=cozy-e2e-sandbox-$(echo "${GITHUB_REPOSITORY}:${GITHUB_WORKFLOW}:${GITHUB_REF}" | sha256sum | cut -c1-10)" >> $GITHUB_ENV
|
||||
|
||||
- name: Sync _out/assets directory
|
||||
run: |
|
||||
mkdir -p /tmp/$SANDBOX_NAME/_out/assets
|
||||
mv _out/assets/* /tmp/$SANDBOX_NAME/_out/assets/
|
||||
|
||||
- name: Install Cozystack into sandbox
|
||||
run: |
|
||||
cd /tmp/$SANDBOX_NAME
|
||||
make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME install-cozystack
|
||||
attempt=0
|
||||
until make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME install-cozystack; do
|
||||
attempt=$((attempt + 1))
|
||||
if [ $attempt -ge 3 ]; then
|
||||
echo "❌ Attempt $attempt failed, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
echo "❌ Attempt $attempt failed, retrying..."
|
||||
done
|
||||
echo "✅ The task completed successfully after $attempt attempts."
|
||||
|
||||
detect_test_matrix:
|
||||
name: "Detect e2e test matrix"
|
||||
@@ -236,12 +279,44 @@ jobs:
|
||||
- name: E2E Apps
|
||||
run: |
|
||||
cd /tmp/$SANDBOX_NAME
|
||||
make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME test-apps-${{ matrix.app }}
|
||||
attempt=0
|
||||
until make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME test-apps-${{ matrix.app }}; do
|
||||
attempt=$((attempt + 1))
|
||||
if [ $attempt -ge 3 ]; then
|
||||
echo "❌ Attempt $attempt failed, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
echo "❌ Attempt $attempt failed, retrying..."
|
||||
done
|
||||
echo "✅ The task completed successfully after $attempt attempts"
|
||||
|
||||
collect_report:
|
||||
name: Collect report
|
||||
runs-on: [self-hosted]
|
||||
needs: [test_apps]
|
||||
if: ${{ always() }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set sandbox ID
|
||||
run: echo "SANDBOX_NAME=cozy-e2e-sandbox-$(echo "${GITHUB_REPOSITORY}:${GITHUB_WORKFLOW}:${GITHUB_REF}" | sha256sum | cut -c1-10)" >> $GITHUB_ENV
|
||||
|
||||
- name: Collect report
|
||||
run: |
|
||||
cd /tmp/$SANDBOX_NAME
|
||||
make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME collect-report
|
||||
|
||||
- name: Upload cozyreport.tgz
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cozyreport
|
||||
path: /tmp/${{ env.SANDBOX_NAME }}/_out/cozyreport.tgz
|
||||
|
||||
cleanup:
|
||||
name: Tear down environment
|
||||
runs-on: [self-hosted]
|
||||
needs: test_apps
|
||||
needs: [collect_report]
|
||||
if: ${{ always() && needs.test_apps.result == 'success' }}
|
||||
|
||||
steps:
|
||||
@@ -260,10 +335,4 @@ jobs:
|
||||
- name: Remove workspace
|
||||
run: rm -rf /tmp/$SANDBOX_NAME
|
||||
|
||||
- name: Tear down timers
|
||||
run: |
|
||||
sudo systemctl stop "rm-workspace-$SANDBOX_NAME.timer" "rm-workspace-$SANDBOX_NAME.service" 2>/dev/null || true
|
||||
sudo systemctl reset-failed "rm-workspace-$SANDBOX_NAME.timer" "rm-workspace-$SANDBOX_NAME.service" 2>/dev/null || true
|
||||
sudo systemctl stop "teardown-$SANDBOX_NAME.timer" "teardown-$SANDBOX_NAME.service" 2>/dev/null || true
|
||||
sudo systemctl reset-failed "teardown-$SANDBOX_NAME.timer" "teardown-$SANDBOX_NAME.service" 2>/dev/null || true
|
||||
sudo systemctl daemon-reexec
|
||||
|
||||
|
||||
147
hack/cozyreport.sh
Executable file
147
hack/cozyreport.sh
Executable file
@@ -0,0 +1,147 @@
|
||||
#!/bin/sh
|
||||
REPORT_DATE=$(date +%Y-%m-%d_%H-%M-%S)
|
||||
REPORT_NAME=${1:-cozyreport-$REPORT_DATE}
|
||||
REPORT_PDIR=$(mktemp -d)
|
||||
REPORT_DIR=$REPORT_PDIR/$REPORT_NAME
|
||||
|
||||
# -- check dependencies
|
||||
command -V kubectl >/dev/null || exit $?
|
||||
command -V tar >/dev/null || exit $?
|
||||
|
||||
# -- cozystack module
|
||||
|
||||
echo "Collecting Cozystack information..."
|
||||
mkdir -p $REPORT_DIR/cozystack
|
||||
kubectl get deploy -n cozy-system cozystack -o jsonpath='{.spec.template.spec.containers[0].image}' > $REPORT_DIR/cozystack/image.txt 2>&1
|
||||
kubectl get cm -n cozy-system --no-headers | awk '$1 ~ /^cozystack/' |
|
||||
while read NAME _; do
|
||||
DIR=$REPORT_DIR/cozystack/configs
|
||||
mkdir -p $DIR
|
||||
kubectl get cm -n cozy-system $NAME -o yaml > $DIR/$NAME.yaml 2>&1
|
||||
done
|
||||
|
||||
# -- kubernetes module
|
||||
|
||||
echo "Collecting Kubernetes information..."
|
||||
mkdir -p $REPORT_DIR/kubernetes
|
||||
kubectl version > $REPORT_DIR/kubernetes/version.txt 2>&1
|
||||
|
||||
echo "Collecting nodes..."
|
||||
kubectl get nodes -o wide > $REPORT_DIR/kubernetes/nodes.txt 2>&1
|
||||
kubectl get nodes --no-headers | awk '$2 != "Ready"' |
|
||||
while read NAME _; do
|
||||
DIR=$REPORT_DIR/kubernetes/nodes/$NAME
|
||||
mkdir -p $DIR
|
||||
kubectl get node $NAME -o yaml > $DIR/node.yaml 2>&1
|
||||
kubectl describe node $NAME > $DIR/describe.txt 2>&1
|
||||
done
|
||||
|
||||
echo "Collecting namespaces..."
|
||||
kubectl get ns -o wide > $REPORT_DIR/kubernetes/namespaces.txt 2>&1
|
||||
kubectl get ns --no-headers | awk '$2 != "Active"' |
|
||||
while read NAME _; do
|
||||
DIR=$REPORT_DIR/kubernetes/namespaces/$NAME
|
||||
mkdir -p $DIR
|
||||
kubectl get ns $NAME -o yaml > $DIR/namespace.yaml 2>&1
|
||||
kubectl describe ns $NAME > $DIR/describe.txt 2>&1
|
||||
done
|
||||
|
||||
echo "Collecting helmreleases..."
|
||||
kubectl get hr -A > $REPORT_DIR/kubernetes/helmreleases.txt 2>&1
|
||||
kubectl get hr -A | awk '$4 != "True"' | \
|
||||
while read NAMESPACE NAME _; do
|
||||
DIR=$REPORT_DIR/kubernetes/helmreleases/$NAMESPACE/$NAME
|
||||
mkdir -p $DIR
|
||||
kubectl get hr -n $NAMESPACE $NAME -o yaml > $DIR/hr.yaml 2>&1
|
||||
kubectl describe hr -n $NAMESPACE $NAME > $DIR/describe.txt 2>&1
|
||||
done
|
||||
|
||||
echo "Collecting pods..."
|
||||
kubectl get pod -A -o wide > $REPORT_DIR/kubernetes/pods.txt 2>&1
|
||||
kubectl get pod -A --no-headers | awk '$4 !~ /Running|Succeeded|Completed/' |
|
||||
while read NAMESPACE NAME _ STATE _; do
|
||||
DIR=$REPORT_DIR/kubernetes/pods/$NAMESPACE/$NAME
|
||||
mkdir -p $DIR
|
||||
CONTAINERS=$(kubectl get pod -o jsonpath='{.spec.containers[*].name}' -n $NAMESPACE $NAME)
|
||||
kubectl get pod -n $NAMESPACE $NAME -o yaml > $DIR/pod.yaml 2>&1
|
||||
kubectl describe pod -n $NAMESPACE $NAME > $DIR/describe.txt 2>&1
|
||||
if [ "$STATE" != "Pending" ]; then
|
||||
for CONTAINER in $CONTAINERS; do
|
||||
kubectl logs -n $NAMESPACE $NAME $CONTAINER > $DIR/logs-$CONTAINER.txt 2>&1
|
||||
kubectl logs -n $NAMESPACE $NAME $CONTAINER --previous > $DIR/logs-$CONTAINER-previous.txt 2>&1
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Collecting virtualmachines..."
|
||||
kubectl get vm -A > $REPORT_DIR/kubernetes/vms.txt 2>&1
|
||||
kubectl get vm -A --no-headers | awk '$5 != "True"' |
|
||||
while read NAMESPACE NAME _; do
|
||||
DIR=$REPORT_DIR/kubernetes/vm/$NAMESPACE/$NAME
|
||||
mkdir -p $DIR
|
||||
kubectl get vm -n $NAMESPACE $NAME -o yaml > $DIR/vm.yaml 2>&1
|
||||
kubectl describe vm -n $NAMESPACE $NAME > $DIR/describe.txt 2>&1
|
||||
done
|
||||
|
||||
echo "Collecting virtualmachine instances..."
|
||||
kubectl get vmi -A > $REPORT_DIR/kubernetes/vmis.txt 2>&1
|
||||
kubectl get vmi -A --no-headers | awk '$4 != "Running"' |
|
||||
while read NAMESPACE NAME _; do
|
||||
DIR=$REPORT_DIR/kubernetes/vmi/$NAMESPACE/$NAME
|
||||
mkdir -p $DIR
|
||||
kubectl get vmi -n $NAMESPACE $NAME -o yaml > $DIR/vmi.yaml 2>&1
|
||||
kubectl describe vmi -n $NAMESPACE $NAME > $DIR/describe.txt 2>&1
|
||||
done
|
||||
|
||||
echo "Collecting services..."
|
||||
kubectl get svc -A > $REPORT_DIR/kubernetes/services.txt 2>&1
|
||||
kubectl get svc -A --no-headers | awk '$4 == "<pending>"' |
|
||||
while read NAMESPACE NAME _; do
|
||||
DIR=$REPORT_DIR/kubernetes/services/$NAMESPACE/$NAME
|
||||
mkdir -p $DIR
|
||||
kubectl get svc -n $NAMESPACE $NAME -o yaml > $DIR/service.yaml 2>&1
|
||||
kubectl describe svc -n $NAMESPACE $NAME > $DIR/describe.txt 2>&1
|
||||
done
|
||||
|
||||
echo "Collecting pvcs..."
|
||||
kubectl get pvc -A > $REPORT_DIR/kubernetes/pvcs.txt 2>&1
|
||||
kubectl get pvc -A | awk '$3 != "Bound"' |
|
||||
while read NAMESPACE NAME _; do
|
||||
DIR=$REPORT_DIR/kubernetes/pvc/$NAMESPACE/$NAME
|
||||
mkdir -p $DIR
|
||||
kubectl get pvc -n $NAMESPACE $NAME -o yaml > $DIR/pvc.yaml 2>&1
|
||||
kubectl describe pvc -n $NAMESPACE $NAME > $DIR/describe.txt 2>&1
|
||||
done
|
||||
|
||||
# -- kamaji module
|
||||
|
||||
if kubectl get deploy -n cozy-linstor linstor-controller >/dev/null 2>&1; then
|
||||
echo "Collecting kamaji resources..."
|
||||
DIR=$REPORT_DIR/kamaji
|
||||
mkdir -p $DIR
|
||||
kubectl logs -n cozy-kamaji deployment/kamaji > $DIR/kamaji-controller.log 2>&1
|
||||
kubectl get kamajicontrolplanes.controlplane.cluster.x-k8s.io -A > $DIR/kamajicontrolplanes.txt 2>&1
|
||||
kubectl get kamajicontrolplanes.controlplane.cluster.x-k8s.io -A -o yaml > $DIR/kamajicontrolplanes.yaml 2>&1
|
||||
kubectl get tenantcontrolplanes.kamaji.clastix.io -A > $DIR/tenantcontrolplanes.txt 2>&1
|
||||
kubectl get tenantcontrolplanes.kamaji.clastix.io -A -o yaml > $DIR/tenantcontrolplanes.yaml 2>&1
|
||||
fi
|
||||
|
||||
# -- linstor module
|
||||
|
||||
if kubectl get deploy -n cozy-linstor linstor-controller >/dev/null 2>&1; then
|
||||
echo "Collecting linstor resources..."
|
||||
DIR=$REPORT_DIR/linstor
|
||||
mkdir -p $DIR
|
||||
kubectl exec -n cozy-linstor deploy/linstor-controller -- linstor --no-color n l > $DIR/nodes.txt 2>&1
|
||||
kubectl exec -n cozy-linstor deploy/linstor-controller -- linstor --no-color sp l > $DIR/storage-pools.txt 2>&1
|
||||
kubectl exec -n cozy-linstor deploy/linstor-controller -- linstor --no-color r l > $DIR/resources.txt 2>&1
|
||||
fi
|
||||
|
||||
# -- finalization
|
||||
|
||||
echo "Creating archive..."
|
||||
tar -czf $REPORT_NAME.tgz -C $REPORT_PDIR .
|
||||
echo "Report created: $REPORT_NAME.tgz"
|
||||
|
||||
echo "Cleaning up..."
|
||||
rm -rf $REPORT_PDIR
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
@test "Create DB ClickHouse" {
|
||||
name='test'
|
||||
kubectl -n tenant-test get clickhouses.apps.cozystack.io $name ||
|
||||
kubectl create -f- <<EOF
|
||||
kubectl apply -f- <<EOF
|
||||
apiVersion: apps.cozystack.io/v1alpha1
|
||||
kind: ClickHouse
|
||||
metadata:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@test "Create Kafka" {
|
||||
name='test'
|
||||
kubectl create -f- <<EOF
|
||||
kubectl apply -f- <<EOF
|
||||
apiVersion: apps.cozystack.io/v1alpha1
|
||||
kind: Kafka
|
||||
metadata:
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
@test "Create a tenant Kubernetes control plane" {
|
||||
kubectl -n tenant-test get kuberneteses.apps.cozystack.io test ||
|
||||
kubectl create -f - <<EOF
|
||||
kubectl apply -f - <<EOF
|
||||
apiVersion: apps.cozystack.io/v1alpha1
|
||||
kind: Kubernetes
|
||||
metadata:
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
@test "Create DB MySQL" {
|
||||
name='test'
|
||||
kubectl -n tenant-test get mysqls.apps.cozystack.io $name ||
|
||||
kubectl create -f- <<EOF
|
||||
kubectl apply -f- <<EOF
|
||||
apiVersion: apps.cozystack.io/v1alpha1
|
||||
kind: MySQL
|
||||
metadata:
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
@test "Create DB PostgreSQL" {
|
||||
name='test'
|
||||
kubectl -n tenant-test get postgreses.apps.cozystack.io $name ||
|
||||
kubectl create -f - <<EOF
|
||||
kubectl apply -f - <<EOF
|
||||
apiVersion: apps.cozystack.io/v1alpha1
|
||||
kind: Postgres
|
||||
metadata:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@test "Create Redis" {
|
||||
name='test'
|
||||
kubectl create -f- <<EOF
|
||||
kubectl apply -f- <<EOF
|
||||
apiVersion: apps.cozystack.io/v1alpha1
|
||||
kind: Redis
|
||||
metadata:
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
@test "Create a Virtual Machine" {
|
||||
name='test'
|
||||
kubectl -n tenant-test get virtualmachines.apps.cozystack.io $name ||
|
||||
kubectl create -f - <<EOF
|
||||
kubectl apply -f - <<EOF
|
||||
apiVersion: apps.cozystack.io/v1alpha1
|
||||
kind: VirtualMachine
|
||||
metadata:
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
@test "Create a VM Disk" {
|
||||
name='test'
|
||||
kubectl -n tenant-test get vmdisks.apps.cozystack.io $name ||
|
||||
kubectl create -f - <<EOF
|
||||
kubectl apply -f - <<EOF
|
||||
apiVersion: apps.cozystack.io/v1alpha1
|
||||
kind: VMDisk
|
||||
metadata:
|
||||
@@ -26,8 +25,7 @@ EOF
|
||||
@test "Create a VM Instance" {
|
||||
diskName='test'
|
||||
name='test'
|
||||
kubectl -n tenant-test get vminstances.apps.cozystack.io $name ||
|
||||
kubectl create -f - <<EOF
|
||||
kubectl apply -f - <<EOF
|
||||
apiVersion: apps.cozystack.io/v1alpha1
|
||||
kind: VMInstance
|
||||
metadata:
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
@test "Required installer assets exist" {
|
||||
if [ ! -f _out/assets/cozystack-installer.yaml ]; then
|
||||
echo "Missing: _out/assets/cozystack-installer.yaml" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
@test "Install Cozystack" {
|
||||
# Create namespace & configmap required by installer
|
||||
kubectl create namespace cozy-system --dry-run=client -o yaml | kubectl apply -f -
|
||||
@@ -27,7 +34,7 @@
|
||||
# Fail the test if any HelmRelease is not Ready
|
||||
if kubectl get hr -A | grep -v " True " | grep -v NAME; then
|
||||
kubectl get hr -A
|
||||
fail "Some HelmReleases failed to reconcile"
|
||||
echo "Some HelmReleases failed to reconcile" >&2
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -4,11 +4,6 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@test "Required installer assets exist" {
|
||||
if [ ! -f _out/assets/cozystack-installer.yaml ]; then
|
||||
echo "Missing: _out/assets/cozystack-installer.yaml" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f _out/assets/nocloud-amd64.raw.xz ]; then
|
||||
echo "Missing: _out/assets/nocloud-amd64.raw.xz" >&2
|
||||
exit 1
|
||||
@@ -141,7 +136,25 @@ machine:
|
||||
mirrors:
|
||||
docker.io:
|
||||
endpoints:
|
||||
- https://mirror.gcr.io
|
||||
- https://dockerio.nexus.lllamnyp.su
|
||||
cr.fluentbit.io:
|
||||
endpoints:
|
||||
- https://fluentbit.nexus.lllamnyp.su
|
||||
docker-registry3.mariadb.com:
|
||||
endpoints:
|
||||
- https://mariadb.nexus.lllamnyp.su
|
||||
gcr.io:
|
||||
endpoints:
|
||||
- https://gcr.nexus.lllamnyp.su
|
||||
ghcr.io:
|
||||
endpoints:
|
||||
- https://ghcr.nexus.lllamnyp.su
|
||||
quay.io:
|
||||
endpoints:
|
||||
- https://quay.nexus.lllamnyp.su
|
||||
registry.k8s.io:
|
||||
endpoints:
|
||||
- https://k8s.nexus.lllamnyp.su
|
||||
files:
|
||||
- content: |
|
||||
[plugins]
|
||||
|
||||
@@ -5,6 +5,7 @@ include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
yq -i -o json --indent 4 '.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
|
||||
image:
|
||||
docker buildx build images/clickhouse-backup \
|
||||
|
||||
@@ -85,7 +85,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly.",
|
||||
"default": "small"
|
||||
"default": "small",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,3 +2,4 @@ include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
yq -i -o json --indent 4 '.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
|
||||
@@ -90,7 +90,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
|
||||
"default": "nano"
|
||||
"default": "nano",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ image-nginx:
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
yq -i -o json --indent 4 '.properties.haproxy.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
yq -i -o json --indent 4 '.properties.nginx.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
|
||||
update:
|
||||
tag=$$(git ls-remote --tags --sort="v:refname" https://github.com/chrislim2888/IP2Location-C-Library | awk -F'[/^]' 'END{print $$3}') && \
|
||||
|
||||
@@ -33,7 +33,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
|
||||
"default": "nano"
|
||||
"default": "nano",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -53,7 +63,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
|
||||
"default": "nano"
|
||||
"default": "nano",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -64,4 +84,4 @@
|
||||
"items": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,3 +2,5 @@ include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
yq -i -o json --indent 4 '.properties.kafka.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
yq -i -o json --indent 4 '.properties.zookeeper.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
|
||||
@@ -33,7 +33,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
|
||||
"default": "small"
|
||||
"default": "small",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -63,7 +73,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
|
||||
"default": "small"
|
||||
"default": "small",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -74,4 +94,4 @@
|
||||
"items": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.24.2
|
||||
version: 0.25.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -6,6 +6,7 @@ include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
yq -o json -i '.properties.addons.properties.ingressNginx.properties.exposeMethod.enum = ["Proxied","LoadBalancer"]' values.schema.json
|
||||
yq -o json -i '.properties.controlPlane.properties.apiServer.properties.resourcesPreset.enum = ["none","nano","micro","small","medium","large","xlarge","2xlarge"]' values.schema.json
|
||||
yq -o json -i '.properties.controlPlane.properties.controllerManager.properties.resourcesPreset.enum = ["none","nano","micro","small","medium","large","xlarge","2xlarge"]' values.schema.json
|
||||
yq -o json -i '.properties.controlPlane.properties.scheduler.properties.resourcesPreset.enum = ["none","nano","micro","small","medium","large","xlarge","2xlarge"]' values.schema.json
|
||||
|
||||
@@ -90,6 +90,23 @@ See the reference for components utilized in this service:
|
||||
|
||||
### Cluster Addons
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
|
||||
| `addons.certManager.enabled` | Enable cert-manager, which automatically creates and manages SSL/TLS certificates. | `false` |
|
||||
| `addons.certManager.valuesOverride` | Custom values to override | `{}` |
|
||||
| `addons.cilium.valuesOverride` | Custom values to override | `{}` |
|
||||
| `addons.gatewayAPI.enabled` | Enable the Gateway API | `false` |
|
||||
| `addons.ingressNginx.enabled` | Enable the Ingress-NGINX controller (requires nodes labeled with the 'ingress-nginx' role). | `false` |
|
||||
| `addons.ingressNginx.valuesOverride` | Custom values to override | `{}` |
|
||||
| `addons.ingressNginx.exposeMethod` | Method to expose the Ingress-NGINX controller. (allowed values: Proxied, LoadBalancer) | `Proxied` |
|
||||
| `addons.ingressNginx.hosts` | List of domain names that the parent cluster should route to this tenant cluster. Taken into account only when `exposeMethod` is set to `Proxied`. | `[]` |
|
||||
| `addons.gpuOperator.enabled` | Enable the GPU-operator | `false` |
|
||||
| `addons.gpuOperator.valuesOverride` | Custom values to override | `{}` |
|
||||
| `addons.fluxcd.enabled` | Enable FluxCD | `false` |
|
||||
| `addons.fluxcd.valuesOverride` | Custom values to override | `{}` |
|
||||
| `addons.monitoringAgents.enabled` | Enable monitoring agents (Fluent Bit and VMAgents) to send logs and metrics. If tenant monitoring is enabled, data is sent to tenant storage; otherwise, it goes to root storage. | `false` |
|
||||
| `addons.monitoringAgents.valuesOverride` | Custom values to override | `{}` |
|
||||
| `addons.verticalPodAutoscaler.valuesOverride` | Custom values to override | `{}` |
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `addons.certManager.enabled` | Enable cert-manager, which automatically creates and manages SSL/TLS certificates. | `false` |
|
||||
@@ -106,6 +123,8 @@ See the reference for components utilized in this service:
|
||||
| `addons.monitoringAgents.enabled` | Enable monitoring agents (Fluent Bit and VMAgents) to send logs and metrics. If tenant monitoring is enabled, data is sent to tenant storage; otherwise, it goes to root storage. | `false` |
|
||||
| `addons.monitoringAgents.valuesOverride` | Custom values to override | `{}` |
|
||||
| `addons.verticalPodAutoscaler.valuesOverride` | Custom values to override | `{}` |
|
||||
| `addons.velero.enabled` | Enable velero for backup and restore k8s cluster. | `false` |
|
||||
| `addons.velero.valuesOverride` | Custom values to override | `{}` |
|
||||
|
||||
### Kubernetes Control Plane Configuration
|
||||
|
||||
@@ -300,4 +319,3 @@ Specific characteristics of this series are:
|
||||
workload.
|
||||
- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4 starting from
|
||||
the medium size.
|
||||
|
||||
|
||||
@@ -3,9 +3,11 @@ ingress-nginx:
|
||||
fullnameOverride: ingress-nginx
|
||||
controller:
|
||||
kind: DaemonSet
|
||||
{{- if eq .Values.addons.ingressNginx.exposeMethod "Proxied" }}
|
||||
hostNetwork: true
|
||||
service:
|
||||
enabled: false
|
||||
{{- end }}
|
||||
{{- if not .Values.addons.certManager.enabled }}
|
||||
admissionWebhooks:
|
||||
certManager:
|
||||
|
||||
46
packages/apps/kubernetes/templates/helmreleases/velero.yaml
Normal file
46
packages/apps/kubernetes/templates/helmreleases/velero.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
{{- if .Values.addons.velero.enabled }}
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-velero
|
||||
labels:
|
||||
cozystack.io/repository: system
|
||||
cozystack.io/target-cluster-name: {{ .Release.Name }}
|
||||
spec:
|
||||
interval: 5m
|
||||
releaseName: velero
|
||||
chart:
|
||||
spec:
|
||||
chart: cozy-velero
|
||||
reconcileStrategy: Revision
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-system
|
||||
namespace: cozy-system
|
||||
version: '>= 0.0.0-0'
|
||||
kubeConfig:
|
||||
secretRef:
|
||||
name: {{ .Release.Name }}-admin-kubeconfig
|
||||
key: super-admin.svc
|
||||
targetNamespace: cozy-velero
|
||||
storageNamespace: cozy-velero
|
||||
install:
|
||||
createNamespace: true
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
remediation:
|
||||
retries: -1
|
||||
{{- with .Values.addons.velero.valuesOverride }}
|
||||
values:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
dependsOn:
|
||||
{{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
|
||||
- name: {{ .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
- name: {{ .Release.Name }}-cilium
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
@@ -1,6 +1,6 @@
|
||||
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
|
||||
{{- $ingress := index $myNS.metadata.annotations "namespace.cozystack.io/ingress" }}
|
||||
{{- if .Values.addons.ingressNginx.hosts }}
|
||||
{{- if and (eq .Values.addons.ingressNginx.exposeMethod "Proxied") .Values.addons.ingressNginx.hosts }}
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
|
||||
@@ -178,9 +178,18 @@
|
||||
"description": "Custom values to override",
|
||||
"default": {}
|
||||
},
|
||||
"exposeMethod": {
|
||||
"type": "string",
|
||||
"description": "Method to expose the Ingress-NGINX controller. (allowed values: Proxied, LoadBalancer)",
|
||||
"default": "Proxied",
|
||||
"enum": [
|
||||
"Proxied",
|
||||
"LoadBalancer"
|
||||
]
|
||||
},
|
||||
"hosts": {
|
||||
"type": "array",
|
||||
"description": "List of domain names that the parent cluster should route to this tenant cluster.",
|
||||
"description": "List of domain names that the parent cluster should route to this tenant cluster. Taken into account only when `exposeMethod` is set to `Proxied`.",
|
||||
"default": [],
|
||||
"items": {}
|
||||
}
|
||||
@@ -240,6 +249,21 @@
|
||||
"default": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"velero": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"description": "Enable velero for backup and restore k8s cluster.",
|
||||
"default": false
|
||||
},
|
||||
"valuesOverride": {
|
||||
"type": "object",
|
||||
"description": "Custom values to override",
|
||||
"default": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,12 +61,14 @@ addons:
|
||||
## @param addons.ingressNginx.valuesOverride Custom values to override
|
||||
##
|
||||
enabled: false
|
||||
## @param addons.ingressNginx.hosts List of domain names that the parent cluster should route to this tenant cluster.
|
||||
## @param addons.ingressNginx.exposeMethod Method to expose the Ingress-NGINX controller. (allowed values: Proxied, LoadBalancer)
|
||||
## @param addons.ingressNginx.hosts List of domain names that the parent cluster should route to this tenant cluster. Taken into account only when `exposeMethod` is set to `Proxied`.
|
||||
## e.g:
|
||||
## hosts:
|
||||
## - example.org
|
||||
## - foo.example.net
|
||||
##
|
||||
exposeMethod: Proxied
|
||||
hosts: []
|
||||
valuesOverride: {}
|
||||
|
||||
@@ -103,6 +105,15 @@ addons:
|
||||
##
|
||||
valuesOverride: {}
|
||||
|
||||
## Velero
|
||||
##
|
||||
velero:
|
||||
## @param addons.velero.enabled Enable velero for backup and restore k8s cluster.
|
||||
## @param addons.velero.valuesOverride Custom values to override
|
||||
##
|
||||
enabled: false
|
||||
valuesOverride: {}
|
||||
|
||||
## @section Kubernetes Control Plane Configuration
|
||||
##
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.8.1
|
||||
version: 0.8.2
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -5,6 +5,7 @@ include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
yq -i -o json --indent 4 '.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
|
||||
image:
|
||||
docker buildx build images/mariadb-backup \
|
||||
|
||||
@@ -61,7 +61,9 @@ spec:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: {{ $.Release.Name }}
|
||||
|
||||
{{- if and .Values.external (eq (int .Values.replicas) 1) }}
|
||||
type: LoadBalancer
|
||||
{{- end }}
|
||||
storage:
|
||||
size: {{ .Values.size }}
|
||||
resizeInUseVolumes: true
|
||||
@@ -70,7 +72,7 @@ spec:
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.external }}
|
||||
{{- if and .Values.external (gt (int .Values.replicas) 1) }}
|
||||
primaryService:
|
||||
type: LoadBalancer
|
||||
{{- end }}
|
||||
|
||||
@@ -75,7 +75,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
|
||||
"default": "nano"
|
||||
"default": "nano",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,3 +2,4 @@ include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
yq -i -o json --indent 4 '.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
|
||||
@@ -55,7 +55,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
|
||||
"default": "nano"
|
||||
"default": "nano",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,3 +2,4 @@ include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
yq -i -o json --indent 4 '.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
|
||||
@@ -125,7 +125,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
|
||||
"default": "micro"
|
||||
"default": "micro",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,3 +2,4 @@ include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
yq -i -o json --indent 4 '.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
|
||||
@@ -35,7 +35,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
|
||||
"default": "nano"
|
||||
"default": "nano",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,3 +2,4 @@ include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
yq -i -o json --indent 4 '.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
|
||||
@@ -35,7 +35,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
|
||||
"default": "nano"
|
||||
"default": "nano",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json.tmp -r README.md
|
||||
cat values.schema.json.tmp | jq '.properties.httpAndHttps.properties.mode.enum = ["tcp","tcp-with-proxy"]' > values.schema.json
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
yq -i -o json --indent 2 '.properties.httpAndHttps.properties.mode.enum = ["tcp","tcp-with-proxy"]' values.schema.json
|
||||
yq -i -o json --indent 2 '.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
rm -f values.schema.json.tmp
|
||||
|
||||
@@ -66,7 +66,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
|
||||
"default": "nano"
|
||||
"default": "nano",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ kafka 0.6.1 632224a3
|
||||
kafka 0.7.0 6358fd7a
|
||||
kafka 0.7.1 HEAD
|
||||
kubernetes 0.24.0 62cb694d
|
||||
kubernetes 0.24.2 HEAD
|
||||
kubernetes 0.25.0 HEAD
|
||||
mysql 0.1.0 263e47be
|
||||
mysql 0.2.0 c24a103f
|
||||
mysql 0.3.0 53f2365e
|
||||
@@ -63,7 +63,8 @@ mysql 0.6.0 93bdf411
|
||||
mysql 0.7.0 6130f43d
|
||||
mysql 0.7.1 632224a3
|
||||
mysql 0.8.0 62cb694d
|
||||
mysql 0.8.1 HEAD
|
||||
mysql 0.8.1 4369b031
|
||||
mysql 0.8.2 HEAD
|
||||
nats 0.1.0 e9716091
|
||||
nats 0.2.0 6c5cf5bf
|
||||
nats 0.3.0 78366f19
|
||||
|
||||
@@ -2,3 +2,4 @@ include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
yq -i -o json --indent 4 '.properties.resourcesPreset.enum = ["none", "nano", "micro", "small", "medium", "large", "xlarge", "2xlarge"]' values.schema.json
|
||||
|
||||
@@ -33,7 +33,17 @@
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Use a common resources preset when `resources` is not set explicitly. (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge)",
|
||||
"default": "nano"
|
||||
"default": "nano",
|
||||
"enum": [
|
||||
"none",
|
||||
"nano",
|
||||
"micro",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,3 +242,11 @@ releases:
|
||||
releaseName: reloader
|
||||
chart: cozy-reloader
|
||||
namespace: cozy-reloader
|
||||
|
||||
- name: velero
|
||||
releaseName: velero
|
||||
chart: cozy-velero
|
||||
namespace: cozy-velero
|
||||
privileged: true
|
||||
optional: true
|
||||
dependsOn: [cilium]
|
||||
|
||||
@@ -30,7 +30,6 @@ releases:
|
||||
releaseName: cozystack-controller
|
||||
chart: cozy-cozystack-controller
|
||||
namespace: cozy-system
|
||||
dependsOn: [cilium]
|
||||
{{- if eq (index $cozyConfig.data "telemetry-enabled") "false" }}
|
||||
values:
|
||||
cozystackController:
|
||||
@@ -165,3 +164,10 @@ releases:
|
||||
namespace: cozy-keycloak
|
||||
optional: true
|
||||
dependsOn: [keycloak]
|
||||
|
||||
- name: velero
|
||||
releaseName: velero
|
||||
chart: cozy-velero
|
||||
namespace: cozy-velero
|
||||
privileged: true
|
||||
optional: true
|
||||
|
||||
@@ -399,3 +399,11 @@ releases:
|
||||
releaseName: reloader
|
||||
chart: cozy-reloader
|
||||
namespace: cozy-reloader
|
||||
|
||||
- name: velero
|
||||
releaseName: velero
|
||||
chart: cozy-velero
|
||||
namespace: cozy-velero
|
||||
privileged: true
|
||||
optional: true
|
||||
dependsOn: [monitoring-agents]
|
||||
|
||||
@@ -230,3 +230,11 @@ releases:
|
||||
namespace: cozy-vertical-pod-autoscaler
|
||||
privileged: true
|
||||
dependsOn: []
|
||||
|
||||
- name: velero
|
||||
releaseName: velero
|
||||
chart: cozy-velero
|
||||
namespace: cozy-velero
|
||||
privileged: true
|
||||
optional: true
|
||||
dependsOn: [monitoring-agents]
|
||||
|
||||
@@ -15,7 +15,7 @@ help: ## Show this help.
|
||||
image: image-e2e-sandbox
|
||||
|
||||
image-e2e-sandbox:
|
||||
docker buildx build -f images/e2e-sandbox/Dockerfile ../../.. \
|
||||
docker buildx build -f images/e2e-sandbox/Dockerfile images/e2e-sandbox \
|
||||
--provenance false \
|
||||
--builder=$(BUILDER) \
|
||||
--platform=$(PLATFORM) \
|
||||
@@ -50,6 +50,11 @@ test-cluster: copy-nocloud-image copy-installer-manifest ## Run the end-to-end f
|
||||
test-apps-%:
|
||||
docker exec "${SANDBOX_NAME}" sh -c 'cd /workspace && hack/cozytest.sh hack/e2e-apps/$*.bats'
|
||||
|
||||
collect-report: ## Collect the test report from the sandbox.
|
||||
docker exec "${SANDBOX_NAME}" sh -c 'cd /workspace && hack/cozyreport.sh cozyreport'
|
||||
mkdir -p ../../../_out
|
||||
docker cp "${SANDBOX_NAME}:/workspace/cozyreport.tgz" ../../../_out/cozyreport.tgz
|
||||
|
||||
delete: ## Remove sandbox from existing Kubernetes cluster.
|
||||
docker rm -f "${SANDBOX_NAME}" || true
|
||||
|
||||
@@ -62,5 +67,5 @@ apply: delete
|
||||
-e TALOSCONFIG=/workspace/talosconfig \
|
||||
-e KUBECONFIG=/workspace/kubeconfig \
|
||||
"$$(yq .e2e.image values.yaml)" \
|
||||
sleep infinity
|
||||
--timeout 30m
|
||||
docker cp "${ROOT_DIR}" "${SANDBOX_NAME}":/workspace
|
||||
|
||||
@@ -9,7 +9,7 @@ ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
RUN apt update -q
|
||||
RUN apt install -yq --no-install-recommends genisoimage ca-certificates qemu-kvm qemu-utils iproute2 iptables wget xz-utils netcat curl jq make git
|
||||
RUN apt install -yq --no-install-recommends psmisc genisoimage ca-certificates qemu-kvm qemu-utils iproute2 iptables wget xz-utils netcat curl jq make git
|
||||
RUN curl -sSL "https://github.com/siderolabs/talos/releases/download/v${TALOSCTL_VERSION}/talosctl-${TARGETOS}-${TARGETARCH}" -o /usr/local/bin/talosctl \
|
||||
&& chmod +x /usr/local/bin/talosctl
|
||||
RUN curl -sSL "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/${TARGETOS}/${TARGETARCH}/kubectl" -o /usr/local/bin/kubectl \
|
||||
@@ -19,3 +19,6 @@ RUN curl -sSL "https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_${TA
|
||||
&& chmod +x /usr/local/bin/yq
|
||||
RUN curl -sSL "https://fluxcd.io/install.sh" | bash
|
||||
RUN curl -sSL "https://github.com/cozystack/cozypkg/raw/refs/heads/main/hack/install.sh" | sh -s -- -v "${COZYPKG_VERSION}"
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
||||
60
packages/core/testing/images/e2e-sandbox/entrypoint.sh
Executable file
60
packages/core/testing/images/e2e-sandbox/entrypoint.sh
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
SELF_PID="$$"
|
||||
INTERVAL=30m
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--timeout)
|
||||
INTERVAL="$2"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [--timeout SECONDS]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
check_once() {
|
||||
ALL_PROCS=$(ps -eo pid=,comm=)
|
||||
OWN_PIDS=$(pstree -p $$ | grep -o '[0-9]\+' | sort -u)
|
||||
|
||||
EXTERNAL_PIDS=$(
|
||||
echo "$ALL_PROCS" | while read -r PID CMD; do
|
||||
PID=$(echo "$PID" | tr -d ' ')
|
||||
CMD=$(echo "$CMD" | tr -d ' ')
|
||||
|
||||
echo "$OWN_PIDS" | grep -q -x "$PID" && continue
|
||||
|
||||
case "$CMD" in
|
||||
*qemu*|ps) continue ;;
|
||||
esac
|
||||
|
||||
echo "PID=$PID CMD=$CMD"
|
||||
done
|
||||
)
|
||||
|
||||
COUNT=$(echo "$EXTERNAL_PIDS" | wc -w)
|
||||
echo "$EXTERNAL_PIDS"
|
||||
[ "$COUNT" -eq 0 ]
|
||||
}
|
||||
|
||||
check_loop() {
|
||||
while :; do
|
||||
ALL_PROCS=$(ps -eo pid=,ppid=,comm=)
|
||||
|
||||
if check_once; then
|
||||
echo "No external processes, exiting..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "External processes still running, next check in ${INTERVAL}..."
|
||||
sleep "$INTERVAL"
|
||||
done
|
||||
}
|
||||
|
||||
echo "Waiting for external processes to be started, next check in ${INTERVAL}..."
|
||||
sleep "$INTERVAL"
|
||||
check_loop
|
||||
@@ -1,2 +1,2 @@
|
||||
e2e:
|
||||
image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.32.1@sha256:b15f85e58be54529d74ab7056d5d47960944abde28f14611e88156989a19c789
|
||||
image: ghcr.io/cozystack/cozystack/e2e-sandbox:latest@sha256:df79b508c45ab11f728dfb12b5b984c04f64ea5c26cf239095913aa7fc9f73aa
|
||||
|
||||
@@ -3,4 +3,4 @@ name: etcd
|
||||
description: Storage for Kubernetes clusters
|
||||
icon: /logos/etcd.svg
|
||||
type: application
|
||||
version: 2.8.0
|
||||
version: 2.9.0
|
||||
|
||||
@@ -6,9 +6,7 @@ metadata:
|
||||
spec:
|
||||
driver: etcd
|
||||
endpoints:
|
||||
{{- range $i := until (int $.Values.replicas) }}
|
||||
- etcd-{{ $i }}.etcd-headless.{{ $.Release.Namespace }}.svc:2379
|
||||
{{- end }}
|
||||
- etcd.{{ $.Release.Namespace }}.svc:2379
|
||||
tlsConfig:
|
||||
certificateAuthority:
|
||||
certificate:
|
||||
@@ -47,4 +45,4 @@ metadata:
|
||||
name: etcd-client-tls
|
||||
annotations:
|
||||
helm.sh/hook: pre-install
|
||||
helm.sh/resource-policy: keep
|
||||
helm.sh/resource-policy: keep
|
||||
|
||||
@@ -47,7 +47,7 @@ spec:
|
||||
containerPort: 2381
|
||||
protocol: TCP
|
||||
{{- with .Values.resources }}
|
||||
resources: {{- toYaml . | nindent 10 }}
|
||||
resources: {{- include "cozy-lib.resources.sanitize" (list . $) | nindent 10 }}
|
||||
{{- end }}
|
||||
topologySpreadConstraints:
|
||||
- maxSkew: 1
|
||||
@@ -152,6 +152,8 @@ spec:
|
||||
- "signing"
|
||||
- "key encipherment"
|
||||
dnsNames:
|
||||
- etcd
|
||||
- etcd.{{ $.Release.Namespace }}.svc
|
||||
{{- range $i := until (int $.Values.replicas) }}
|
||||
- etcd-{{ $i }}
|
||||
- etcd-{{ $i }}.etcd-headless
|
||||
@@ -186,6 +188,8 @@ spec:
|
||||
- "signing"
|
||||
- "key encipherment"
|
||||
dnsNames:
|
||||
- etcd
|
||||
- etcd.{{ $.Release.Namespace }}.svc
|
||||
{{- range $i := until (int $.Values.replicas) }}
|
||||
- etcd-{{ $i }}
|
||||
- etcd-{{ $i }}.etcd-headless
|
||||
|
||||
@@ -10,9 +10,5 @@ replicas: 3
|
||||
|
||||
## @param resources Resources
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 512Mi
|
||||
cpu: 4
|
||||
memory: 1Gi
|
||||
|
||||
@@ -3,4 +3,4 @@ name: monitoring
|
||||
description: Monitoring and observability stack
|
||||
icon: /logos/monitoring.svg
|
||||
type: application
|
||||
version: 1.11.0
|
||||
version: 1.12.0
|
||||
|
||||
@@ -104,7 +104,8 @@ spec:
|
||||
secretKeyRef:
|
||||
name: alerta-db-app
|
||||
key: uri
|
||||
|
||||
- name: SIGNUP_ENABLED
|
||||
value: "False"
|
||||
- name: AUTH_REQUIRED
|
||||
value: "True"
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ etcd 2.5.0 24fa7222
|
||||
etcd 2.6.0 8c460528
|
||||
etcd 2.6.1 45a7416c
|
||||
etcd 2.7.0 632224a3
|
||||
etcd 2.8.0 HEAD
|
||||
etcd 2.8.0 4369b031
|
||||
etcd 2.9.0 HEAD
|
||||
info 1.0.0 93bdf411
|
||||
info 1.0.1 632224a3
|
||||
info 1.1.0 HEAD
|
||||
@@ -45,7 +46,8 @@ monitoring 1.9.1 fd240701
|
||||
monitoring 1.9.2 f9f8bb2f
|
||||
monitoring 1.10.0 632224a3
|
||||
monitoring 1.10.1 8c86905b
|
||||
monitoring 1.11.0 HEAD
|
||||
monitoring 1.11.0 4369b031
|
||||
monitoring 1.12.0 HEAD
|
||||
seaweedfs 0.1.0 71514249
|
||||
seaweedfs 0.2.0 5fb9cfe3
|
||||
seaweedfs 0.2.1 fde4bcfa
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export NAME=capi-providers
|
||||
export NAME=capi-providers-bootstrap
|
||||
export NAMESPACE=cozy-cluster-api
|
||||
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export NAME=capi-providers
|
||||
export NAME=capi-providers-core
|
||||
export NAMESPACE=cozy-cluster-api
|
||||
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export NAME=capi-providers
|
||||
export NAME=capi-providers-cpprovider
|
||||
export NAMESPACE=cozy-cluster-api
|
||||
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export NAME=capi-providers
|
||||
export NAME=capi-providers-infraprovider
|
||||
export NAMESPACE=cozy-cluster-api
|
||||
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
@@ -7,8 +7,6 @@ ingress:
|
||||
nginx.ingress.kubernetes.io/session-cookie-max-age: "86400"
|
||||
nginx.ingress.kubernetes.io/session-cookie-name: "keycloak-cookie"
|
||||
resources:
|
||||
limits:
|
||||
memory: 1500Mi
|
||||
requests:
|
||||
memory: 500Mi
|
||||
cpu: 100m
|
||||
|
||||
3
packages/system/velero/Chart.yaml
Normal file
3
packages/system/velero/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
apiVersion: v2
|
||||
name: cozy-velero
|
||||
version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process
|
||||
11
packages/system/velero/Makefile
Normal file
11
packages/system/velero/Makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
export NAME=velero
|
||||
export NAMESPACE=cozy-$(NAME)
|
||||
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
update:
|
||||
rm -rf charts
|
||||
# Velero
|
||||
helm repo add tanzu https://vmware-tanzu.github.io/helm-charts
|
||||
helm repo update tanzu
|
||||
helm pull tanzu/velero --untar --untardir charts
|
||||
21
packages/system/velero/charts/velero/.helmignore
Normal file
21
packages/system/velero/charts/velero/.helmignore
Normal file
@@ -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
|
||||
17
packages/system/velero/charts/velero/Chart.yaml
Normal file
17
packages/system/velero/charts/velero/Chart.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: v2
|
||||
appVersion: 1.16.1
|
||||
description: A Helm chart for velero
|
||||
home: https://github.com/vmware-tanzu/velero
|
||||
icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
maintainers:
|
||||
- email: hsiaoairplane@gmail.com
|
||||
name: jenting
|
||||
- email: jiangd@vmware.com
|
||||
name: reasonerjt
|
||||
- email: yinw@vmware.com
|
||||
name: ywk253100
|
||||
name: velero
|
||||
sources:
|
||||
- https://github.com/vmware-tanzu/velero
|
||||
version: 10.0.5
|
||||
8
packages/system/velero/charts/velero/OWNERS
Normal file
8
packages/system/velero/charts/velero/OWNERS
Normal file
@@ -0,0 +1,8 @@
|
||||
approvers:
|
||||
- jenting
|
||||
- reasonerjt
|
||||
- ywk253100
|
||||
reviewers:
|
||||
- jenting
|
||||
- reasonerjt
|
||||
- ywk253100
|
||||
181
packages/system/velero/charts/velero/README.md
Normal file
181
packages/system/velero/charts/velero/README.md
Normal file
@@ -0,0 +1,181 @@
|
||||
# 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.13/basic-install/#install-the-cli).
|
||||
|
||||
## Installing the Velero server
|
||||
|
||||
### Installation Requirements
|
||||
|
||||
Kubernetes v1.16+, because this helm chart uses CustomResourceDefinition `apiextensions.k8s.io/v1`. This API version was introduced in Kubernetes v1.16.
|
||||
|
||||
### Velero version
|
||||
|
||||
This helm chart installs Velero version v1.16 https://velero.io/docs/v1.16/. See the [#Upgrading](#upgrading) section for information on how to upgrade from other versions.
|
||||
|
||||
### 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.
|
||||
|
||||
### Azure resources
|
||||
|
||||
When using the Azure plug-in, requests and limits must be set. See https://github.com/vmware-tanzu/velero/issues/3234 and https://github.com/vmware-tanzu/helm-charts/issues/469 for details.
|
||||
|
||||
### Installing
|
||||
|
||||
The default configuration values for this chart are listed in values.yaml.
|
||||
|
||||
See Velero's full [official documentation](https://velero.io/docs/v1.13/basic-install/). More specifically, find your provider in the Velero list of [supported providers](https://velero.io/docs/v1.13/supported-providers/) for specific configuration information and examples.
|
||||
|
||||
#### Set up Helm
|
||||
|
||||
See the main [README.md](https://github.com/vmware-tanzu/helm-charts#kubernetes-helm-charts-for-vmware-tanzu).
|
||||
|
||||
#### Using Helm 3
|
||||
|
||||
##### Option 1) CLI commands
|
||||
|
||||
Note: You may add the flag `--set cleanUpCRDs=true` if you want to delete the Velero CRDs after deleting a release.
|
||||
Please note that cleaning up CRDs will also delete any CRD instance, such as BackupStorageLocation and VolumeSnapshotLocation, which would have to be reconfigured when reinstalling Velero. The backup data in object storage will not be deleted, even though the backup instances in the cluster will.
|
||||
|
||||
Specify the necessary values using the --set key=value[,key=value] argument to helm install. For example,
|
||||
|
||||
```bash
|
||||
helm install velero vmware-tanzu/velero \
|
||||
--namespace <YOUR NAMESPACE> \
|
||||
--create-namespace \
|
||||
--set-file credentials.secretContents.cloud=<FULL PATH TO FILE> \
|
||||
--set configuration.backupStorageLocation[0].name=<BACKUP STORAGE LOCATION NAME> \
|
||||
--set configuration.backupStorageLocation[0].provider=<PROVIDER NAME> \
|
||||
--set configuration.backupStorageLocation[0].bucket=<BUCKET NAME> \
|
||||
--set configuration.backupStorageLocation[0].config.region=<REGION> \
|
||||
--set configuration.volumeSnapshotLocation[0].name=<VOLUME SNAPSHOT LOCATION NAME> \
|
||||
--set configuration.volumeSnapshotLocation[0].provider=<PROVIDER NAME> \
|
||||
--set configuration.volumeSnapshotLocation[0].config.region=<REGION> \
|
||||
--set initContainers[0].name=velero-plugin-for-<PROVIDER NAME> \
|
||||
--set initContainers[0].image=velero/velero-plugin-for-<PROVIDER NAME>:<PROVIDER PLUGIN TAG> \
|
||||
--set initContainers[0].volumeMounts[0].mountPath=/target \
|
||||
--set initContainers[0].volumeMounts[0].name=plugins
|
||||
```
|
||||
|
||||
Users of zsh might need to put quotes around key/value pairs.
|
||||
|
||||
##### Option 2) YAML file
|
||||
|
||||
Add/update the necessary values by changing the values.yaml from this repository, then run:
|
||||
|
||||
```bash
|
||||
helm install vmware-tanzu/velero --namespace <YOUR NAMESPACE> -f values.yaml --generate-name
|
||||
```
|
||||
##### 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> vmware-tanzu/velero --namespace <YOUR NAMESPACE> --reuse-values --set configuration.backupStorageLocation[0].provider=<NEW PROVIDER>
|
||||
```
|
||||
|
||||
#### Using Helm 2
|
||||
|
||||
We're no longer supporting Helm v2 since it was deprecated in November 2020.
|
||||
|
||||
##### 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 vmware-tanzu/velero <RELEASE NAME> --reuse-values --set configuration.backupStorageLocation[0].provider=<NEW PROVIDER>
|
||||
```
|
||||
## Upgrading Chart
|
||||
|
||||
### Upgrading to 7.0.0
|
||||
|
||||
Delete the CSI plugin. Because the Velero CSI plugin is already merged into the Velero, need to remove the existing CSI plugin InitContainer. Otherwise, the Velero server plugin would fail to start due to same plugin registered twice.
|
||||
CSI plugin has been merged into velero repo in v1.14 release. It will be installed by default as an internal plugin.
|
||||
|
||||
### Upgrading to 6.0.0
|
||||
|
||||
This version removes the `nodeAgent.privileged` field, you should use `nodeAgent.containerSecurityContext.privileged` instead
|
||||
|
||||
## Upgrading Velero
|
||||
|
||||
### Upgrading to v1.16
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.16/upgrade-to-1.16/) will assist you in upgrading from version v1.15.x to v1.16.
|
||||
|
||||
### Upgrading to v1.15
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.15/upgrade-to-1.15/) will assist you in upgrading from version v1.14.x to v1.15.
|
||||
|
||||
### Upgrading to v1.14
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.14/upgrade-to-1.14/) will assist you in upgrading from version v1.13.x to v1.14.
|
||||
|
||||
### Upgrading to v1.13
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.13/upgrade-to-1.13/) will assist you in upgrading from version v1.12.x to v1.13.
|
||||
|
||||
### Upgrading to v1.12
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.12/upgrade-to-1.12/) will assist you in upgrading from version v1.11.x to v1.12.
|
||||
|
||||
### Upgrading to v1.11
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.11/upgrade-to-1.11/) will assist you in upgrading from version v1.10.x to v1.11.
|
||||
|
||||
### Upgrading to v1.10
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.10/upgrade-to-1.10/) will assist you in upgrading from version v1.9.x to v1.10.
|
||||
|
||||
### Upgrading to v1.9
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.9/upgrade-to-1.9/) will assist you in upgrading from version v1.8.x to v1.9.
|
||||
|
||||
### Upgrading to v1.8
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.8/upgrade-to-1.8/) will assist you in upgrading from version v1.7.x to v1.8.
|
||||
|
||||
### Upgrading to v1.7
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.7/upgrade-to-1.7/) will assist you in upgrading from version v1.6.x to v1.7.
|
||||
|
||||
### Upgrading to v1.6
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.6/upgrade-to-1.6/) will assist you in upgrading from version v1.5.x to v1.6.
|
||||
|
||||
### Upgrading to v1.5
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.5/upgrade-to-1.5/) will assist you in upgrading from version v1.4.x to v1.5.
|
||||
|
||||
### Upgrading to v1.4
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.4/upgrade-to-1.4/) will assist you in upgrading from version v1.3.x to v1.4.
|
||||
|
||||
### Upgrading to v1.3.1
|
||||
|
||||
The [instructions found here](https://velero.io/docs/v1.3.1/upgrade-to-1.3/) will assist you in upgrading from version v1.2.0 or v1.3.0 to v1.3.1.
|
||||
|
||||
### 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.
|
||||
|
||||
### Using Helm 3
|
||||
|
||||
```bash
|
||||
helm uninstall <RELEASE NAME> -n <YOUR NAMESPACE>
|
||||
```
|
||||
### Note
|
||||
Since from velero v1.10.0, it has supported both Restic and Kopia to do file-system level backup and restore, some configuration that contains the keyword Restic is not suitable anymore, which means from chart version 3.0.0 is not backward compatible, and we've done a configure filed name validation.
|
||||
119
packages/system/velero/charts/velero/ci/test-values.yaml
Normal file
119
packages/system/velero/charts/velero/ci/test-values.yaml
Normal file
@@ -0,0 +1,119 @@
|
||||
# Set provider name and backup storage location bucket name
|
||||
configuration:
|
||||
backupStorageLocation:
|
||||
- name: default
|
||||
bucket: velero-backups
|
||||
default: true
|
||||
provider: aws
|
||||
credential:
|
||||
name: test-credential
|
||||
key: test-key
|
||||
config:
|
||||
region: us-east-1
|
||||
profile: us-east-1-profile
|
||||
- name: backups-secondary
|
||||
bucket: velero-backups
|
||||
provider: aws
|
||||
config:
|
||||
region: us-west-1
|
||||
profile: us-west-1-profile
|
||||
volumeSnapshotLocation:
|
||||
- name: ebs-us-east-1
|
||||
provider: aws
|
||||
config:
|
||||
region: us-east-1
|
||||
- name: portworx-cloud
|
||||
provider: portworx
|
||||
config:
|
||||
type: cloud
|
||||
|
||||
schedules:
|
||||
mybackup:
|
||||
labels:
|
||||
myenv: foo
|
||||
schedule: "0 0 * * *"
|
||||
template:
|
||||
ttl: "240h"
|
||||
includedNamespaces:
|
||||
- foo
|
||||
|
||||
# Set a service account so that the CRD clean up job has proper permissions to delete CRDs
|
||||
serviceAccount:
|
||||
server:
|
||||
name: velero
|
||||
|
||||
# The Velero server
|
||||
# Annotations to Velero deployment
|
||||
annotations:
|
||||
annotation: velero
|
||||
foo: bar
|
||||
|
||||
# Labels to Velero deployment
|
||||
labels:
|
||||
label: velero
|
||||
foo: bar
|
||||
|
||||
# Annotations to Velero deployment's template
|
||||
podAnnotations:
|
||||
pod-annotation: velero
|
||||
foo: bar
|
||||
|
||||
# Labels to Velero deployment's template
|
||||
podLabels:
|
||||
pod-label: velero
|
||||
foo: bar
|
||||
|
||||
# Resources to Velero deployment
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
|
||||
# The node-agent daemonset
|
||||
deployNodeAgent: true
|
||||
|
||||
nodeAgent:
|
||||
# Annotations to node-agent daemonset
|
||||
annotations:
|
||||
annotation: node-agent
|
||||
foo: bar
|
||||
# Labels to node-agent daemonset
|
||||
labels:
|
||||
label: node-agent
|
||||
foo: bar
|
||||
# Resources to node-agent daemonset
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
|
||||
# The kubectl upgrade/cleanup job
|
||||
kubectl:
|
||||
# Annotations to kubectl job
|
||||
annotations:
|
||||
annotation: kubectl
|
||||
foo: bar
|
||||
# Labels to kubectl job
|
||||
labels:
|
||||
label: kubectl
|
||||
foo: bar
|
||||
# Resources to kubectl job
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
|
||||
# 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
|
||||
@@ -0,0 +1,141 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: backuprepositories.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: BackupRepository
|
||||
listKind: BackupRepositoryList
|
||||
plural: backuprepositories
|
||||
singular: backuprepository
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
- jsonPath: .spec.repositoryType
|
||||
name: Repository Type
|
||||
type: string
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: BackupRepositorySpec is the specification for a BackupRepository.
|
||||
properties:
|
||||
backupStorageLocation:
|
||||
description: |-
|
||||
BackupStorageLocation is the name of the BackupStorageLocation
|
||||
that should contain this repository.
|
||||
type: string
|
||||
maintenanceFrequency:
|
||||
description: MaintenanceFrequency is how often maintenance should
|
||||
be run.
|
||||
type: string
|
||||
repositoryConfig:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: RepositoryConfig is for repository-specific configuration
|
||||
fields.
|
||||
nullable: true
|
||||
type: object
|
||||
repositoryType:
|
||||
description: RepositoryType indicates the type of the backend repository
|
||||
enum:
|
||||
- kopia
|
||||
- restic
|
||||
- ""
|
||||
type: string
|
||||
resticIdentifier:
|
||||
description: |-
|
||||
ResticIdentifier is the full restic-compatible string for identifying
|
||||
this repository.
|
||||
type: string
|
||||
volumeNamespace:
|
||||
description: |-
|
||||
VolumeNamespace is the namespace this backup repository contains
|
||||
pod volume backups for.
|
||||
type: string
|
||||
required:
|
||||
- backupStorageLocation
|
||||
- maintenanceFrequency
|
||||
- resticIdentifier
|
||||
- volumeNamespace
|
||||
type: object
|
||||
status:
|
||||
description: BackupRepositoryStatus is the current status of a BackupRepository.
|
||||
properties:
|
||||
lastMaintenanceTime:
|
||||
description: LastMaintenanceTime is the last time repo maintenance
|
||||
succeeded.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
message:
|
||||
description: Message is a message about the current status of the
|
||||
BackupRepository.
|
||||
type: string
|
||||
phase:
|
||||
description: Phase is the current state of the BackupRepository.
|
||||
enum:
|
||||
- New
|
||||
- Ready
|
||||
- NotReady
|
||||
type: string
|
||||
recentMaintenance:
|
||||
description: RecentMaintenance is status of the recent repo maintenance.
|
||||
items:
|
||||
properties:
|
||||
completeTimestamp:
|
||||
description: CompleteTimestamp is the completion time of the
|
||||
repo maintenance.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
message:
|
||||
description: Message is a message about the current status
|
||||
of the repo maintenance.
|
||||
type: string
|
||||
result:
|
||||
description: Result is the result of the repo maintenance.
|
||||
enum:
|
||||
- Succeeded
|
||||
- Failed
|
||||
type: string
|
||||
startTimestamp:
|
||||
description: StartTimestamp is the start time of the repo
|
||||
maintenance.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
670
packages/system/velero/charts/velero/crds/backups.yaml
Normal file
670
packages/system/velero/charts/velero/crds/backups.yaml
Normal file
@@ -0,0 +1,670 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: backups.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: Backup
|
||||
listKind: BackupList
|
||||
plural: backups
|
||||
singular: backup
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
Backup is a Velero resource that represents the capture of Kubernetes
|
||||
cluster state at a point in time (API objects and associated volume state).
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: BackupSpec defines the specification for a Velero backup.
|
||||
properties:
|
||||
csiSnapshotTimeout:
|
||||
description: |-
|
||||
CSISnapshotTimeout specifies the time used to wait for CSI VolumeSnapshot status turns to
|
||||
ReadyToUse during creation, before returning error as timeout.
|
||||
The default value is 10 minute.
|
||||
type: string
|
||||
datamover:
|
||||
description: |-
|
||||
DataMover specifies the data mover to be used by the backup.
|
||||
If DataMover is "" or "velero", the built-in data mover will be used.
|
||||
type: string
|
||||
defaultVolumesToFsBackup:
|
||||
description: |-
|
||||
DefaultVolumesToFsBackup specifies whether pod volume file system backup should be used
|
||||
for all volumes by default.
|
||||
nullable: true
|
||||
type: boolean
|
||||
defaultVolumesToRestic:
|
||||
description: |-
|
||||
DefaultVolumesToRestic specifies whether restic should be used to take a
|
||||
backup of all pod volumes by default.
|
||||
|
||||
Deprecated: this field is no longer used and will be removed entirely in future. Use DefaultVolumesToFsBackup instead.
|
||||
nullable: true
|
||||
type: boolean
|
||||
excludedClusterScopedResources:
|
||||
description: |-
|
||||
ExcludedClusterScopedResources is a slice of cluster-scoped
|
||||
resource type names to exclude from the backup.
|
||||
If set to "*", all cluster-scoped resource types are excluded.
|
||||
The default value is empty.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
excludedNamespaceScopedResources:
|
||||
description: |-
|
||||
ExcludedNamespaceScopedResources is a slice of namespace-scoped
|
||||
resource type names to exclude from the backup.
|
||||
If set to "*", all namespace-scoped resource types are excluded.
|
||||
The default value is empty.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
excludedNamespaces:
|
||||
description: |-
|
||||
ExcludedNamespaces contains a list of namespaces that are not
|
||||
included in the backup.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
excludedResources:
|
||||
description: |-
|
||||
ExcludedResources is a slice of resource names that are not
|
||||
included in the backup.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
hooks:
|
||||
description: Hooks represent custom behaviors that should be executed
|
||||
at different phases of the backup.
|
||||
properties:
|
||||
resources:
|
||||
description: Resources are hooks that should be executed when
|
||||
backing up individual instances of a resource.
|
||||
items:
|
||||
description: |-
|
||||
BackupResourceHookSpec defines one or more BackupResourceHooks that should be executed based on
|
||||
the rules defined for namespaces, resources, and label selector.
|
||||
properties:
|
||||
excludedNamespaces:
|
||||
description: ExcludedNamespaces specifies the namespaces
|
||||
to which this hook spec does not apply.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
excludedResources:
|
||||
description: ExcludedResources specifies the resources
|
||||
to which this hook spec does not apply.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedNamespaces:
|
||||
description: |-
|
||||
IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies
|
||||
to all namespaces.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedResources:
|
||||
description: |-
|
||||
IncludedResources specifies the resources to which this hook spec applies. If empty, it applies
|
||||
to all resources.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
labelSelector:
|
||||
description: LabelSelector, if specified, filters the
|
||||
resources to which this hook spec applies.
|
||||
nullable: true
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector
|
||||
requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector
|
||||
applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
name:
|
||||
description: Name is the name of this hook.
|
||||
type: string
|
||||
post:
|
||||
description: |-
|
||||
PostHooks is a list of BackupResourceHooks to execute after storing the item in the backup.
|
||||
These are executed after all "additional items" from item actions are processed.
|
||||
items:
|
||||
description: BackupResourceHook defines a hook for a
|
||||
resource.
|
||||
properties:
|
||||
exec:
|
||||
description: Exec defines an exec hook.
|
||||
properties:
|
||||
command:
|
||||
description: Command is the command and arguments
|
||||
to execute.
|
||||
items:
|
||||
type: string
|
||||
minItems: 1
|
||||
type: array
|
||||
container:
|
||||
description: |-
|
||||
Container is the container in the pod where the command should be executed. If not specified,
|
||||
the pod's first container is used.
|
||||
type: string
|
||||
onError:
|
||||
description: OnError specifies how Velero should
|
||||
behave if it encounters an error executing
|
||||
this hook.
|
||||
enum:
|
||||
- Continue
|
||||
- Fail
|
||||
type: string
|
||||
timeout:
|
||||
description: |-
|
||||
Timeout defines the maximum amount of time Velero should wait for the hook to complete before
|
||||
considering the execution a failure.
|
||||
type: string
|
||||
required:
|
||||
- command
|
||||
type: object
|
||||
required:
|
||||
- exec
|
||||
type: object
|
||||
type: array
|
||||
pre:
|
||||
description: |-
|
||||
PreHooks is a list of BackupResourceHooks to execute prior to storing the item in the backup.
|
||||
These are executed before any "additional items" from item actions are processed.
|
||||
items:
|
||||
description: BackupResourceHook defines a hook for a
|
||||
resource.
|
||||
properties:
|
||||
exec:
|
||||
description: Exec defines an exec hook.
|
||||
properties:
|
||||
command:
|
||||
description: Command is the command and arguments
|
||||
to execute.
|
||||
items:
|
||||
type: string
|
||||
minItems: 1
|
||||
type: array
|
||||
container:
|
||||
description: |-
|
||||
Container is the container in the pod where the command should be executed. If not specified,
|
||||
the pod's first container is used.
|
||||
type: string
|
||||
onError:
|
||||
description: OnError specifies how Velero should
|
||||
behave if it encounters an error executing
|
||||
this hook.
|
||||
enum:
|
||||
- Continue
|
||||
- Fail
|
||||
type: string
|
||||
timeout:
|
||||
description: |-
|
||||
Timeout defines the maximum amount of time Velero should wait for the hook to complete before
|
||||
considering the execution a failure.
|
||||
type: string
|
||||
required:
|
||||
- command
|
||||
type: object
|
||||
required:
|
||||
- exec
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
nullable: true
|
||||
type: array
|
||||
type: object
|
||||
includeClusterResources:
|
||||
description: |-
|
||||
IncludeClusterResources specifies whether cluster-scoped resources
|
||||
should be included for consideration in the backup.
|
||||
nullable: true
|
||||
type: boolean
|
||||
includedClusterScopedResources:
|
||||
description: |-
|
||||
IncludedClusterScopedResources is a slice of cluster-scoped
|
||||
resource type names to include in the backup.
|
||||
If set to "*", all cluster-scoped resource types are included.
|
||||
The default value is empty, which means only related
|
||||
cluster-scoped resources are included.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedNamespaceScopedResources:
|
||||
description: |-
|
||||
IncludedNamespaceScopedResources is a slice of namespace-scoped
|
||||
resource type names to include in the backup.
|
||||
The default value is "*".
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedNamespaces:
|
||||
description: |-
|
||||
IncludedNamespaces is a slice of namespace names to include objects
|
||||
from. If empty, all namespaces are included.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedResources:
|
||||
description: |-
|
||||
IncludedResources is a slice of resource names to include
|
||||
in the backup. If empty, all resources are included.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
itemOperationTimeout:
|
||||
description: |-
|
||||
ItemOperationTimeout specifies the time used to wait for asynchronous BackupItemAction operations
|
||||
The default value is 4 hour.
|
||||
type: string
|
||||
labelSelector:
|
||||
description: |-
|
||||
LabelSelector is a metav1.LabelSelector to filter with
|
||||
when adding individual objects to the backup. If empty
|
||||
or nil, all objects are included. Optional.
|
||||
nullable: true
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
metadata:
|
||||
properties:
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
orLabelSelectors:
|
||||
description: |-
|
||||
OrLabelSelectors is list of metav1.LabelSelector to filter with
|
||||
when adding individual objects to the backup. If multiple provided
|
||||
they will be joined by the OR operator. LabelSelector as well as
|
||||
OrLabelSelectors cannot co-exist in backup request, only one of them
|
||||
can be used.
|
||||
items:
|
||||
description: |-
|
||||
A label selector is a label query over a set of resources. The result of matchLabels and
|
||||
matchExpressions are ANDed. An empty label selector matches all objects. A null
|
||||
label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector
|
||||
requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector
|
||||
applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
nullable: true
|
||||
type: array
|
||||
orderedResources:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
OrderedResources specifies the backup order of resources of specific Kind.
|
||||
The map key is the resource name and value is a list of object names separated by commas.
|
||||
Each resource name has format "namespace/objectname". For cluster resources, simply use "objectname".
|
||||
nullable: true
|
||||
type: object
|
||||
resourcePolicy:
|
||||
description: ResourcePolicy specifies the referenced resource policies
|
||||
that backup should follow
|
||||
properties:
|
||||
apiGroup:
|
||||
description: |-
|
||||
APIGroup is the group for the resource being referenced.
|
||||
If APIGroup is not specified, the specified Kind must be in the core API group.
|
||||
For any other third-party types, APIGroup is required.
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is the type of resource being referenced
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of resource being referenced
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
snapshotMoveData:
|
||||
description: SnapshotMoveData specifies whether snapshot data should
|
||||
be moved
|
||||
nullable: true
|
||||
type: boolean
|
||||
snapshotVolumes:
|
||||
description: |-
|
||||
SnapshotVolumes specifies whether to take snapshots
|
||||
of any PV's referenced in the set of objects included
|
||||
in the Backup.
|
||||
nullable: true
|
||||
type: boolean
|
||||
storageLocation:
|
||||
description: StorageLocation is a string containing the name of
|
||||
a BackupStorageLocation where the backup should be stored.
|
||||
type: string
|
||||
ttl:
|
||||
description: |-
|
||||
TTL is a time.Duration-parseable string describing how long
|
||||
the Backup should be retained for.
|
||||
type: string
|
||||
uploaderConfig:
|
||||
description: UploaderConfig specifies the configuration for the
|
||||
uploader.
|
||||
nullable: true
|
||||
properties:
|
||||
parallelFilesUpload:
|
||||
description: ParallelFilesUpload is the number of files parallel
|
||||
uploads to perform when using the uploader.
|
||||
type: integer
|
||||
type: object
|
||||
volumeSnapshotLocations:
|
||||
description: VolumeSnapshotLocations is a list containing names
|
||||
of VolumeSnapshotLocations associated with this backup.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
status:
|
||||
description: BackupStatus captures the current status of a Velero backup.
|
||||
properties:
|
||||
backupItemOperationsAttempted:
|
||||
description: |-
|
||||
BackupItemOperationsAttempted is the total number of attempted
|
||||
async BackupItemAction operations for this backup.
|
||||
type: integer
|
||||
backupItemOperationsCompleted:
|
||||
description: |-
|
||||
BackupItemOperationsCompleted is the total number of successfully completed
|
||||
async BackupItemAction operations for this backup.
|
||||
type: integer
|
||||
backupItemOperationsFailed:
|
||||
description: |-
|
||||
BackupItemOperationsFailed is the total number of async
|
||||
BackupItemAction operations for this backup which ended with an error.
|
||||
type: integer
|
||||
completionTimestamp:
|
||||
description: |-
|
||||
CompletionTimestamp records the time a backup was completed.
|
||||
Completion time is recorded even on failed backups.
|
||||
Completion time is recorded before uploading the backup object.
|
||||
The server's time is used for CompletionTimestamps
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
csiVolumeSnapshotsAttempted:
|
||||
description: |-
|
||||
CSIVolumeSnapshotsAttempted is the total number of attempted
|
||||
CSI VolumeSnapshots for this backup.
|
||||
type: integer
|
||||
csiVolumeSnapshotsCompleted:
|
||||
description: |-
|
||||
CSIVolumeSnapshotsCompleted is the total number of successfully
|
||||
completed CSI VolumeSnapshots for this backup.
|
||||
type: integer
|
||||
errors:
|
||||
description: |-
|
||||
Errors is a count of all error messages that were generated during
|
||||
execution of the backup. The actual errors are in the backup's log
|
||||
file in object storage.
|
||||
type: integer
|
||||
expiration:
|
||||
description: Expiration is when this Backup is eligible for garbage-collection.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
failureReason:
|
||||
description: FailureReason is an error that caused the entire backup
|
||||
to fail.
|
||||
type: string
|
||||
formatVersion:
|
||||
description: FormatVersion is the backup format version, including
|
||||
major, minor, and patch version.
|
||||
type: string
|
||||
hookStatus:
|
||||
description: HookStatus contains information about the status of
|
||||
the hooks.
|
||||
nullable: true
|
||||
properties:
|
||||
hooksAttempted:
|
||||
description: |-
|
||||
HooksAttempted is the total number of attempted hooks
|
||||
Specifically, HooksAttempted represents the number of hooks that failed to execute
|
||||
and the number of hooks that executed successfully.
|
||||
type: integer
|
||||
hooksFailed:
|
||||
description: HooksFailed is the total number of hooks which
|
||||
ended with an error
|
||||
type: integer
|
||||
type: object
|
||||
phase:
|
||||
description: Phase is the current state of the Backup.
|
||||
enum:
|
||||
- New
|
||||
- FailedValidation
|
||||
- InProgress
|
||||
- WaitingForPluginOperations
|
||||
- WaitingForPluginOperationsPartiallyFailed
|
||||
- Finalizing
|
||||
- FinalizingPartiallyFailed
|
||||
- Completed
|
||||
- PartiallyFailed
|
||||
- Failed
|
||||
- Deleting
|
||||
type: string
|
||||
progress:
|
||||
description: |-
|
||||
Progress contains information about the backup's execution progress. Note
|
||||
that this information is best-effort only -- if Velero fails to update it
|
||||
during a backup for any reason, it may be inaccurate/stale.
|
||||
nullable: true
|
||||
properties:
|
||||
itemsBackedUp:
|
||||
description: |-
|
||||
ItemsBackedUp is the number of items that have actually been written to the
|
||||
backup tarball so far.
|
||||
type: integer
|
||||
totalItems:
|
||||
description: |-
|
||||
TotalItems is the total number of items to be backed up. This number may change
|
||||
throughout the execution of the backup due to plugins that return additional related
|
||||
items to back up, the velero.io/exclude-from-backup label, and various other
|
||||
filters that happen as items are processed.
|
||||
type: integer
|
||||
type: object
|
||||
startTimestamp:
|
||||
description: |-
|
||||
StartTimestamp records the time a backup was started.
|
||||
Separate from CreationTimestamp, since that value changes
|
||||
on restores.
|
||||
The server's time is used for StartTimestamps
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
validationErrors:
|
||||
description: |-
|
||||
ValidationErrors is a slice of all validation errors (if
|
||||
applicable).
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
version:
|
||||
description: |-
|
||||
Version is the backup format major version.
|
||||
Deprecated: Please see FormatVersion
|
||||
type: integer
|
||||
volumeSnapshotsAttempted:
|
||||
description: |-
|
||||
VolumeSnapshotsAttempted is the total number of attempted
|
||||
volume snapshots for this backup.
|
||||
type: integer
|
||||
volumeSnapshotsCompleted:
|
||||
description: |-
|
||||
VolumeSnapshotsCompleted is the total number of successfully
|
||||
completed volume snapshots for this backup.
|
||||
type: integer
|
||||
warnings:
|
||||
description: |-
|
||||
Warnings is a count of all warning messages that were generated during
|
||||
execution of the backup. The actual warnings are in the backup's log
|
||||
file in object storage.
|
||||
type: integer
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
@@ -0,0 +1,191 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: backupstoragelocations.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: BackupStorageLocation
|
||||
listKind: BackupStorageLocationList
|
||||
plural: backupstoragelocations
|
||||
shortNames:
|
||||
- bsl
|
||||
singular: backupstoragelocation
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: Backup Storage Location status such as Available/Unavailable
|
||||
jsonPath: .status.phase
|
||||
name: Phase
|
||||
type: string
|
||||
- description: LastValidationTime is the last time the backup store location
|
||||
was validated
|
||||
jsonPath: .status.lastValidationTime
|
||||
name: Last Validated
|
||||
type: date
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
- description: Default backup storage location
|
||||
jsonPath: .spec.default
|
||||
name: Default
|
||||
type: boolean
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: BackupStorageLocation is a location where Velero stores backup
|
||||
objects
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: BackupStorageLocationSpec defines the desired state of
|
||||
a Velero BackupStorageLocation
|
||||
properties:
|
||||
accessMode:
|
||||
description: AccessMode defines the permissions for the backup storage
|
||||
location.
|
||||
enum:
|
||||
- ReadOnly
|
||||
- ReadWrite
|
||||
type: string
|
||||
backupSyncPeriod:
|
||||
description: BackupSyncPeriod defines how frequently to sync backup
|
||||
API objects from object storage. A value of 0 disables sync.
|
||||
nullable: true
|
||||
type: string
|
||||
config:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Config is for provider-specific configuration fields.
|
||||
type: object
|
||||
credential:
|
||||
description: Credential contains the credential information intended
|
||||
to be used with this location
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be
|
||||
a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
default:
|
||||
description: Default indicates this location is the default backup
|
||||
storage location.
|
||||
type: boolean
|
||||
objectStorage:
|
||||
description: ObjectStorageLocation specifies the settings necessary
|
||||
to connect to a provider's object storage.
|
||||
properties:
|
||||
bucket:
|
||||
description: Bucket is the bucket to use for object storage.
|
||||
type: string
|
||||
caCert:
|
||||
description: CACert defines a CA bundle to use when verifying
|
||||
TLS connections to the provider.
|
||||
format: byte
|
||||
type: string
|
||||
prefix:
|
||||
description: Prefix is the path inside a bucket to use for Velero
|
||||
storage. Optional.
|
||||
type: string
|
||||
required:
|
||||
- bucket
|
||||
type: object
|
||||
provider:
|
||||
description: Provider is the provider of the backup storage.
|
||||
type: string
|
||||
validationFrequency:
|
||||
description: ValidationFrequency defines how frequently to validate
|
||||
the corresponding object storage. A value of 0 disables validation.
|
||||
nullable: true
|
||||
type: string
|
||||
required:
|
||||
- objectStorage
|
||||
- provider
|
||||
type: object
|
||||
status:
|
||||
description: BackupStorageLocationStatus defines the observed state
|
||||
of BackupStorageLocation
|
||||
properties:
|
||||
accessMode:
|
||||
description: |-
|
||||
AccessMode is an unused field.
|
||||
|
||||
Deprecated: there is now an AccessMode field on the Spec and this field
|
||||
will be removed entirely as of v2.0.
|
||||
enum:
|
||||
- ReadOnly
|
||||
- ReadWrite
|
||||
type: string
|
||||
lastSyncedRevision:
|
||||
description: |-
|
||||
LastSyncedRevision is the value of the `metadata/revision` file in the backup
|
||||
storage location the last time the BSL's contents were synced into the cluster.
|
||||
|
||||
Deprecated: this field is no longer updated or used for detecting changes to
|
||||
the location's contents and will be removed entirely in v2.0.
|
||||
type: string
|
||||
lastSyncedTime:
|
||||
description: |-
|
||||
LastSyncedTime is the last time the contents of the location were synced into
|
||||
the cluster.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
lastValidationTime:
|
||||
description: |-
|
||||
LastValidationTime is the last time the backup store location was validated
|
||||
the cluster.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
message:
|
||||
description: Message is a message about the backup storage location's
|
||||
status.
|
||||
type: string
|
||||
phase:
|
||||
description: Phase is the current state of the BackupStorageLocation.
|
||||
enum:
|
||||
- Available
|
||||
- Unavailable
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
211
packages/system/velero/charts/velero/crds/datadownloads.yaml
Normal file
211
packages/system/velero/charts/velero/crds/datadownloads.yaml
Normal file
@@ -0,0 +1,211 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: datadownloads.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: DataDownload
|
||||
listKind: DataDownloadList
|
||||
plural: datadownloads
|
||||
singular: datadownload
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: DataDownload status such as New/InProgress
|
||||
jsonPath: .status.phase
|
||||
name: Status
|
||||
type: string
|
||||
- description: Time duration since this DataDownload was started
|
||||
jsonPath: .status.startTimestamp
|
||||
name: Started
|
||||
type: date
|
||||
- description: Completed bytes
|
||||
format: int64
|
||||
jsonPath: .status.progress.bytesDone
|
||||
name: Bytes Done
|
||||
type: integer
|
||||
- description: Total bytes
|
||||
format: int64
|
||||
jsonPath: .status.progress.totalBytes
|
||||
name: Total Bytes
|
||||
type: integer
|
||||
- description: Name of the Backup Storage Location where the backup data is
|
||||
stored
|
||||
jsonPath: .spec.backupStorageLocation
|
||||
name: Storage Location
|
||||
type: string
|
||||
- description: Time duration since this DataDownload was created
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
- description: Name of the node where the DataDownload is processed
|
||||
jsonPath: .status.node
|
||||
name: Node
|
||||
type: string
|
||||
name: v2alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: DataDownload acts as the protocol between data mover plugins
|
||||
and data mover controller for the datamover restore operation
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: DataDownloadSpec is the specification for a DataDownload.
|
||||
properties:
|
||||
backupStorageLocation:
|
||||
description: |-
|
||||
BackupStorageLocation is the name of the backup storage location
|
||||
where the backup repository is stored.
|
||||
type: string
|
||||
cancel:
|
||||
description: |-
|
||||
Cancel indicates request to cancel the ongoing DataDownload. It can be set
|
||||
when the DataDownload is in InProgress phase
|
||||
type: boolean
|
||||
dataMoverConfig:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: DataMoverConfig is for data-mover-specific configuration
|
||||
fields.
|
||||
type: object
|
||||
datamover:
|
||||
description: |-
|
||||
DataMover specifies the data mover to be used by the backup.
|
||||
If DataMover is "" or "velero", the built-in data mover will be used.
|
||||
type: string
|
||||
nodeOS:
|
||||
description: NodeOS is OS of the node where the DataDownload is
|
||||
processed.
|
||||
enum:
|
||||
- auto
|
||||
- linux
|
||||
- windows
|
||||
type: string
|
||||
operationTimeout:
|
||||
description: |-
|
||||
OperationTimeout specifies the time used to wait internal operations,
|
||||
before returning error as timeout.
|
||||
type: string
|
||||
snapshotID:
|
||||
description: SnapshotID is the ID of the Velero backup snapshot
|
||||
to be restored from.
|
||||
type: string
|
||||
sourceNamespace:
|
||||
description: |-
|
||||
SourceNamespace is the original namespace where the volume is backed up from.
|
||||
It may be different from SourcePVC's namespace if namespace is remapped during restore.
|
||||
type: string
|
||||
targetVolume:
|
||||
description: TargetVolume is the information of the target PVC and
|
||||
PV.
|
||||
properties:
|
||||
namespace:
|
||||
description: Namespace is the target namespace
|
||||
type: string
|
||||
pv:
|
||||
description: PV is the name of the target PV that is created
|
||||
by Velero restore
|
||||
type: string
|
||||
pvc:
|
||||
description: PVC is the name of the target PVC that is created
|
||||
by Velero restore
|
||||
type: string
|
||||
required:
|
||||
- namespace
|
||||
- pv
|
||||
- pvc
|
||||
type: object
|
||||
required:
|
||||
- backupStorageLocation
|
||||
- operationTimeout
|
||||
- snapshotID
|
||||
- sourceNamespace
|
||||
- targetVolume
|
||||
type: object
|
||||
status:
|
||||
description: DataDownloadStatus is the current status of a DataDownload.
|
||||
properties:
|
||||
acceptedByNode:
|
||||
description: Node is name of the node where the DataUpload is prepared.
|
||||
type: string
|
||||
acceptedTimestamp:
|
||||
description: |-
|
||||
AcceptedTimestamp records the time the DataUpload is to be prepared.
|
||||
The server's time is used for AcceptedTimestamp
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
completionTimestamp:
|
||||
description: |-
|
||||
CompletionTimestamp records the time a restore was completed.
|
||||
Completion time is recorded even on failed restores.
|
||||
The server's time is used for CompletionTimestamps
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
message:
|
||||
description: Message is a message about the DataDownload's status.
|
||||
type: string
|
||||
node:
|
||||
description: Node is name of the node where the DataDownload is
|
||||
processed.
|
||||
type: string
|
||||
phase:
|
||||
description: Phase is the current state of the DataDownload.
|
||||
enum:
|
||||
- New
|
||||
- Accepted
|
||||
- Prepared
|
||||
- InProgress
|
||||
- Canceling
|
||||
- Canceled
|
||||
- Completed
|
||||
- Failed
|
||||
type: string
|
||||
progress:
|
||||
description: |-
|
||||
Progress holds the total number of bytes of the snapshot and the current
|
||||
number of restored bytes. This can be used to display progress information
|
||||
about the restore operation.
|
||||
properties:
|
||||
bytesDone:
|
||||
format: int64
|
||||
type: integer
|
||||
totalBytes:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
startTimestamp:
|
||||
description: |-
|
||||
StartTimestamp records the time a restore was started.
|
||||
The server's time is used for StartTimestamps
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
234
packages/system/velero/charts/velero/crds/datauploads.yaml
Normal file
234
packages/system/velero/charts/velero/crds/datauploads.yaml
Normal file
@@ -0,0 +1,234 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: datauploads.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: DataUpload
|
||||
listKind: DataUploadList
|
||||
plural: datauploads
|
||||
singular: dataupload
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: DataUpload status such as New/InProgress
|
||||
jsonPath: .status.phase
|
||||
name: Status
|
||||
type: string
|
||||
- description: Time duration since this DataUpload was started
|
||||
jsonPath: .status.startTimestamp
|
||||
name: Started
|
||||
type: date
|
||||
- description: Completed bytes
|
||||
format: int64
|
||||
jsonPath: .status.progress.bytesDone
|
||||
name: Bytes Done
|
||||
type: integer
|
||||
- description: Total bytes
|
||||
format: int64
|
||||
jsonPath: .status.progress.totalBytes
|
||||
name: Total Bytes
|
||||
type: integer
|
||||
- description: Name of the Backup Storage Location where this backup should
|
||||
be stored
|
||||
jsonPath: .spec.backupStorageLocation
|
||||
name: Storage Location
|
||||
type: string
|
||||
- description: Time duration since this DataUpload was created
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
- description: Name of the node where the DataUpload is processed
|
||||
jsonPath: .status.node
|
||||
name: Node
|
||||
type: string
|
||||
name: v2alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: DataUpload acts as the protocol between data mover plugins
|
||||
and data mover controller for the datamover backup operation
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: DataUploadSpec is the specification for a DataUpload.
|
||||
properties:
|
||||
backupStorageLocation:
|
||||
description: |-
|
||||
BackupStorageLocation is the name of the backup storage location
|
||||
where the backup repository is stored.
|
||||
type: string
|
||||
cancel:
|
||||
description: |-
|
||||
Cancel indicates request to cancel the ongoing DataUpload. It can be set
|
||||
when the DataUpload is in InProgress phase
|
||||
type: boolean
|
||||
csiSnapshot:
|
||||
description: If SnapshotType is CSI, CSISnapshot provides the information
|
||||
of the CSI snapshot.
|
||||
nullable: true
|
||||
properties:
|
||||
snapshotClass:
|
||||
description: SnapshotClass is the name of the snapshot class
|
||||
that the volume snapshot is created with
|
||||
type: string
|
||||
storageClass:
|
||||
description: StorageClass is the name of the storage class of
|
||||
the PVC that the volume snapshot is created from
|
||||
type: string
|
||||
volumeSnapshot:
|
||||
description: VolumeSnapshot is the name of the volume snapshot
|
||||
to be backed up
|
||||
type: string
|
||||
required:
|
||||
- storageClass
|
||||
- volumeSnapshot
|
||||
type: object
|
||||
dataMoverConfig:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: DataMoverConfig is for data-mover-specific configuration
|
||||
fields.
|
||||
nullable: true
|
||||
type: object
|
||||
datamover:
|
||||
description: |-
|
||||
DataMover specifies the data mover to be used by the backup.
|
||||
If DataMover is "" or "velero", the built-in data mover will be used.
|
||||
type: string
|
||||
operationTimeout:
|
||||
description: |-
|
||||
OperationTimeout specifies the time used to wait internal operations,
|
||||
before returning error as timeout.
|
||||
type: string
|
||||
snapshotType:
|
||||
description: SnapshotType is the type of the snapshot to be backed
|
||||
up.
|
||||
type: string
|
||||
sourceNamespace:
|
||||
description: |-
|
||||
SourceNamespace is the original namespace where the volume is backed up from.
|
||||
It is the same namespace for SourcePVC and CSI namespaced objects.
|
||||
type: string
|
||||
sourcePVC:
|
||||
description: SourcePVC is the name of the PVC which the snapshot
|
||||
is taken for.
|
||||
type: string
|
||||
required:
|
||||
- backupStorageLocation
|
||||
- operationTimeout
|
||||
- snapshotType
|
||||
- sourceNamespace
|
||||
- sourcePVC
|
||||
type: object
|
||||
status:
|
||||
description: DataUploadStatus is the current status of a DataUpload.
|
||||
properties:
|
||||
acceptedByNode:
|
||||
description: AcceptedByNode is name of the node where the DataUpload
|
||||
is prepared.
|
||||
type: string
|
||||
acceptedTimestamp:
|
||||
description: |-
|
||||
AcceptedTimestamp records the time the DataUpload is to be prepared.
|
||||
The server's time is used for AcceptedTimestamp
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
completionTimestamp:
|
||||
description: |-
|
||||
CompletionTimestamp records the time a backup was completed.
|
||||
Completion time is recorded even on failed backups.
|
||||
Completion time is recorded before uploading the backup object.
|
||||
The server's time is used for CompletionTimestamps
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
dataMoverResult:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: DataMoverResult stores data-mover-specific information
|
||||
as a result of the DataUpload.
|
||||
nullable: true
|
||||
type: object
|
||||
message:
|
||||
description: Message is a message about the DataUpload's status.
|
||||
type: string
|
||||
node:
|
||||
description: Node is name of the node where the DataUpload is processed.
|
||||
type: string
|
||||
nodeOS:
|
||||
description: NodeOS is OS of the node where the DataUpload is processed.
|
||||
enum:
|
||||
- auto
|
||||
- linux
|
||||
- windows
|
||||
type: string
|
||||
path:
|
||||
description: Path is the full path of the snapshot volume being
|
||||
backed up.
|
||||
type: string
|
||||
phase:
|
||||
description: Phase is the current state of the DataUpload.
|
||||
enum:
|
||||
- New
|
||||
- Accepted
|
||||
- Prepared
|
||||
- InProgress
|
||||
- Canceling
|
||||
- Canceled
|
||||
- Completed
|
||||
- Failed
|
||||
type: string
|
||||
progress:
|
||||
description: |-
|
||||
Progress holds the total number of bytes of the volume and the current
|
||||
number of backed up bytes. This can be used to display progress information
|
||||
about the backup operation.
|
||||
properties:
|
||||
bytesDone:
|
||||
format: int64
|
||||
type: integer
|
||||
totalBytes:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
snapshotID:
|
||||
description: SnapshotID is the identifier for the snapshot in the
|
||||
backup repository.
|
||||
type: string
|
||||
startTimestamp:
|
||||
description: |-
|
||||
StartTimestamp records the time a backup was started.
|
||||
Separate from CreationTimestamp, since that value changes
|
||||
on restores.
|
||||
The server's time is used for StartTimestamps
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
@@ -0,0 +1,80 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: deletebackuprequests.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: DeleteBackupRequest
|
||||
listKind: DeleteBackupRequestList
|
||||
plural: deletebackuprequests
|
||||
singular: deletebackuprequest
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: The name of the backup to be deleted
|
||||
jsonPath: .spec.backupName
|
||||
name: BackupName
|
||||
type: string
|
||||
- description: The status of the deletion request
|
||||
jsonPath: .status.phase
|
||||
name: Status
|
||||
type: string
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: DeleteBackupRequest is a request to delete one or more backups.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: DeleteBackupRequestSpec is the specification for which
|
||||
backups to delete.
|
||||
properties:
|
||||
backupName:
|
||||
type: string
|
||||
required:
|
||||
- backupName
|
||||
type: object
|
||||
status:
|
||||
description: DeleteBackupRequestStatus is the current status of a DeleteBackupRequest.
|
||||
properties:
|
||||
errors:
|
||||
description: Errors contains any errors that were encountered during
|
||||
the deletion process.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
phase:
|
||||
description: Phase is the current state of the DeleteBackupRequest.
|
||||
enum:
|
||||
- New
|
||||
- InProgress
|
||||
- Processed
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
101
packages/system/velero/charts/velero/crds/downloadrequests.yaml
Normal file
101
packages/system/velero/charts/velero/crds/downloadrequests.yaml
Normal file
@@ -0,0 +1,101 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: downloadrequests.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: DownloadRequest
|
||||
listKind: DownloadRequestList
|
||||
plural: downloadrequests
|
||||
singular: downloadrequest
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
DownloadRequest is a request to download an artifact from backup object storage, such as a backup
|
||||
log file.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: DownloadRequestSpec is the specification for a download
|
||||
request.
|
||||
properties:
|
||||
target:
|
||||
description: Target is what to download (e.g. logs for a backup).
|
||||
properties:
|
||||
kind:
|
||||
description: Kind is the type of file to download.
|
||||
enum:
|
||||
- BackupLog
|
||||
- BackupContents
|
||||
- BackupVolumeSnapshots
|
||||
- BackupItemOperations
|
||||
- BackupResourceList
|
||||
- BackupResults
|
||||
- RestoreLog
|
||||
- RestoreResults
|
||||
- RestoreResourceList
|
||||
- RestoreItemOperations
|
||||
- CSIBackupVolumeSnapshots
|
||||
- CSIBackupVolumeSnapshotContents
|
||||
- BackupVolumeInfos
|
||||
- RestoreVolumeInfo
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of the Kubernetes resource with
|
||||
which the file is associated.
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
required:
|
||||
- target
|
||||
type: object
|
||||
status:
|
||||
description: DownloadRequestStatus is the current status of a DownloadRequest.
|
||||
properties:
|
||||
downloadURL:
|
||||
description: DownloadURL contains the pre-signed URL for the target
|
||||
file.
|
||||
type: string
|
||||
expiration:
|
||||
description: Expiration is when this DownloadRequest expires and
|
||||
can be deleted by the system.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
phase:
|
||||
description: Phase is the current state of the DownloadRequest.
|
||||
enum:
|
||||
- New
|
||||
- Processed
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
225
packages/system/velero/charts/velero/crds/podvolumebackups.yaml
Normal file
225
packages/system/velero/charts/velero/crds/podvolumebackups.yaml
Normal file
@@ -0,0 +1,225 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: podvolumebackups.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: PodVolumeBackup
|
||||
listKind: PodVolumeBackupList
|
||||
plural: podvolumebackups
|
||||
singular: podvolumebackup
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: Pod Volume Backup status such as New/InProgress
|
||||
jsonPath: .status.phase
|
||||
name: Status
|
||||
type: string
|
||||
- description: Time when this backup was started
|
||||
jsonPath: .status.startTimestamp
|
||||
name: Created
|
||||
type: date
|
||||
- description: Namespace of the pod containing the volume to be backed up
|
||||
jsonPath: .spec.pod.namespace
|
||||
name: Namespace
|
||||
type: string
|
||||
- description: Name of the pod containing the volume to be backed up
|
||||
jsonPath: .spec.pod.name
|
||||
name: Pod
|
||||
type: string
|
||||
- description: Name of the volume to be backed up
|
||||
jsonPath: .spec.volume
|
||||
name: Volume
|
||||
type: string
|
||||
- description: The type of the uploader to handle data transfer
|
||||
jsonPath: .spec.uploaderType
|
||||
name: Uploader Type
|
||||
type: string
|
||||
- description: Name of the Backup Storage Location where this backup should
|
||||
be stored
|
||||
jsonPath: .spec.backupStorageLocation
|
||||
name: Storage Location
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: PodVolumeBackupSpec is the specification for a PodVolumeBackup.
|
||||
properties:
|
||||
backupStorageLocation:
|
||||
description: |-
|
||||
BackupStorageLocation is the name of the backup storage location
|
||||
where the backup repository is stored.
|
||||
type: string
|
||||
node:
|
||||
description: Node is the name of the node that the Pod is running
|
||||
on.
|
||||
type: string
|
||||
pod:
|
||||
description: Pod is a reference to the pod containing the volume
|
||||
to be backed up.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: |-
|
||||
If referring to a piece of an object instead of an entire object, this string
|
||||
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within a pod, this would take on a value like:
|
||||
"spec.containers{name}" (where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only to have some well-defined way of
|
||||
referencing a part of an object.
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind of the referent.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
name:
|
||||
description: |-
|
||||
Name of the referent.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
namespace:
|
||||
description: |-
|
||||
Namespace of the referent.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: |-
|
||||
Specific resourceVersion to which this reference is made, if any.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
|
||||
type: string
|
||||
uid:
|
||||
description: |-
|
||||
UID of the referent.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
repoIdentifier:
|
||||
description: RepoIdentifier is the backup repository identifier.
|
||||
type: string
|
||||
tags:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
Tags are a map of key-value pairs that should be applied to the
|
||||
volume backup as tags.
|
||||
type: object
|
||||
uploaderSettings:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
UploaderSettings are a map of key-value pairs that should be applied to the
|
||||
uploader configuration.
|
||||
nullable: true
|
||||
type: object
|
||||
uploaderType:
|
||||
description: UploaderType is the type of the uploader to handle
|
||||
the data transfer.
|
||||
enum:
|
||||
- kopia
|
||||
- restic
|
||||
- ""
|
||||
type: string
|
||||
volume:
|
||||
description: |-
|
||||
Volume is the name of the volume within the Pod to be backed
|
||||
up.
|
||||
type: string
|
||||
required:
|
||||
- backupStorageLocation
|
||||
- node
|
||||
- pod
|
||||
- repoIdentifier
|
||||
- volume
|
||||
type: object
|
||||
status:
|
||||
description: PodVolumeBackupStatus is the current status of a PodVolumeBackup.
|
||||
properties:
|
||||
completionTimestamp:
|
||||
description: |-
|
||||
CompletionTimestamp records the time a backup was completed.
|
||||
Completion time is recorded even on failed backups.
|
||||
Completion time is recorded before uploading the backup object.
|
||||
The server's time is used for CompletionTimestamps
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
message:
|
||||
description: Message is a message about the pod volume backup's
|
||||
status.
|
||||
type: string
|
||||
path:
|
||||
description: Path is the full path within the controller pod being
|
||||
backed up.
|
||||
type: string
|
||||
phase:
|
||||
description: Phase is the current state of the PodVolumeBackup.
|
||||
enum:
|
||||
- New
|
||||
- InProgress
|
||||
- Completed
|
||||
- Failed
|
||||
type: string
|
||||
progress:
|
||||
description: |-
|
||||
Progress holds the total number of bytes of the volume and the current
|
||||
number of backed up bytes. This can be used to display progress information
|
||||
about the backup operation.
|
||||
properties:
|
||||
bytesDone:
|
||||
format: int64
|
||||
type: integer
|
||||
totalBytes:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
snapshotID:
|
||||
description: SnapshotID is the identifier for the snapshot of the
|
||||
pod volume.
|
||||
type: string
|
||||
startTimestamp:
|
||||
description: |-
|
||||
StartTimestamp records the time a backup was started.
|
||||
Separate from CreationTimestamp, since that value changes
|
||||
on restores.
|
||||
The server's time is used for StartTimestamps
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
211
packages/system/velero/charts/velero/crds/podvolumerestores.yaml
Normal file
211
packages/system/velero/charts/velero/crds/podvolumerestores.yaml
Normal file
@@ -0,0 +1,211 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: podvolumerestores.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: PodVolumeRestore
|
||||
listKind: PodVolumeRestoreList
|
||||
plural: podvolumerestores
|
||||
singular: podvolumerestore
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: Namespace of the pod containing the volume to be restored
|
||||
jsonPath: .spec.pod.namespace
|
||||
name: Namespace
|
||||
type: string
|
||||
- description: Name of the pod containing the volume to be restored
|
||||
jsonPath: .spec.pod.name
|
||||
name: Pod
|
||||
type: string
|
||||
- description: The type of the uploader to handle data transfer
|
||||
jsonPath: .spec.uploaderType
|
||||
name: Uploader Type
|
||||
type: string
|
||||
- description: Name of the volume to be restored
|
||||
jsonPath: .spec.volume
|
||||
name: Volume
|
||||
type: string
|
||||
- description: Pod Volume Restore status such as New/InProgress
|
||||
jsonPath: .status.phase
|
||||
name: Status
|
||||
type: string
|
||||
- description: Pod Volume Restore status such as New/InProgress
|
||||
format: int64
|
||||
jsonPath: .status.progress.totalBytes
|
||||
name: TotalBytes
|
||||
type: integer
|
||||
- description: Pod Volume Restore status such as New/InProgress
|
||||
format: int64
|
||||
jsonPath: .status.progress.bytesDone
|
||||
name: BytesDone
|
||||
type: integer
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: PodVolumeRestoreSpec is the specification for a PodVolumeRestore.
|
||||
properties:
|
||||
backupStorageLocation:
|
||||
description: |-
|
||||
BackupStorageLocation is the name of the backup storage location
|
||||
where the backup repository is stored.
|
||||
type: string
|
||||
pod:
|
||||
description: Pod is a reference to the pod containing the volume
|
||||
to be restored.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: |-
|
||||
If referring to a piece of an object instead of an entire object, this string
|
||||
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within a pod, this would take on a value like:
|
||||
"spec.containers{name}" (where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only to have some well-defined way of
|
||||
referencing a part of an object.
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind of the referent.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
name:
|
||||
description: |-
|
||||
Name of the referent.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
namespace:
|
||||
description: |-
|
||||
Namespace of the referent.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: |-
|
||||
Specific resourceVersion to which this reference is made, if any.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
|
||||
type: string
|
||||
uid:
|
||||
description: |-
|
||||
UID of the referent.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
repoIdentifier:
|
||||
description: RepoIdentifier is the backup repository identifier.
|
||||
type: string
|
||||
snapshotID:
|
||||
description: SnapshotID is the ID of the volume snapshot to be restored.
|
||||
type: string
|
||||
sourceNamespace:
|
||||
description: SourceNamespace is the original namespace for namaspace
|
||||
mapping.
|
||||
type: string
|
||||
uploaderSettings:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
UploaderSettings are a map of key-value pairs that should be applied to the
|
||||
uploader configuration.
|
||||
nullable: true
|
||||
type: object
|
||||
uploaderType:
|
||||
description: UploaderType is the type of the uploader to handle
|
||||
the data transfer.
|
||||
enum:
|
||||
- kopia
|
||||
- restic
|
||||
- ""
|
||||
type: string
|
||||
volume:
|
||||
description: Volume is the name of the volume within the Pod to
|
||||
be restored.
|
||||
type: string
|
||||
required:
|
||||
- backupStorageLocation
|
||||
- pod
|
||||
- repoIdentifier
|
||||
- snapshotID
|
||||
- sourceNamespace
|
||||
- volume
|
||||
type: object
|
||||
status:
|
||||
description: PodVolumeRestoreStatus is the current status of a PodVolumeRestore.
|
||||
properties:
|
||||
completionTimestamp:
|
||||
description: |-
|
||||
CompletionTimestamp records the time a restore was completed.
|
||||
Completion time is recorded even on failed restores.
|
||||
The server's time is used for CompletionTimestamps
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
message:
|
||||
description: Message is a message about the pod volume restore's
|
||||
status.
|
||||
type: string
|
||||
phase:
|
||||
description: Phase is the current state of the PodVolumeRestore.
|
||||
enum:
|
||||
- New
|
||||
- InProgress
|
||||
- Completed
|
||||
- Failed
|
||||
type: string
|
||||
progress:
|
||||
description: |-
|
||||
Progress holds the total number of bytes of the snapshot and the current
|
||||
number of restored bytes. This can be used to display progress information
|
||||
about the restore operation.
|
||||
properties:
|
||||
bytesDone:
|
||||
format: int64
|
||||
type: integer
|
||||
totalBytes:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
startTimestamp:
|
||||
description: |-
|
||||
StartTimestamp records the time a restore was started.
|
||||
The server's time is used for StartTimestamps
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
566
packages/system/velero/charts/velero/crds/restores.yaml
Normal file
566
packages/system/velero/charts/velero/crds/restores.yaml
Normal file
@@ -0,0 +1,566 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: restores.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: Restore
|
||||
listKind: RestoreList
|
||||
plural: restores
|
||||
singular: restore
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
Restore is a Velero resource that represents the application of
|
||||
resources from a Velero backup to a target Kubernetes cluster.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: RestoreSpec defines the specification for a Velero restore.
|
||||
properties:
|
||||
backupName:
|
||||
description: |-
|
||||
BackupName is the unique name of the Velero backup to restore
|
||||
from.
|
||||
type: string
|
||||
excludedNamespaces:
|
||||
description: |-
|
||||
ExcludedNamespaces contains a list of namespaces that are not
|
||||
included in the restore.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
excludedResources:
|
||||
description: |-
|
||||
ExcludedResources is a slice of resource names that are not
|
||||
included in the restore.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
existingResourcePolicy:
|
||||
description: ExistingResourcePolicy specifies the restore behavior
|
||||
for the Kubernetes resource to be restored
|
||||
nullable: true
|
||||
type: string
|
||||
hooks:
|
||||
description: Hooks represent custom behaviors that should be executed
|
||||
during or post restore.
|
||||
properties:
|
||||
resources:
|
||||
items:
|
||||
description: |-
|
||||
RestoreResourceHookSpec defines one or more RestoreResrouceHooks that should be executed based on
|
||||
the rules defined for namespaces, resources, and label selector.
|
||||
properties:
|
||||
excludedNamespaces:
|
||||
description: ExcludedNamespaces specifies the namespaces
|
||||
to which this hook spec does not apply.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
excludedResources:
|
||||
description: ExcludedResources specifies the resources
|
||||
to which this hook spec does not apply.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedNamespaces:
|
||||
description: |-
|
||||
IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies
|
||||
to all namespaces.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedResources:
|
||||
description: |-
|
||||
IncludedResources specifies the resources to which this hook spec applies. If empty, it applies
|
||||
to all resources.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
labelSelector:
|
||||
description: LabelSelector, if specified, filters the
|
||||
resources to which this hook spec applies.
|
||||
nullable: true
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector
|
||||
requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector
|
||||
applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
name:
|
||||
description: Name is the name of this hook.
|
||||
type: string
|
||||
postHooks:
|
||||
description: PostHooks is a list of RestoreResourceHooks
|
||||
to execute during and after restoring a resource.
|
||||
items:
|
||||
description: RestoreResourceHook defines a restore hook
|
||||
for a resource.
|
||||
properties:
|
||||
exec:
|
||||
description: Exec defines an exec restore hook.
|
||||
properties:
|
||||
command:
|
||||
description: Command is the command and arguments
|
||||
to execute from within a container after a
|
||||
pod has been restored.
|
||||
items:
|
||||
type: string
|
||||
minItems: 1
|
||||
type: array
|
||||
container:
|
||||
description: |-
|
||||
Container is the container in the pod where the command should be executed. If not specified,
|
||||
the pod's first container is used.
|
||||
type: string
|
||||
execTimeout:
|
||||
description: |-
|
||||
ExecTimeout defines the maximum amount of time Velero should wait for the hook to complete before
|
||||
considering the execution a failure.
|
||||
type: string
|
||||
onError:
|
||||
description: OnError specifies how Velero should
|
||||
behave if it encounters an error executing
|
||||
this hook.
|
||||
enum:
|
||||
- Continue
|
||||
- Fail
|
||||
type: string
|
||||
waitForReady:
|
||||
description: WaitForReady ensures command will
|
||||
be launched when container is Ready instead
|
||||
of Running.
|
||||
nullable: true
|
||||
type: boolean
|
||||
waitTimeout:
|
||||
description: |-
|
||||
WaitTimeout defines the maximum amount of time Velero should wait for the container to be Ready
|
||||
before attempting to run the command.
|
||||
type: string
|
||||
required:
|
||||
- command
|
||||
type: object
|
||||
init:
|
||||
description: Init defines an init restore hook.
|
||||
properties:
|
||||
initContainers:
|
||||
description: InitContainers is list of init
|
||||
containers to be added to a pod during its
|
||||
restore.
|
||||
items:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: array
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
timeout:
|
||||
description: Timeout defines the maximum amount
|
||||
of time Velero should wait for the initContainers
|
||||
to complete.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
includeClusterResources:
|
||||
description: |-
|
||||
IncludeClusterResources specifies whether cluster-scoped resources
|
||||
should be included for consideration in the restore. If null, defaults
|
||||
to true.
|
||||
nullable: true
|
||||
type: boolean
|
||||
includedNamespaces:
|
||||
description: |-
|
||||
IncludedNamespaces is a slice of namespace names to include objects
|
||||
from. If empty, all namespaces are included.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedResources:
|
||||
description: |-
|
||||
IncludedResources is a slice of resource names to include
|
||||
in the restore. If empty, all resources in the backup are included.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
itemOperationTimeout:
|
||||
description: |-
|
||||
ItemOperationTimeout specifies the time used to wait for RestoreItemAction operations
|
||||
The default value is 4 hour.
|
||||
type: string
|
||||
labelSelector:
|
||||
description: |-
|
||||
LabelSelector is a metav1.LabelSelector to filter with
|
||||
when restoring individual objects from the backup. If empty
|
||||
or nil, all objects are included. Optional.
|
||||
nullable: true
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
namespaceMapping:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
NamespaceMapping is a map of source namespace names
|
||||
to target namespace names to restore into. Any source
|
||||
namespaces not included in the map will be restored into
|
||||
namespaces of the same name.
|
||||
type: object
|
||||
orLabelSelectors:
|
||||
description: |-
|
||||
OrLabelSelectors is list of metav1.LabelSelector to filter with
|
||||
when restoring individual objects from the backup. If multiple provided
|
||||
they will be joined by the OR operator. LabelSelector as well as
|
||||
OrLabelSelectors cannot co-exist in restore request, only one of them
|
||||
can be used
|
||||
items:
|
||||
description: |-
|
||||
A label selector is a label query over a set of resources. The result of matchLabels and
|
||||
matchExpressions are ANDed. An empty label selector matches all objects. A null
|
||||
label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector
|
||||
requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector
|
||||
applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
nullable: true
|
||||
type: array
|
||||
preserveNodePorts:
|
||||
description: PreserveNodePorts specifies whether to restore old
|
||||
nodePorts from backup.
|
||||
nullable: true
|
||||
type: boolean
|
||||
resourceModifier:
|
||||
description: ResourceModifier specifies the reference to JSON resource
|
||||
patches that should be applied to resources before restoration.
|
||||
nullable: true
|
||||
properties:
|
||||
apiGroup:
|
||||
description: |-
|
||||
APIGroup is the group for the resource being referenced.
|
||||
If APIGroup is not specified, the specified Kind must be in the core API group.
|
||||
For any other third-party types, APIGroup is required.
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is the type of resource being referenced
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of resource being referenced
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
restorePVs:
|
||||
description: |-
|
||||
RestorePVs specifies whether to restore all included
|
||||
PVs from snapshot
|
||||
nullable: true
|
||||
type: boolean
|
||||
restoreStatus:
|
||||
description: |-
|
||||
RestoreStatus specifies which resources we should restore the status
|
||||
field. If nil, no objects are included. Optional.
|
||||
nullable: true
|
||||
properties:
|
||||
excludedResources:
|
||||
description: ExcludedResources specifies the resources to which
|
||||
will not restore the status.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedResources:
|
||||
description: |-
|
||||
IncludedResources specifies the resources to which will restore the status.
|
||||
If empty, it applies to all resources.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
type: object
|
||||
scheduleName:
|
||||
description: |-
|
||||
ScheduleName is the unique name of the Velero schedule to restore
|
||||
from. If specified, and BackupName is empty, Velero will restore
|
||||
from the most recent successful backup created from this schedule.
|
||||
type: string
|
||||
uploaderConfig:
|
||||
description: UploaderConfig specifies the configuration for the
|
||||
restore.
|
||||
nullable: true
|
||||
properties:
|
||||
parallelFilesDownload:
|
||||
description: ParallelFilesDownload is the concurrency number
|
||||
setting for restore.
|
||||
type: integer
|
||||
writeSparseFiles:
|
||||
description: WriteSparseFiles is a flag to indicate whether
|
||||
write files sparsely or not.
|
||||
nullable: true
|
||||
type: boolean
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: RestoreStatus captures the current status of a Velero restore
|
||||
properties:
|
||||
completionTimestamp:
|
||||
description: |-
|
||||
CompletionTimestamp records the time the restore operation was completed.
|
||||
Completion time is recorded even on failed restore.
|
||||
The server's time is used for StartTimestamps
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
errors:
|
||||
description: |-
|
||||
Errors is a count of all error messages that were generated during
|
||||
execution of the restore. The actual errors are stored in object storage.
|
||||
type: integer
|
||||
failureReason:
|
||||
description: FailureReason is an error that caused the entire restore
|
||||
to fail.
|
||||
type: string
|
||||
hookStatus:
|
||||
description: HookStatus contains information about the status of
|
||||
the hooks.
|
||||
nullable: true
|
||||
properties:
|
||||
hooksAttempted:
|
||||
description: |-
|
||||
HooksAttempted is the total number of attempted hooks
|
||||
Specifically, HooksAttempted represents the number of hooks that failed to execute
|
||||
and the number of hooks that executed successfully.
|
||||
type: integer
|
||||
hooksFailed:
|
||||
description: HooksFailed is the total number of hooks which
|
||||
ended with an error
|
||||
type: integer
|
||||
type: object
|
||||
phase:
|
||||
description: Phase is the current state of the Restore
|
||||
enum:
|
||||
- New
|
||||
- FailedValidation
|
||||
- InProgress
|
||||
- WaitingForPluginOperations
|
||||
- WaitingForPluginOperationsPartiallyFailed
|
||||
- Completed
|
||||
- PartiallyFailed
|
||||
- Failed
|
||||
- Finalizing
|
||||
- FinalizingPartiallyFailed
|
||||
type: string
|
||||
progress:
|
||||
description: |-
|
||||
Progress contains information about the restore's execution progress. Note
|
||||
that this information is best-effort only -- if Velero fails to update it
|
||||
during a restore for any reason, it may be inaccurate/stale.
|
||||
nullable: true
|
||||
properties:
|
||||
itemsRestored:
|
||||
description: ItemsRestored is the number of items that have
|
||||
actually been restored so far
|
||||
type: integer
|
||||
totalItems:
|
||||
description: |-
|
||||
TotalItems is the total number of items to be restored. This number may change
|
||||
throughout the execution of the restore due to plugins that return additional related
|
||||
items to restore
|
||||
type: integer
|
||||
type: object
|
||||
restoreItemOperationsAttempted:
|
||||
description: |-
|
||||
RestoreItemOperationsAttempted is the total number of attempted
|
||||
async RestoreItemAction operations for this restore.
|
||||
type: integer
|
||||
restoreItemOperationsCompleted:
|
||||
description: |-
|
||||
RestoreItemOperationsCompleted is the total number of successfully completed
|
||||
async RestoreItemAction operations for this restore.
|
||||
type: integer
|
||||
restoreItemOperationsFailed:
|
||||
description: |-
|
||||
RestoreItemOperationsFailed is the total number of async
|
||||
RestoreItemAction operations for this restore which ended with an error.
|
||||
type: integer
|
||||
startTimestamp:
|
||||
description: |-
|
||||
StartTimestamp records the time the restore operation was started.
|
||||
The server's time is used for StartTimestamps
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
validationErrors:
|
||||
description: |-
|
||||
ValidationErrors is a slice of all validation errors (if
|
||||
applicable)
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
warnings:
|
||||
description: |-
|
||||
Warnings is a count of all warning messages that were generated during
|
||||
execution of the restore. The actual warnings are stored in object storage.
|
||||
type: integer
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
606
packages/system/velero/charts/velero/crds/schedules.yaml
Normal file
606
packages/system/velero/charts/velero/crds/schedules.yaml
Normal file
@@ -0,0 +1,606 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: schedules.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: Schedule
|
||||
listKind: ScheduleList
|
||||
plural: schedules
|
||||
singular: schedule
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: Status of the schedule
|
||||
jsonPath: .status.phase
|
||||
name: Status
|
||||
type: string
|
||||
- description: A Cron expression defining when to run the Backup
|
||||
jsonPath: .spec.schedule
|
||||
name: Schedule
|
||||
type: string
|
||||
- description: The last time a Backup was run for this schedule
|
||||
jsonPath: .status.lastBackup
|
||||
name: LastBackup
|
||||
type: date
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
- jsonPath: .spec.paused
|
||||
name: Paused
|
||||
type: boolean
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
Schedule is a Velero resource that represents a pre-scheduled or
|
||||
periodic Backup that should be run.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: ScheduleSpec defines the specification for a Velero schedule
|
||||
properties:
|
||||
paused:
|
||||
description: Paused specifies whether the schedule is paused or
|
||||
not
|
||||
type: boolean
|
||||
schedule:
|
||||
description: |-
|
||||
Schedule is a Cron expression defining when to run
|
||||
the Backup.
|
||||
type: string
|
||||
skipImmediately:
|
||||
description: |-
|
||||
SkipImmediately specifies whether to skip backup if schedule is due immediately from `schedule.status.lastBackup` timestamp when schedule is unpaused or if schedule is new.
|
||||
If true, backup will be skipped immediately when schedule is unpaused if it is due based on .Status.LastBackupTimestamp or schedule is new, and will run at next schedule time.
|
||||
If false, backup will not be skipped immediately when schedule is unpaused, but will run at next schedule time.
|
||||
If empty, will follow server configuration (default: false).
|
||||
type: boolean
|
||||
template:
|
||||
description: |-
|
||||
Template is the definition of the Backup to be run
|
||||
on the provided schedule
|
||||
properties:
|
||||
csiSnapshotTimeout:
|
||||
description: |-
|
||||
CSISnapshotTimeout specifies the time used to wait for CSI VolumeSnapshot status turns to
|
||||
ReadyToUse during creation, before returning error as timeout.
|
||||
The default value is 10 minute.
|
||||
type: string
|
||||
datamover:
|
||||
description: |-
|
||||
DataMover specifies the data mover to be used by the backup.
|
||||
If DataMover is "" or "velero", the built-in data mover will be used.
|
||||
type: string
|
||||
defaultVolumesToFsBackup:
|
||||
description: |-
|
||||
DefaultVolumesToFsBackup specifies whether pod volume file system backup should be used
|
||||
for all volumes by default.
|
||||
nullable: true
|
||||
type: boolean
|
||||
defaultVolumesToRestic:
|
||||
description: |-
|
||||
DefaultVolumesToRestic specifies whether restic should be used to take a
|
||||
backup of all pod volumes by default.
|
||||
|
||||
Deprecated: this field is no longer used and will be removed entirely in future. Use DefaultVolumesToFsBackup instead.
|
||||
nullable: true
|
||||
type: boolean
|
||||
excludedClusterScopedResources:
|
||||
description: |-
|
||||
ExcludedClusterScopedResources is a slice of cluster-scoped
|
||||
resource type names to exclude from the backup.
|
||||
If set to "*", all cluster-scoped resource types are excluded.
|
||||
The default value is empty.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
excludedNamespaceScopedResources:
|
||||
description: |-
|
||||
ExcludedNamespaceScopedResources is a slice of namespace-scoped
|
||||
resource type names to exclude from the backup.
|
||||
If set to "*", all namespace-scoped resource types are excluded.
|
||||
The default value is empty.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
excludedNamespaces:
|
||||
description: |-
|
||||
ExcludedNamespaces contains a list of namespaces that are not
|
||||
included in the backup.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
excludedResources:
|
||||
description: |-
|
||||
ExcludedResources is a slice of resource names that are not
|
||||
included in the backup.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
hooks:
|
||||
description: Hooks represent custom behaviors that should be
|
||||
executed at different phases of the backup.
|
||||
properties:
|
||||
resources:
|
||||
description: Resources are hooks that should be executed
|
||||
when backing up individual instances of a resource.
|
||||
items:
|
||||
description: |-
|
||||
BackupResourceHookSpec defines one or more BackupResourceHooks that should be executed based on
|
||||
the rules defined for namespaces, resources, and label selector.
|
||||
properties:
|
||||
excludedNamespaces:
|
||||
description: ExcludedNamespaces specifies the namespaces
|
||||
to which this hook spec does not apply.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
excludedResources:
|
||||
description: ExcludedResources specifies the resources
|
||||
to which this hook spec does not apply.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedNamespaces:
|
||||
description: |-
|
||||
IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies
|
||||
to all namespaces.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedResources:
|
||||
description: |-
|
||||
IncludedResources specifies the resources to which this hook spec applies. If empty, it applies
|
||||
to all resources.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
labelSelector:
|
||||
description: LabelSelector, if specified, filters
|
||||
the resources to which this hook spec applies.
|
||||
nullable: true
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label
|
||||
selector requirements. The requirements are
|
||||
ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the
|
||||
selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
name:
|
||||
description: Name is the name of this hook.
|
||||
type: string
|
||||
post:
|
||||
description: |-
|
||||
PostHooks is a list of BackupResourceHooks to execute after storing the item in the backup.
|
||||
These are executed after all "additional items" from item actions are processed.
|
||||
items:
|
||||
description: BackupResourceHook defines a hook for
|
||||
a resource.
|
||||
properties:
|
||||
exec:
|
||||
description: Exec defines an exec hook.
|
||||
properties:
|
||||
command:
|
||||
description: Command is the command and
|
||||
arguments to execute.
|
||||
items:
|
||||
type: string
|
||||
minItems: 1
|
||||
type: array
|
||||
container:
|
||||
description: |-
|
||||
Container is the container in the pod where the command should be executed. If not specified,
|
||||
the pod's first container is used.
|
||||
type: string
|
||||
onError:
|
||||
description: OnError specifies how Velero
|
||||
should behave if it encounters an error
|
||||
executing this hook.
|
||||
enum:
|
||||
- Continue
|
||||
- Fail
|
||||
type: string
|
||||
timeout:
|
||||
description: |-
|
||||
Timeout defines the maximum amount of time Velero should wait for the hook to complete before
|
||||
considering the execution a failure.
|
||||
type: string
|
||||
required:
|
||||
- command
|
||||
type: object
|
||||
required:
|
||||
- exec
|
||||
type: object
|
||||
type: array
|
||||
pre:
|
||||
description: |-
|
||||
PreHooks is a list of BackupResourceHooks to execute prior to storing the item in the backup.
|
||||
These are executed before any "additional items" from item actions are processed.
|
||||
items:
|
||||
description: BackupResourceHook defines a hook for
|
||||
a resource.
|
||||
properties:
|
||||
exec:
|
||||
description: Exec defines an exec hook.
|
||||
properties:
|
||||
command:
|
||||
description: Command is the command and
|
||||
arguments to execute.
|
||||
items:
|
||||
type: string
|
||||
minItems: 1
|
||||
type: array
|
||||
container:
|
||||
description: |-
|
||||
Container is the container in the pod where the command should be executed. If not specified,
|
||||
the pod's first container is used.
|
||||
type: string
|
||||
onError:
|
||||
description: OnError specifies how Velero
|
||||
should behave if it encounters an error
|
||||
executing this hook.
|
||||
enum:
|
||||
- Continue
|
||||
- Fail
|
||||
type: string
|
||||
timeout:
|
||||
description: |-
|
||||
Timeout defines the maximum amount of time Velero should wait for the hook to complete before
|
||||
considering the execution a failure.
|
||||
type: string
|
||||
required:
|
||||
- command
|
||||
type: object
|
||||
required:
|
||||
- exec
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
nullable: true
|
||||
type: array
|
||||
type: object
|
||||
includeClusterResources:
|
||||
description: |-
|
||||
IncludeClusterResources specifies whether cluster-scoped resources
|
||||
should be included for consideration in the backup.
|
||||
nullable: true
|
||||
type: boolean
|
||||
includedClusterScopedResources:
|
||||
description: |-
|
||||
IncludedClusterScopedResources is a slice of cluster-scoped
|
||||
resource type names to include in the backup.
|
||||
If set to "*", all cluster-scoped resource types are included.
|
||||
The default value is empty, which means only related
|
||||
cluster-scoped resources are included.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedNamespaceScopedResources:
|
||||
description: |-
|
||||
IncludedNamespaceScopedResources is a slice of namespace-scoped
|
||||
resource type names to include in the backup.
|
||||
The default value is "*".
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedNamespaces:
|
||||
description: |-
|
||||
IncludedNamespaces is a slice of namespace names to include objects
|
||||
from. If empty, all namespaces are included.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
includedResources:
|
||||
description: |-
|
||||
IncludedResources is a slice of resource names to include
|
||||
in the backup. If empty, all resources are included.
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
type: array
|
||||
itemOperationTimeout:
|
||||
description: |-
|
||||
ItemOperationTimeout specifies the time used to wait for asynchronous BackupItemAction operations
|
||||
The default value is 4 hour.
|
||||
type: string
|
||||
labelSelector:
|
||||
description: |-
|
||||
LabelSelector is a metav1.LabelSelector to filter with
|
||||
when adding individual objects to the backup. If empty
|
||||
or nil, all objects are included. Optional.
|
||||
nullable: true
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector
|
||||
requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector
|
||||
applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
metadata:
|
||||
properties:
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
orLabelSelectors:
|
||||
description: |-
|
||||
OrLabelSelectors is list of metav1.LabelSelector to filter with
|
||||
when adding individual objects to the backup. If multiple provided
|
||||
they will be joined by the OR operator. LabelSelector as well as
|
||||
OrLabelSelectors cannot co-exist in backup request, only one of them
|
||||
can be used.
|
||||
items:
|
||||
description: |-
|
||||
A label selector is a label query over a set of resources. The result of matchLabels and
|
||||
matchExpressions are ANDed. An empty label selector matches all objects. A null
|
||||
label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector
|
||||
requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector
|
||||
applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
nullable: true
|
||||
type: array
|
||||
orderedResources:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
OrderedResources specifies the backup order of resources of specific Kind.
|
||||
The map key is the resource name and value is a list of object names separated by commas.
|
||||
Each resource name has format "namespace/objectname". For cluster resources, simply use "objectname".
|
||||
nullable: true
|
||||
type: object
|
||||
resourcePolicy:
|
||||
description: ResourcePolicy specifies the referenced resource
|
||||
policies that backup should follow
|
||||
properties:
|
||||
apiGroup:
|
||||
description: |-
|
||||
APIGroup is the group for the resource being referenced.
|
||||
If APIGroup is not specified, the specified Kind must be in the core API group.
|
||||
For any other third-party types, APIGroup is required.
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is the type of resource being referenced
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of resource being referenced
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
snapshotMoveData:
|
||||
description: SnapshotMoveData specifies whether snapshot data
|
||||
should be moved
|
||||
nullable: true
|
||||
type: boolean
|
||||
snapshotVolumes:
|
||||
description: |-
|
||||
SnapshotVolumes specifies whether to take snapshots
|
||||
of any PV's referenced in the set of objects included
|
||||
in the Backup.
|
||||
nullable: true
|
||||
type: boolean
|
||||
storageLocation:
|
||||
description: StorageLocation is a string containing the name
|
||||
of a BackupStorageLocation where the backup should be stored.
|
||||
type: string
|
||||
ttl:
|
||||
description: |-
|
||||
TTL is a time.Duration-parseable string describing how long
|
||||
the Backup should be retained for.
|
||||
type: string
|
||||
uploaderConfig:
|
||||
description: UploaderConfig specifies the configuration for
|
||||
the uploader.
|
||||
nullable: true
|
||||
properties:
|
||||
parallelFilesUpload:
|
||||
description: ParallelFilesUpload is the number of files
|
||||
parallel uploads to perform when using the uploader.
|
||||
type: integer
|
||||
type: object
|
||||
volumeSnapshotLocations:
|
||||
description: VolumeSnapshotLocations is a list containing names
|
||||
of VolumeSnapshotLocations associated with this backup.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
useOwnerReferencesInBackup:
|
||||
description: |-
|
||||
UseOwnerReferencesBackup specifies whether to use
|
||||
OwnerReferences on backups created by this Schedule.
|
||||
nullable: true
|
||||
type: boolean
|
||||
required:
|
||||
- schedule
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
description: ScheduleStatus captures the current state of a Velero schedule
|
||||
properties:
|
||||
lastBackup:
|
||||
description: |-
|
||||
LastBackup is the last time a Backup was run for this
|
||||
Schedule schedule
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
lastSkipped:
|
||||
description: LastSkipped is the last time a Schedule was skipped
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
phase:
|
||||
description: Phase is the current phase of the Schedule
|
||||
enum:
|
||||
- New
|
||||
- Enabled
|
||||
- FailedValidation
|
||||
type: string
|
||||
validationErrors:
|
||||
description: |-
|
||||
ValidationErrors is a slice of all validation errors (if
|
||||
applicable)
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: serverstatusrequests.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: ServerStatusRequest
|
||||
listKind: ServerStatusRequestList
|
||||
plural: serverstatusrequests
|
||||
shortNames:
|
||||
- ssr
|
||||
singular: serverstatusrequest
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
ServerStatusRequest is a request to access current status information about
|
||||
the Velero server.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: ServerStatusRequestSpec is the specification for a ServerStatusRequest.
|
||||
type: object
|
||||
status:
|
||||
description: ServerStatusRequestStatus is the current status of a ServerStatusRequest.
|
||||
properties:
|
||||
phase:
|
||||
description: Phase is the current lifecycle phase of the ServerStatusRequest.
|
||||
enum:
|
||||
- New
|
||||
- Processed
|
||||
type: string
|
||||
plugins:
|
||||
description: Plugins list information about the plugins running
|
||||
on the Velero server
|
||||
items:
|
||||
description: PluginInfo contains attributes of a Velero plugin
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
nullable: true
|
||||
type: array
|
||||
processedTimestamp:
|
||||
description: |-
|
||||
ProcessedTimestamp is when the ServerStatusRequest was processed
|
||||
by the ServerStatusRequestController.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
serverVersion:
|
||||
description: ServerVersion is the Velero server version.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
@@ -0,0 +1,97 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
component: velero
|
||||
name: volumesnapshotlocations.velero.io
|
||||
spec:
|
||||
group: velero.io
|
||||
names:
|
||||
kind: VolumeSnapshotLocation
|
||||
listKind: VolumeSnapshotLocationList
|
||||
plural: volumesnapshotlocations
|
||||
shortNames:
|
||||
- vsl
|
||||
singular: volumesnapshotlocation
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VolumeSnapshotLocation is a location where Velero stores volume
|
||||
snapshots.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: VolumeSnapshotLocationSpec defines the specification for
|
||||
a Velero VolumeSnapshotLocation.
|
||||
properties:
|
||||
config:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Config is for provider-specific configuration fields.
|
||||
type: object
|
||||
credential:
|
||||
description: Credential contains the credential information intended
|
||||
to be used with this location
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be
|
||||
a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
provider:
|
||||
description: Provider is the provider of the volume storage.
|
||||
type: string
|
||||
required:
|
||||
- provider
|
||||
type: object
|
||||
status:
|
||||
description: VolumeSnapshotLocationStatus describes the current status
|
||||
of a Velero VolumeSnapshotLocation.
|
||||
properties:
|
||||
phase:
|
||||
description: VolumeSnapshotLocationPhase is the lifecycle phase
|
||||
of a Velero VolumeSnapshotLocation.
|
||||
enum:
|
||||
- Available
|
||||
- Unavailable
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
80
packages/system/velero/charts/velero/templates/NOTES.txt
Normal file
80
packages/system/velero/charts/velero/templates/NOTES.txt
Normal file
@@ -0,0 +1,80 @@
|
||||
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
|
||||
|
||||
{{- /*
|
||||
Breaking changes.
|
||||
*/}}
|
||||
|
||||
{{- $breaking := "" }}
|
||||
{{- $breaking_title := "\n" }}
|
||||
{{- $breaking_title = print $breaking_title "\n#################################################################################" }}
|
||||
{{- $breaking_title = print $breaking_title "\n###### BREAKING: The config values passed contained no longer accepted #####" }}
|
||||
{{- $breaking_title = print $breaking_title "\n###### options. See the messages below for more details. #####" }}
|
||||
{{- $breaking_title = print $breaking_title "\n###### #####" }}
|
||||
{{- $breaking_title = print $breaking_title "\n###### To verify your updated config is accepted, you can use #####" }}
|
||||
{{- $breaking_title = print $breaking_title "\n###### the `helm template` command. #####" }}
|
||||
{{- $breaking_title = print $breaking_title "\n#################################################################################" }}
|
||||
|
||||
{{- if typeIs "map[string]interface {}" .Values.configuration.backupStorageLocation }}
|
||||
{{- $breaking = print $breaking "\n\nERROR: Please make .configuration.backupStorageLocation from map to slice" }}
|
||||
{{- end }}
|
||||
|
||||
{{- if typeIs "map[string]interface {}" .Values.configuration.volumeSnapshotLocation }}
|
||||
{{- $breaking = print $breaking "\n\nERROR: Please make .configuration.volumeSnapshotLocation from map to slice" }}
|
||||
{{- end }}
|
||||
|
||||
{{- if hasKey .Values.configuration "provider" }}
|
||||
{{- $breaking = print $breaking "\n\nREMOVED: .configuration.provider has been removed, instead each backupStorageLocation and volumeSnapshotLocation has a provider configured" }}
|
||||
{{- end }}
|
||||
|
||||
{{- if hasKey .Values "resticTimeout" }}
|
||||
{{- $breaking = print $breaking "\n\nREMOVED: resticTimeout has been removed, and it is named fsBackupTimeout" }}
|
||||
{{- end }}
|
||||
|
||||
{{- if hasKey .Values "defaultVolumesToRestic" }}
|
||||
{{- $breaking = print $breaking "\n\nREMOVED: defaultVolumesToRestic has been removed, and it is named defaultVolumesToFsBackup" }}
|
||||
{{- end }}
|
||||
|
||||
{{- if hasKey .Values "defaultResticPruneFrequency" }}
|
||||
{{- $breaking = print $breaking "\n\nREMOVED: defaultResticPruneFrequency has been removed, and it is named defaultRepoMaintainFrequency" }}
|
||||
{{- end }}
|
||||
|
||||
{{- if hasKey .Values "deployRestic" }}
|
||||
{{- $breaking = print $breaking "\n\nREMOVED: deployRestic has been removed, and it is named deployNodeAgent" }}
|
||||
{{- end }}
|
||||
|
||||
{{- if hasKey .Values "restic" }}
|
||||
{{- $breaking = print $breaking "\n\nREMOVED: restic has been removed, and it is named nodeAgent" }}
|
||||
{{- end }}
|
||||
|
||||
{{- if hasKey .Values.configMaps "restic-restore-action-config" }}
|
||||
{{- $breaking = print $breaking "\n\nREMOVED: restic-restore-action-config has been removed, and it is named fs-restore-action-config" }}
|
||||
{{- end }}
|
||||
|
||||
{{- range $key, $value := .Values.configMaps }}
|
||||
{{- if eq $key "fs-restore-action-config" }}
|
||||
{{- if hasKey $value.labels "velero.io/restic" }}
|
||||
{{- $breaking = print $breaking "\n\nREMOVED: velero.io/restic has been removed, and it is named velero.io/pod-volume-restore" }}
|
||||
{{- end }}
|
||||
{{- if and $value.data.image }}
|
||||
{{- if contains "velero-restic-restore-helper" $value.data.image }}
|
||||
{{- $breaking = print $breaking "\n\nREMOVED: restore helper image velero-restic-restore-helper has been changed to velero-restore-helper" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if $breaking }}
|
||||
{{- fail (print $breaking_title $breaking) }}
|
||||
{{- end }}
|
||||
118
packages/system/velero/charts/velero/templates/_helpers.tpl
Normal file
118
packages/system/velero/charts/velero/templates/_helpers.tpl
Normal file
@@ -0,0 +1,118 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "velero.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "velero.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "velero.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use for creating or deleting the velero server
|
||||
*/}}
|
||||
{{- define "velero.serverServiceAccount" -}}
|
||||
{{- if .Values.serviceAccount.server.create -}}
|
||||
{{ default (printf "%s-%s" (include "velero.fullname" .) "server") .Values.serviceAccount.server.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.server.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name for the credentials secret.
|
||||
*/}}
|
||||
{{- define "velero.secretName" -}}
|
||||
{{- if .Values.credentials.existingSecret -}}
|
||||
{{- .Values.credentials.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{ default (include "velero.fullname" .) .Values.credentials.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the Velero priority class name.
|
||||
*/}}
|
||||
{{- define "velero.priorityClassName" -}}
|
||||
{{- if .Values.priorityClassName -}}
|
||||
{{- .Values.priorityClassName -}}
|
||||
{{- else -}}
|
||||
{{- include "velero.fullname" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the Velero runtime class name.
|
||||
*/}}
|
||||
{{- define "velero.runtimeClassName" -}}
|
||||
{{- if .Values.runtimeClassName -}}
|
||||
{{- .Values.runtimeClassName -}}
|
||||
{{- else -}}
|
||||
{{- include "velero.fullname" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the node-Agent priority class name.
|
||||
*/}}
|
||||
{{- define "velero.nodeAgent.priorityClassName" -}}
|
||||
{{- if .Values.nodeAgent.priorityClassName -}}
|
||||
{{- .Values.nodeAgent.priorityClassName -}}
|
||||
{{- else -}}
|
||||
{{- include "velero.fullname" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the node-Agent runtime class name.
|
||||
*/}}
|
||||
{{- define "velero.nodeAgent.runtimeClassName" -}}
|
||||
{{- if .Values.nodeAgent.runtimeClassName -}}
|
||||
{{- .Values.nodeAgent.runtimeClassName -}}
|
||||
{{- else -}}
|
||||
{{- include "velero.fullname" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Kubernetes version
|
||||
Built-in object .Capabilities.KubeVersion.Minor can provide non-number output
|
||||
For examples:
|
||||
- on GKE it returns "18+" instead of "18"
|
||||
- on EKS it returns "20+" instead of "20"
|
||||
*/}}
|
||||
{{- define "chart.KubernetesVersion" -}}
|
||||
{{- $minorVersion := .Capabilities.KubeVersion.Minor | regexFind "[0-9]+" -}}
|
||||
{{- printf "%s.%s" .Capabilities.KubeVersion.Major $minorVersion -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Calculate the checksum of the credentials secret.
|
||||
*/}}
|
||||
{{- define "chart.config-checksum" -}}
|
||||
{{- tpl (print .Values.credentials.secretContents .Values.credentials.extraEnvVars ) $ | sha256sum -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,56 @@
|
||||
{{- if .Values.backupsEnabled }}
|
||||
|
||||
{{- if typeIs "[]interface {}" .Values.configuration.backupStorageLocation }}
|
||||
{{- range .Values.configuration.backupStorageLocation }}
|
||||
---
|
||||
apiVersion: velero.io/v1
|
||||
kind: BackupStorageLocation
|
||||
metadata:
|
||||
name: {{ .name | default "default" }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
{{- with .annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{- $key | nindent 4 }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "velero.name" $ }}
|
||||
app.kubernetes.io/instance: {{ $.Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||||
helm.sh/chart: {{ include "velero.chart" $ }}
|
||||
spec:
|
||||
{{- if not (empty .credential) }}
|
||||
credential:
|
||||
{{- with .credential.name }}
|
||||
name: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .credential.key }}
|
||||
key: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
provider: {{ .provider }}
|
||||
accessMode: {{ .accessMode | default "ReadWrite" }}
|
||||
{{- with .default }}
|
||||
default: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .validationFrequency }}
|
||||
validationFrequency: {{ . }}
|
||||
{{- end }}
|
||||
objectStorage:
|
||||
bucket: {{ .bucket | quote }}
|
||||
{{- with .prefix }}
|
||||
prefix: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- with .caCert }}
|
||||
caCert: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .config }}
|
||||
config:
|
||||
{{- range $key, $value := . }}
|
||||
{{- $key | nindent 4 }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,85 @@
|
||||
{{- if .Values.cleanUpCRDs }}
|
||||
# This job is meant primarily for cleaning up on CI systems.
|
||||
# Using this on production systems, especially those that have multiple releases of Velero, will be destructive.
|
||||
{{/* 'securityContext' got renamed to 'podSecurityContext', merge both dicts into one for backward compatibility */}}
|
||||
{{- $podSecurityContext := merge (.Values.podSecurityContext | default dict) (.Values.securityContext | default dict) -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "velero.fullname" . }}-cleanup-crds
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-delete
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "velero.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
helm.sh/chart: {{ include "velero.chart" . }}
|
||||
spec:
|
||||
backoffLimit: 3
|
||||
template:
|
||||
metadata:
|
||||
name: velero-cleanup-crds
|
||||
{{- with .Values.kubectl.labels }}
|
||||
labels:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.kubectl.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.image.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "velero.serverServiceAccount" . }}
|
||||
containers:
|
||||
- name: kubectl
|
||||
{{- if .Values.kubectl.image.digest }}
|
||||
image: "{{ .Values.kubectl.image.repository }}@{{ .Values.kubectl.image.digest }}"
|
||||
{{- else if .Values.kubectl.image.tag }}
|
||||
image: "{{ .Values.kubectl.image.repository }}:{{ .Values.kubectl.image.tag }}"
|
||||
{{- else }}
|
||||
image: "{{ .Values.kubectl.image.repository }}:{{ template "chart.KubernetesVersion" . }}"
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- >
|
||||
kubectl delete restore --all;
|
||||
kubectl delete backup --all;
|
||||
kubectl delete backupstoragelocation --all;
|
||||
kubectl delete volumesnapshotlocation --all;
|
||||
kubectl delete podvolumerestore --all;
|
||||
kubectl delete crd -l component=velero;
|
||||
{{- with .Values.kubectl.containerSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.kubectl.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
restartPolicy: OnFailure
|
||||
{{- with $podSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- if and .Values.rbac.create .Values.rbac.clusterAdministrator }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ include "velero.fullname" . }}-server
|
||||
labels:
|
||||
app.kubernetes.io/component: server
|
||||
app.kubernetes.io/name: {{ include "velero.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
helm.sh/chart: {{ include "velero.chart" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
namespace: {{ .Release.Namespace }}
|
||||
name: {{ include "velero.serverServiceAccount" . }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: {{ .Values.rbac.clusterAdministratorName }}
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
{{- end }}
|
||||
@@ -0,0 +1,18 @@
|
||||
{{- range $configMapName, $configMap := .Values.configMaps }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "velero.fullname" $ }}-{{ $configMapName }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "velero.name" $ }}
|
||||
app.kubernetes.io/instance: {{ $.Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||||
helm.sh/chart: {{ include "velero.chart" $ }}
|
||||
{{- with $configMap.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
{{- toYaml $configMap.data | nindent 2 }}
|
||||
---
|
||||
{{- end }}
|
||||
325
packages/system/velero/charts/velero/templates/deployment.yaml
Normal file
325
packages/system/velero/charts/velero/templates/deployment.yaml
Normal file
@@ -0,0 +1,325 @@
|
||||
{{/* 'securityContext' got renamed to 'podSecurityContext', merge both dicts into one for backward compatibility */}}
|
||||
{{- $podSecurityContext := merge (.Values.podSecurityContext | default dict) (.Values.securityContext | default dict) -}}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "velero.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- with .Values.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "velero.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||
helm.sh/chart: {{ include "velero.chart" . }}
|
||||
component: velero
|
||||
{{- with .Values.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: 1
|
||||
{{- if .Values.revisionHistoryLimit }}
|
||||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
||||
{{- end }}
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/name: {{ include "velero.name" . }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: velero
|
||||
app.kubernetes.io/name: {{ include "velero.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||
helm.sh/chart: {{ include "velero.chart" . }}
|
||||
{{- if .Values.podLabels }}
|
||||
{{- toYaml .Values.podLabels | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.podAnnotations .Values.metrics.enabled (and .Values.credentials.useSecret (not .Values.credentials.existingSecret)) }}
|
||||
annotations:
|
||||
{{- with .Values.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if and (.Values.metrics.enabled) (not .Values.metrics.serviceMonitor.enabled) }}
|
||||
{{- with .Values.metrics.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.credentials.useSecret (not .Values.credentials.existingSecret) }}
|
||||
checksum/secret: {{ template "chart.config-checksum" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.hostAliases -}}
|
||||
hostAliases:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.image.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
restartPolicy: Always
|
||||
serviceAccountName: {{ include "velero.serverServiceAccount" . }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.server.automountServiceAccountToken }}
|
||||
{{- if .Values.priorityClassName }}
|
||||
priorityClassName: {{ include "velero.priorityClassName" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.runtimeClassName }}
|
||||
runtimeClassName: {{ include "velero.runtimeClassName" . }}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
||||
containers:
|
||||
- name: velero
|
||||
{{- if .Values.image.digest }}
|
||||
image: "{{ .Values.image.repository }}@{{ .Values.image.digest }}"
|
||||
{{- else }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
ports:
|
||||
- name: http-monitoring
|
||||
containerPort: 8085
|
||||
{{- end }}
|
||||
command:
|
||||
- /velero
|
||||
args:
|
||||
- server
|
||||
### Flags
|
||||
{{- with .Values.configuration }}
|
||||
- --uploader-type={{ default "kopia" .uploaderType }}
|
||||
{{- with .backupSyncPeriod }}
|
||||
- --backup-sync-period={{ . }}
|
||||
{{- end }}
|
||||
{{- with .fsBackupTimeout }}
|
||||
- --fs-backup-timeout={{ . }}
|
||||
{{- end }}
|
||||
{{- with .clientBurst }}
|
||||
- --client-burst={{ . }}
|
||||
{{- end }}
|
||||
{{- with .clientPageSize }}
|
||||
- --client-page-size={{ . }}
|
||||
{{- end }}
|
||||
{{- with .clientQPS }}
|
||||
- --client-qps={{ . }}
|
||||
{{- end }}
|
||||
{{- with .defaultBackupStorageLocation }}
|
||||
- --default-backup-storage-location={{ . }}
|
||||
{{- end }}
|
||||
{{- with .defaultBackupTTL }}
|
||||
- --default-backup-ttl={{ . }}
|
||||
{{- end }}
|
||||
{{- with .defaultItemOperationTimeout }}
|
||||
- --default-item-operation-timeout={{ . }}
|
||||
{{- end }}
|
||||
{{- with .defaultVolumeSnapshotLocations }}
|
||||
- --default-volume-snapshot-locations={{ . }}
|
||||
{{- end }}
|
||||
{{- if .defaultVolumesToFsBackup }}
|
||||
- --default-volumes-to-fs-backup
|
||||
{{- end }}
|
||||
{{- with .defaultRepoMaintainFrequency }}
|
||||
- --default-repo-maintain-frequency={{ . }}
|
||||
{{- end }}
|
||||
{{- with .disableControllers }}
|
||||
- --disable-controllers={{ . }}
|
||||
{{- end }}
|
||||
{{- with .disableInformerCache }}
|
||||
- --disable-informer-cache={{ . }}
|
||||
{{- end }}
|
||||
{{- with .garbageCollectionFrequency }}
|
||||
- --garbage-collection-frequency={{ . }}
|
||||
{{- end }}
|
||||
{{- with .itemBlockWorkerCount }}
|
||||
- --item-block-worker-count={{ . }}
|
||||
{{- end }}
|
||||
{{- with .logFormat }}
|
||||
- --log-format={{ . }}
|
||||
{{- end }}
|
||||
{{- with .logLevel }}
|
||||
- --log-level={{ . }}
|
||||
{{- end }}
|
||||
{{- with .metricsAddress }}
|
||||
- --metrics-address={{ . }}
|
||||
{{- end }}
|
||||
{{- with .pluginDir }}
|
||||
- --plugin-dir={{ . }}
|
||||
{{- end }}
|
||||
{{- with .profilerAddress }}
|
||||
- --profiler-address={{ . }}
|
||||
{{- end }}
|
||||
{{- if .restoreOnlyMode }}
|
||||
- --restore-only
|
||||
{{- end }}
|
||||
{{- with .restoreResourcePriorities }}
|
||||
- --restore-resource-priorities={{ . }}
|
||||
{{- end }}
|
||||
{{- with .storeValidationFrequency }}
|
||||
- --store-validation-frequency={{ . }}
|
||||
{{- end }}
|
||||
{{- with .terminatingResourceTimeout }}
|
||||
- --terminating-resource-timeout={{ . }}
|
||||
{{- end }}
|
||||
{{- with .defaultSnapshotMoveData }}
|
||||
- --default-snapshot-move-data={{ . }}
|
||||
{{- end }}
|
||||
### Global Flags
|
||||
{{- with .features }}
|
||||
- --features={{ . }}
|
||||
{{- end }}
|
||||
{{- with .namespace }}
|
||||
- --namespace={{ . }}
|
||||
{{- end }}
|
||||
{{- with .repositoryMaintenanceJob }}
|
||||
{{- with .requests }}
|
||||
{{- with .cpu }}
|
||||
- --maintenance-job-cpu-request={{ . }}
|
||||
{{- end }}
|
||||
{{- with .memory }}
|
||||
- --maintenance-job-mem-request={{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .limits }}
|
||||
{{- with .cpu }}
|
||||
- --maintenance-job-cpu-limit={{ . }}
|
||||
{{- end }}
|
||||
{{- with .memory }}
|
||||
- --maintenance-job-mem-limit={{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .latestJobsCount }}
|
||||
- --keep-latest-maintenance-jobs={{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .extraArgs }}
|
||||
### User-supplied overwrite flags
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
{{- with .Values.livenessProbe }}
|
||||
livenessProbe: {{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.readinessProbe }}
|
||||
readinessProbe: {{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.containerSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: plugins
|
||||
mountPath: /plugins
|
||||
{{- if .Values.credentials.useSecret }}
|
||||
- name: cloud-credentials
|
||||
mountPath: /credentials
|
||||
{{- end }}
|
||||
- name: scratch
|
||||
mountPath: /scratch
|
||||
{{- if .Values.containerSecurityContext.readOnlyRootFilesystem }}
|
||||
- name: tmpdir
|
||||
mountPath: /tmp
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.credentials.extraSecretRef }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ .Values.credentials.extraSecretRef }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: VELERO_SCRATCH_DIR
|
||||
value: /scratch
|
||||
- name: VELERO_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
- name: LD_LIBRARY_PATH
|
||||
value: /plugins
|
||||
{{- if .Values.credentials.useSecret }}
|
||||
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||
value: /credentials/cloud
|
||||
- name: GOOGLE_APPLICATION_CREDENTIALS
|
||||
value: /credentials/cloud
|
||||
- name: AZURE_CREDENTIALS_FILE
|
||||
value: /credentials/cloud
|
||||
- name: ALIBABA_CLOUD_CREDENTIALS_FILE
|
||||
value: /credentials/cloud
|
||||
{{- end }}
|
||||
{{- with .Values.configuration.extraEnvVars }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.credentials.extraEnvVars }}
|
||||
{{- range $key, $value := . }}
|
||||
- name: {{ default "none" $key }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "velero.secretName" $ }}
|
||||
key: {{ default "none" $key }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.lifecycle }}
|
||||
lifecycle: {{ toYaml .Values.lifecycle | nindent 12 }}
|
||||
{{- end }}
|
||||
dnsPolicy: {{ .Values.dnsPolicy }}
|
||||
{{- if .Values.initContainers }}
|
||||
initContainers:
|
||||
{{- if eq (typeOf .Values.initContainers) "string" }}
|
||||
{{- tpl .Values.initContainers . | nindent 8 }}
|
||||
{{- else }}
|
||||
{{- toYaml .Values.initContainers | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.credentials.useSecret }}
|
||||
- name: cloud-credentials
|
||||
secret:
|
||||
secretName: {{ include "velero.secretName" . }}
|
||||
{{- end }}
|
||||
- name: plugins
|
||||
emptyDir: {}
|
||||
- name: scratch
|
||||
emptyDir: {}
|
||||
{{- if .Values.containerSecurityContext.readOnlyRootFilesystem }}
|
||||
- name: tmpdir
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumes }}
|
||||
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with $podSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.dnsConfig }}
|
||||
dnsConfig:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,4 @@
|
||||
{{ range .Values.extraObjects }}
|
||||
---
|
||||
{{ tpl (toYaml .) $ }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,48 @@
|
||||
{{- if .Values.namespace }}
|
||||
{{- if gt (len .Values.namespace.labels) 0 }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "velero.fullname" . }}-label-namespace
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": post-install,post-upgrade,post-rollback
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "velero.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
helm.sh/chart: {{ include "velero.chart" . }}
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
serviceAccountName: {{ include "velero.serverServiceAccount" . }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.server.automountServiceAccountToken }}
|
||||
containers:
|
||||
- name: label-namespace
|
||||
{{- if .Values.kubectl.image.digest }}
|
||||
image: "{{ .Values.kubectl.image.repository }}@{{ .Values.kubectl.image.digest }}"
|
||||
{{- else if .Values.kubectl.image.tag }}
|
||||
image: "{{ .Values.kubectl.image.repository }}:{{ .Values.kubectl.image.tag }}"
|
||||
{{- else }}
|
||||
image: "{{ .Values.kubectl.image.repository }}:{{ template "chart.KubernetesVersion" . }}"
|
||||
{{- end }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
{{- range .Values.namespace.labels }}
|
||||
kubectl label namespace {{ $.Release.Namespace }} {{ .key }}={{ .value }}
|
||||
{{- end }}
|
||||
{{- if .Values.kubectl.extraVolumeMounts }}
|
||||
volumeMounts:
|
||||
{{- toYaml .Values.kubectl.extraVolumeMounts | nindent 8 }}
|
||||
{{- end }}
|
||||
restartPolicy: Never
|
||||
{{- if .Values.kubectl.extraVolumes }}
|
||||
volumes:
|
||||
{{- toYaml .Values.kubectl.extraVolumes | nindent 6 }}
|
||||
{{- end }}
|
||||
backoffLimit: 3
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,220 @@
|
||||
{{- if .Values.deployNodeAgent }}
|
||||
{{/* 'nodeAgent.securityContext' got renamed to 'nodeAgent.containerSecurityContext', merge both dicts into one for backward compatibility */}}
|
||||
{{- $containerSecurityContext := merge (.Values.nodeAgent.containerSecurityContext | default dict) (.Values.nodeAgent.securityContext | default dict) -}}
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: node-agent
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- with .Values.nodeAgent.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "velero.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
helm.sh/chart: {{ include "velero.chart" . }}
|
||||
{{- with .Values.nodeAgent.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
name: node-agent
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: node-agent
|
||||
role: node-agent
|
||||
app.kubernetes.io/name: {{ include "velero.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
helm.sh/chart: {{ include "velero.chart" . }}
|
||||
{{- if .Values.nodeAgent.podLabels }}
|
||||
{{- toYaml .Values.nodeAgent.podLabels | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.podAnnotations .Values.metrics.enabled (and .Values.credentials.useSecret (not .Values.credentials.existingSecret)) }}
|
||||
annotations:
|
||||
{{- with .Values.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if and (.Values.metrics.enabled) (not .Values.metrics.nodeAgentPodMonitor.enabled) }}
|
||||
{{- with .Values.metrics.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.credentials.useSecret (not .Values.credentials.existingSecret) }}
|
||||
checksum/secret: {{ template "chart.config-checksum" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{ with .Values.hostAliases -}}
|
||||
hostAliases:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.image.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "velero.serverServiceAccount" . }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.server.automountServiceAccountToken }}
|
||||
{{- with .Values.nodeAgent.podSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeAgent.priorityClassName }}
|
||||
priorityClassName: {{ include "velero.nodeAgent.priorityClassName" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.runtimeClassName }}
|
||||
runtimeClassName: {{ include "velero.nodeAgent.runtimeClassName" . }}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
||||
volumes:
|
||||
{{- if .Values.credentials.useSecret }}
|
||||
- name: cloud-credentials
|
||||
secret:
|
||||
secretName: {{ include "velero.secretName" . }}
|
||||
{{- end }}
|
||||
- name: host-pods
|
||||
hostPath:
|
||||
path: {{ .Values.nodeAgent.podVolumePath }}
|
||||
- name: host-plugins
|
||||
hostPath:
|
||||
path: {{ .Values.nodeAgent.pluginVolumePath | default "/var/lib/kubelet/plugins" }}
|
||||
{{- if .Values.nodeAgent.useScratchEmptyDir }}
|
||||
- name: scratch
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeAgent.extraVolumes }}
|
||||
{{- toYaml .Values.nodeAgent.extraVolumes | nindent 8 }}
|
||||
{{- end }}
|
||||
dnsPolicy: {{ .Values.nodeAgent.dnsPolicy }}
|
||||
containers:
|
||||
- name: node-agent
|
||||
{{- if .Values.image.digest }}
|
||||
image: "{{ .Values.image.repository }}@{{ .Values.image.digest }}"
|
||||
{{- else }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
ports:
|
||||
- name: http-monitoring
|
||||
containerPort: 8085
|
||||
{{- end }}
|
||||
command:
|
||||
- /velero
|
||||
args:
|
||||
- node-agent
|
||||
- server
|
||||
{{- with .Values.configuration }}
|
||||
{{- with .features }}
|
||||
- --features={{ . }}
|
||||
{{- end }}
|
||||
{{- with .dataMoverPrepareTimeout }}
|
||||
- --data-mover-prepare-timeout={{ . }}
|
||||
{{- end }}
|
||||
{{- with .logLevel }}
|
||||
- --log-level={{ . }}
|
||||
{{- end }}
|
||||
{{- with .logFormat }}
|
||||
- --log-format={{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeAgent.extraArgs }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Values.credentials.useSecret }}
|
||||
- name: cloud-credentials
|
||||
mountPath: /credentials
|
||||
{{- end }}
|
||||
- name: host-pods
|
||||
mountPath: /host_pods
|
||||
mountPropagation: HostToContainer
|
||||
- name: host-plugins
|
||||
mountPath: /host_plugins
|
||||
mountPropagation: HostToContainer
|
||||
{{- if .Values.nodeAgent.useScratchEmptyDir }}
|
||||
- name: scratch
|
||||
mountPath: /scratch
|
||||
{{- end }}
|
||||
{{- if .Values.nodeAgent.extraVolumeMounts }}
|
||||
{{- toYaml .Values.nodeAgent.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.credentials.extraSecretRef }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ .Values.credentials.extraSecretRef }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: VELERO_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: VELERO_SCRATCH_DIR
|
||||
value: /scratch
|
||||
{{- if .Values.credentials.useSecret }}
|
||||
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||
value: /credentials/cloud
|
||||
- name: GOOGLE_APPLICATION_CREDENTIALS
|
||||
value: /credentials/cloud
|
||||
- name: AZURE_CREDENTIALS_FILE
|
||||
value: /credentials/cloud
|
||||
- name: ALIBABA_CLOUD_CREDENTIALS_FILE
|
||||
value: /credentials/cloud
|
||||
{{- end }}
|
||||
{{- with .Values.configuration.extraEnvVars }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.credentials.extraEnvVars }}
|
||||
{{- range $key, $value := . }}
|
||||
- name: {{ default "none" $key }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "velero.secretName" $ }}
|
||||
key: {{ default "none" $key }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeAgent.extraEnvVars }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.lifecycle }}
|
||||
lifecycle: {{ toYaml .Values.nodeAgent.lifecycle | nindent 12 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- with $containerSecurityContext }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeAgent.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeAgent.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeAgent.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeAgent.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeAgent.dnsConfig }}
|
||||
dnsConfig:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeAgent.updateStrategy }}
|
||||
updateStrategy:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,44 @@
|
||||
{{ if and (and .Values.metrics.enabled .Values.metrics.nodeAgentPodMonitor.enabled) (or (not .Values.metrics.nodeAgentPodMonitor.autodetect) (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1")) }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
metadata:
|
||||
name: node-agent
|
||||
{{- if .Values.metrics.nodeAgentPodMonitor.namespace }}
|
||||
namespace: {{ .Values.metrics.nodeAgentPodMonitor.namespace }}
|
||||
{{- end }}
|
||||
{{- with .Values.metrics.nodeAgentPodMonitor.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "velero.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
helm.sh/chart: {{ include "velero.chart" . }}
|
||||
{{- with .Values.metrics.nodeAgentPodMonitor.additionalLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "velero.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
name: node-agent
|
||||
{{- with .Values.nodeAgent.podLabels }}
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
podMetricsEndpoints:
|
||||
- port: http-monitoring
|
||||
interval: {{ .Values.metrics.scrapeInterval }}
|
||||
scrapeTimeout: {{ .Values.metrics.scrapeTimeout }}
|
||||
{{- if .Values.metrics.nodeAgentPodMonitor.scheme }}
|
||||
scheme: {{ .Values.metrics.nodeAgentPodMonitor.scheme }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.nodeAgentPodMonitor.tlsConfig }}
|
||||
tlsConfig:
|
||||
{{- toYaml .Values.metrics.nodeAgentPodMonitor.tlsConfig | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,21 @@
|
||||
{{- if and (and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled) (or (not .Values.metrics.prometheusRule.autodetect) (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1")) (.Values.metrics.prometheusRule.spec) }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: {{ include "velero.fullname" . }}
|
||||
{{- if .Values.metrics.prometheusRule.namespace }}
|
||||
namespace: {{ .Values.metrics.prometheusRule.namespace }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "velero.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- if .Values.metrics.prometheusRule.additionalLabels }}
|
||||
{{- toYaml .Values.metrics.prometheusRule.additionalLabels | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
groups:
|
||||
- name: {{ include "velero.name" . }}
|
||||
rules:
|
||||
{{- toYaml .Values.metrics.prometheusRule.spec | nindent 4 }}
|
||||
{{- end }}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user