mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-13 11:34:54 +00:00
Merge branch 'main' into fix/backup-name-validation
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
# GitHub Copilot instructions for velero-io/velero
|
||||
|
||||
## Changelog requirement
|
||||
|
||||
Velero uses per-PR changelog fragments that are assembled into release notes.
|
||||
|
||||
### File naming convention
|
||||
|
||||
Every shipping PR must add exactly **one** file at:
|
||||
|
||||
```
|
||||
changelogs/unreleased/<PR_NUMBER>-<github_username>
|
||||
```
|
||||
|
||||
- `<PR_NUMBER>` is the pull request number (e.g. `10200`).
|
||||
- `<github_username>` is the GitHub login of the PR author (e.g. `jdoe`).
|
||||
- The file has **no extension**.
|
||||
- The file content is a single line describing the change (the PR title is a
|
||||
sensible default).
|
||||
|
||||
**Example:** PR #10200 by `jdoe` → `changelogs/unreleased/10200-jdoe`
|
||||
|
||||
The easiest way to create this file is:
|
||||
|
||||
```bash
|
||||
make new-changelog CHANGELOG_BODY="Brief description of the change"
|
||||
```
|
||||
|
||||
`make new-changelog` reads the PR number and author from `gh pr view`; the file
|
||||
is written automatically to the correct path with the correct name.
|
||||
|
||||
The CI check (`hack/changelog-check.sh`) looks for
|
||||
`changelogs/unreleased/<PR_NUMBER>-*` and fails if no file is found.
|
||||
|
||||
### When a changelog is NOT required
|
||||
|
||||
A changelog entry is **not** required when a PR exclusively changes non-shipping
|
||||
content, i.e. the only files touched belong to one or more of these categories:
|
||||
|
||||
| Category | Paths |
|
||||
|---|---|
|
||||
| GitHub Actions / CI workflows | `.github/**` |
|
||||
| Documentation | `site/content/docs/**`, `site/**`, `docs/**`, `*.md` |
|
||||
| Website (non-docs) | `site/**` (excluding `site/content/docs/**`) |
|
||||
|
||||
When you open or review a PR that falls into one of the above categories (and does
|
||||
**not** modify `pkg/`, `internal/`, `cmd/`, `vendor/`, `hack/`, `Makefile`,
|
||||
`go.mod`, `go.sum`, or `changelogs/**`), apply the label
|
||||
**`kind/changelog-not-required`** instead of requesting a changelog entry. The
|
||||
`labeler.yml` auto-labeler handles this automatically for most cases; apply the
|
||||
label manually if the auto-labeler did not.
|
||||
|
||||
## Backport / cherry-pick workflow
|
||||
|
||||
Velero uses `.github/workflows/backport.yml` to automate cherry-picks onto release
|
||||
branches.
|
||||
|
||||
- **Before merge:** comment `/backport release-1.17` (or `/cherrypick release-1.17`)
|
||||
to add the label `backport release-1.17` to the PR. Multiple branches can be
|
||||
space-delimited: `/backport release-1.17 release-1.18`. The label causes the
|
||||
backport to run automatically when the PR merges.
|
||||
- **After merge:** the same comment immediately creates the backport PR.
|
||||
- Only repository **owners, members, and collaborators** may trigger these commands.
|
||||
|
||||
## General coding guidelines
|
||||
|
||||
- Follow the existing code style of the file being edited.
|
||||
- Add unit tests for new exported functions in `pkg/`.
|
||||
- Do not commit secrets, credentials, or API tokens.
|
||||
- Keep PRs focused; prefer small, reviewable changes over large omnibus PRs.
|
||||
@@ -5,6 +5,10 @@ updates:
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
groups:
|
||||
github-actions:
|
||||
patterns:
|
||||
- "*"
|
||||
labels:
|
||||
- "Dependencies"
|
||||
- "github_actions"
|
||||
|
||||
@@ -31,3 +31,25 @@ has-e2e-2tests:
|
||||
has-unit-tests:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: pkg/**/*_test.go
|
||||
# PRs that only touch non-shipping files (.github/ config, workflows, or docs)
|
||||
# do not need a changelog entry; auto-apply the label so the changelog check passes.
|
||||
kind/changelog-not-required:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- .github/**/*
|
||||
- site/content/docs/**/*
|
||||
- site/**/*
|
||||
- '*.md'
|
||||
- docs/**/*
|
||||
- all-globs-to-all-files:
|
||||
- '!pkg/**'
|
||||
- '!internal/**'
|
||||
- '!cmd/**'
|
||||
- '!vendor/**'
|
||||
- '!hack/**'
|
||||
- '!Makefile'
|
||||
- '!go.mod'
|
||||
- '!go.sum'
|
||||
- '!changelogs/**'
|
||||
- '!**/*.go'
|
||||
|
||||
@@ -6,6 +6,10 @@ name: "Auto Assign Author"
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened, ready_for_review]
|
||||
# Watch for submitted reviews so we can re-request a second CODEOWNERS
|
||||
# review once only one maintainer has approved.
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -14,10 +18,72 @@ permissions:
|
||||
jobs:
|
||||
# Automatically assigns reviewers and owner
|
||||
add-reviews:
|
||||
if: github.repository == 'velero-io/velero'
|
||||
if: github.repository == 'velero-io/velero' && github.event_name == 'pull_request_target'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set the author of a PR as the assignee
|
||||
uses: kentaro-m/auto-assign-action@v2.0.0
|
||||
uses: kentaro-m/auto-assign-action@v2.0.2
|
||||
with:
|
||||
configuration-path: ".github/auto-assignees.yml"
|
||||
|
||||
# `.github/CODEOWNERS` automatically requests review from the
|
||||
# velero-io/maintainer team, but that request is cleared as soon as a
|
||||
# single member of the team submits a review. Since we require a minimum
|
||||
# of 2 reviewers (see `number_of_reviewers` in auto-assignees.yml), this
|
||||
# re-requests a review from the maintainer team whenever a PR still has
|
||||
# fewer than the required number of approvals, so a second CODEOWNERS
|
||||
# reviewer gets pinged.
|
||||
re-request-review:
|
||||
if: github.repository == 'velero-io/velero' && github.event_name == 'pull_request_review' && github.event.review.state == 'approved'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Re-request review from maintainers if more approvals are needed
|
||||
uses: actions/github-script@v9
|
||||
with:
|
||||
script: |
|
||||
const requiredApprovals = 2;
|
||||
const maintainerTeam = 'maintainer';
|
||||
const { owner, repo } = context.repo;
|
||||
const pull_number = context.payload.pull_request.number;
|
||||
|
||||
const { data: reviews } = await github.rest.pulls.listReviews({
|
||||
owner,
|
||||
repo,
|
||||
pull_number,
|
||||
});
|
||||
|
||||
// Count distinct users whose most recent review is an approval.
|
||||
// The Reviews API does not guarantee chronological order, so
|
||||
// sort by submission time before folding into the map.
|
||||
const sortedReviews = [...reviews].sort(
|
||||
(a, b) => new Date(a.submitted_at) - new Date(b.submitted_at)
|
||||
);
|
||||
const latestReviewByUser = new Map();
|
||||
for (const review of sortedReviews) {
|
||||
latestReviewByUser.set(review.user.login, review.state);
|
||||
}
|
||||
const approvedReviewers = [...latestReviewByUser.entries()].filter(
|
||||
([, state]) => state === 'APPROVED'
|
||||
);
|
||||
|
||||
if (approvedReviewers.length >= requiredApprovals) {
|
||||
console.log(
|
||||
`PR already has ${approvedReviewers.length} approvals, no need to re-request review.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(
|
||||
`PR has ${approvedReviewers.length}/${requiredApprovals} approvals, re-requesting review from @${owner}/${maintainerTeam}.`
|
||||
);
|
||||
|
||||
try {
|
||||
await github.rest.pulls.requestReviewers({
|
||||
owner,
|
||||
repo,
|
||||
pull_number,
|
||||
team_reviewers: [maintainerTeam],
|
||||
});
|
||||
} catch (error) {
|
||||
core.warning(`Failed to re-request review from maintainers: ${error.message}`);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
name: Backport merged pull request
|
||||
|
||||
# Automates cherry-picking merged PRs onto release branches.
|
||||
#
|
||||
# Pre-merge (open PR):
|
||||
# An authorized /backport or /cherrypick comment adds one `backport <branch>`
|
||||
# label per requested branch. These labels are then picked up automatically
|
||||
# when the PR is merged (see the pull_request_target: closed trigger below).
|
||||
#
|
||||
# Post-merge (merged PR):
|
||||
# - Label a PR with e.g. `backport release-1.17` before merging; the label
|
||||
# triggers the backport automatically when the PR closes as merged.
|
||||
# - Comment `/backport release-1.17` or `/cherrypick release-1.17` on an
|
||||
# already-merged PR to create the backport PR immediately.
|
||||
#
|
||||
# In both cases multiple target branches can be space-delimited in a comment:
|
||||
# /backport release-1.17 release-1.18
|
||||
#
|
||||
# See: https://github.com/velero-io/velero/issues/9603
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
permissions: {}
|
||||
|
||||
# Shared condition for authorized /backport or /cherrypick comments.
|
||||
# Used by both jobs below to avoid duplicating the gate logic.
|
||||
env:
|
||||
AUTHORIZED_COMMENT: >-
|
||||
${{
|
||||
github.event_name == 'issue_comment' &&
|
||||
github.event.issue.pull_request != '' &&
|
||||
github.event.comment.user.id != 97796249 &&
|
||||
contains(
|
||||
fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'),
|
||||
github.event.comment.author_association
|
||||
) &&
|
||||
(
|
||||
startsWith(github.event.comment.body, '/backport') ||
|
||||
startsWith(github.event.comment.body, '/cherrypick')
|
||||
)
|
||||
}}
|
||||
|
||||
jobs:
|
||||
# ── Pre-merge: convert a /backport or /cherrypick comment into labels ───────
|
||||
# When the PR is still open the backport-action cannot run (it requires a
|
||||
# merged commit). Instead, add one `backport <branch>` label per requested
|
||||
# branch so that the post-merge job picks them up automatically on close.
|
||||
label-for-backport:
|
||||
name: Label PR for deferred backport
|
||||
# Run only when an authorized command is posted on an *open* (unmerged) PR.
|
||||
if: >
|
||||
github.repository == 'velero-io/velero' &&
|
||||
github.event_name == 'issue_comment' &&
|
||||
github.event.issue.pull_request != '' &&
|
||||
github.event.issue.state == 'open' &&
|
||||
github.event.comment.user.id != 97796249 &&
|
||||
contains(
|
||||
fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'),
|
||||
github.event.comment.author_association
|
||||
) &&
|
||||
(
|
||||
startsWith(github.event.comment.body, '/backport') ||
|
||||
startsWith(github.event.comment.body, '/cherrypick')
|
||||
)
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write # apply labels to the PR (PRs share the issues API)
|
||||
steps:
|
||||
- name: Parse branches and apply labels
|
||||
env:
|
||||
COMMENT_BODY: ${{ github.event.comment.body }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
REPO: ${{ github.repository }}
|
||||
PR_NUMBER: ${{ github.event.issue.number }}
|
||||
run: |
|
||||
# Extract branch names from the first line of the comment.
|
||||
# Strip the /backport or /cherrypick prefix; what remains is a
|
||||
# space-delimited list of target branch names.
|
||||
line=$(printf '%s' "$COMMENT_BODY" | head -n1 | tr -d '\r')
|
||||
branches=$(printf '%s' "$line" | sed -E 's#^/(backport|cherrypick)[[:space:]]*##')
|
||||
|
||||
if [ -z "$branches" ]; then
|
||||
echo "No target branches specified in comment; nothing to label."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for branch in $branches; do
|
||||
label="backport ${branch}"
|
||||
echo "Applying label: '${label}'"
|
||||
# Create the label if it does not exist yet (idempotent).
|
||||
gh label create "${label}" --repo "${REPO}" --color "0075ca" \
|
||||
--description "Backport to ${branch}" 2>/dev/null || true
|
||||
gh issue edit "${PR_NUMBER}" --repo "${REPO}" --add-label "${label}"
|
||||
done
|
||||
|
||||
# ── Post-merge: create backport PRs ─────────────────────────────────────────
|
||||
backport:
|
||||
name: Backport pull request
|
||||
# Exclude comments from the backport-action bot (user id 97796249) to prevent
|
||||
# recursive triggers. The bot does not post /backport commands, so startsWith
|
||||
# already blocks recursion; the id check is defense in depth.
|
||||
if: >
|
||||
github.repository == 'velero-io/velero' &&
|
||||
(
|
||||
(
|
||||
github.event_name == 'pull_request_target' &&
|
||||
github.event.pull_request.merged &&
|
||||
contains(toJSON(github.event.pull_request.labels.*.name), '"backport ')
|
||||
) || (
|
||||
github.event_name == 'issue_comment' &&
|
||||
github.event.issue.pull_request != '' &&
|
||||
github.event.issue.state == 'closed' &&
|
||||
github.event.comment.user.id != 97796249 &&
|
||||
contains(
|
||||
fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'),
|
||||
github.event.comment.author_association
|
||||
) &&
|
||||
(
|
||||
startsWith(github.event.comment.body, '/backport') ||
|
||||
startsWith(github.event.comment.body, '/cherrypick')
|
||||
)
|
||||
)
|
||||
)
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # push backport branches and comment
|
||||
pull-requests: write # open backport PRs
|
||||
steps:
|
||||
- name: Parse target branches from comment
|
||||
id: parse
|
||||
if: github.event_name == 'issue_comment'
|
||||
env:
|
||||
COMMENT_BODY: ${{ github.event.comment.body }}
|
||||
run: |
|
||||
# First line only; strip /backport or /cherrypick prefix.
|
||||
# Remaining text is a space-delimited list of target branches
|
||||
# (may be empty, falls back to labels).
|
||||
line=$(printf '%s' "$COMMENT_BODY" | head -n1 | tr -d '\r')
|
||||
branches=$(printf '%s' "$line" | sed -E 's#^/(backport|cherrypick)[[:space:]]*##')
|
||||
echo "branches=${branches}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Create backport pull requests
|
||||
# Pin to commit SHA: workflow has contents/pull-requests write.
|
||||
uses: korthout/backport-action@2e830a1d0b8269505846ddd407a70876913ad1f8 # v4.6.0
|
||||
with:
|
||||
# Labels like `backport release-1.17` select the target branch.
|
||||
label_pattern: '^backport ([^ ]+)$'
|
||||
# Prefer draft PRs with conflict markers over failing the job silently.
|
||||
experimental: |
|
||||
{
|
||||
"conflict_resolution": "draft_commit_conflicts"
|
||||
}
|
||||
# Empty when triggered by merge labels; set when `/backport` or `/cherrypick` includes branches.
|
||||
target_branches: ${{ steps.parse.outputs.branches }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -32,21 +32,21 @@ jobs:
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set up Go version
|
||||
uses: actions/setup-go@v6
|
||||
uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version: ${{ needs.get-go-version.outputs.version }}
|
||||
|
||||
# Look for a CLI that's made for this PR
|
||||
- name: Fetch built CLI
|
||||
id: cli-cache
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: ./_output/bin/linux/amd64/velero
|
||||
# The cache key a combination of the current PR number and the commit SHA
|
||||
key: velero-cli-${{ github.event.pull_request.number }}-${{ github.sha }}
|
||||
- name: Fetch built image
|
||||
id: image-cache
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: ./velero.tar
|
||||
# The cache key a combination of the current PR number and the commit SHA
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
docker save velero:pr-test-linux-amd64 -o ./velero.tar
|
||||
# Build the MinIO image once for all e2e tests, from the reviewed bitnami/containers commit.
|
||||
- name: Cache MinIO Image
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v6
|
||||
id: minio-cache
|
||||
with:
|
||||
path: ./minio-image.tar
|
||||
@@ -122,13 +122,13 @@ jobs:
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set up Go version
|
||||
uses: actions/setup-go@v6
|
||||
uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version: ${{ needs.get-go-version.outputs.version }}
|
||||
|
||||
# Fetch the pre-built MinIO image from the build job
|
||||
- name: Fetch built MinIO Image
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v6
|
||||
id: minio-cache
|
||||
with:
|
||||
path: ./minio-image.tar
|
||||
@@ -147,13 +147,13 @@ jobs:
|
||||
node_image: "kindest/node:v${{ matrix.k8s }}"
|
||||
- name: Fetch built CLI
|
||||
id: cli-cache
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: ./_output/bin/linux/amd64/velero
|
||||
key: velero-cli-${{ github.event.pull_request.number }}-${{ github.sha }}
|
||||
- name: Fetch built Image
|
||||
id: image-cache
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: ./velero.tar
|
||||
key: velero-image-${{ github.event.pull_request.number }}-${{ github.sha }}
|
||||
@@ -169,7 +169,7 @@ jobs:
|
||||
EOF
|
||||
|
||||
# Match kubectl version to k8s server version
|
||||
curl -LO https://dl.k8s.io/release/v${{ matrix.k8s }}/bin/linux/amd64/kubectl
|
||||
curl -fLO https://dl.k8s.io/release/v${{ matrix.k8s }}/bin/linux/amd64/kubectl
|
||||
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
|
||||
|
||||
git init -q /tmp/kibishii
|
||||
|
||||
@@ -31,6 +31,6 @@ jobs:
|
||||
output: 'trivy-results.sarif'
|
||||
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
uses: github/codeql-action/upload-sarif@v4.37.3
|
||||
uses: github/codeql-action/upload-sarif@v4.37.6
|
||||
with:
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set up Go version
|
||||
uses: actions/setup-go@v6
|
||||
uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version: ${{ needs.get-go-version.outputs.version }}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set up Go version
|
||||
uses: actions/setup-go@v6
|
||||
uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version: ${{ needs.get-go-version.outputs.version }}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
if: github.repository == 'velero-io/velero'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: jpmcb/prow-github-actions@f4d01dd4b13f289014c23fe5a19878a2479cb35b # v1.1.3
|
||||
- uses: jpmcb/prow-github-actions@c44ac3a57d67639e39e4a4988b52049ef45b80dd # v2.0.0
|
||||
with:
|
||||
# TODO: before allowing the /lgtm command, see if we can block merging if changelog labels are missing.
|
||||
prow-commands: |
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Set up Go version
|
||||
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6
|
||||
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
|
||||
with:
|
||||
go-version: ${{ needs.get-go-version.outputs.version }}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ jobs:
|
||||
if: github.repository == 'velero-io/velero'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v10.1.1
|
||||
- uses: actions/stale@v11.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: "This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands."
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Fix restore-wait init container ignoring pod-level securityContext, falling back to hardcoded runAsUser 1000 instead of the workload's own uid/gid, causing fs-backup restores to deadlock at Init:0/1 on owner-restricted volumes
|
||||
@@ -0,0 +1 @@
|
||||
Verify extracted item paths stay inside the backup directory
|
||||
@@ -0,0 +1 @@
|
||||
Cancel hook exec stream on timeout and bound hook timeouts
|
||||
@@ -0,0 +1 @@
|
||||
Fix block uploader restore validation and BatchForget error handling
|
||||
@@ -0,0 +1 @@
|
||||
Add GitHub Action to automate backport/cherry-pick onto release branches
|
||||
@@ -0,0 +1 @@
|
||||
Fix excluded namespace objects leaking into backups when using cross-namespace listing
|
||||
@@ -0,0 +1 @@
|
||||
Fixed a bug in the backup sync controller where transient API errors could cause backups to incorrectly lose their schedule owner references.
|
||||
@@ -0,0 +1 @@
|
||||
Add curl --fail flag to kubectl download in e2e kind workflow
|
||||
@@ -0,0 +1 @@
|
||||
Support to set data mover for the uploader from volume policy.
|
||||
@@ -0,0 +1 @@
|
||||
Add printer columns for Backup and Restore CRDs so kubectl shows status, errors, warnings and timing
|
||||
@@ -0,0 +1 @@
|
||||
Show n/a instead of <nil> for unset timestamps in velero backup get and velero restore get
|
||||
@@ -0,0 +1 @@
|
||||
Add printer columns for VolumeSnapshotLocation so kubectl shows provider and phase
|
||||
@@ -0,0 +1 @@
|
||||
Add missing test assertions for PVCBackupSummary in podvolume backupper
|
||||
@@ -0,0 +1 @@
|
||||
Add prefetch mechanism to object reader so as to improve the restore throughput of block data mover
|
||||
@@ -0,0 +1 @@
|
||||
Add "SnapshotClass" to DataUploadResult
|
||||
@@ -0,0 +1 @@
|
||||
Add a troubleshooting entry for artifact downloads failing when the BackupStorageLocation s3Url is only resolvable inside the cluster
|
||||
@@ -0,0 +1 @@
|
||||
Make velero restore logs return errors instead of calling os.Exit directly, matching velero backup logs, and enable the two previously skipped tests
|
||||
@@ -0,0 +1 @@
|
||||
Mark the existed resource as skipped during restore
|
||||
@@ -0,0 +1 @@
|
||||
Fix wrong node-agent check result when PVR restorer run concurrently
|
||||
@@ -0,0 +1 @@
|
||||
Verify downloaded build tools against architecture-specific SHA-256 checksums before installation.
|
||||
@@ -16,7 +16,27 @@ spec:
|
||||
singular: backup
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
- additionalPrinterColumns:
|
||||
- description: Backup status such as New/InProgress
|
||||
jsonPath: .status.phase
|
||||
name: Status
|
||||
type: string
|
||||
- description: Total number of errors logged during the backup
|
||||
jsonPath: .status.errors
|
||||
name: Errors
|
||||
type: integer
|
||||
- description: Total number of warnings logged during the backup
|
||||
jsonPath: .status.warnings
|
||||
name: Warnings
|
||||
type: integer
|
||||
- description: The time the backup was started
|
||||
jsonPath: .status.startTimestamp
|
||||
name: Started
|
||||
type: date
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
@@ -688,3 +708,4 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
|
||||
@@ -16,7 +16,27 @@ spec:
|
||||
singular: restore
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
- additionalPrinterColumns:
|
||||
- description: The name of the backup this restore is from
|
||||
jsonPath: .spec.backupName
|
||||
name: Backup
|
||||
type: string
|
||||
- description: Restore status such as New/InProgress
|
||||
jsonPath: .status.phase
|
||||
name: Status
|
||||
type: string
|
||||
- description: Total number of errors logged during the restore
|
||||
jsonPath: .status.errors
|
||||
name: Errors
|
||||
type: integer
|
||||
- description: Total number of warnings logged during the restore
|
||||
jsonPath: .status.warnings
|
||||
name: Warnings
|
||||
type: integer
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
@@ -597,3 +617,4 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
|
||||
@@ -16,7 +16,19 @@ spec:
|
||||
singular: volumesnapshotlocation
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
- additionalPrinterColumns:
|
||||
- description: Provider is the provider of the volume storage
|
||||
jsonPath: .spec.provider
|
||||
name: Provider
|
||||
type: string
|
||||
- description: Volume Snapshot Location status such as Available/Unavailable
|
||||
jsonPath: .status.phase
|
||||
name: Phase
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VolumeSnapshotLocation is a location where Velero stores volume
|
||||
@@ -93,3 +105,4 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,370 @@
|
||||
# Volume Data In-place Full/Incremental Restore
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Background](#background)
|
||||
- [Goals](#goals)
|
||||
- [Non-Goals](#non-goals)
|
||||
- [Overview](#overview)
|
||||
- [Detailed Design](#detailed-design)
|
||||
- [CRD Changes](#crd-changes)
|
||||
- [CLI](#cli)
|
||||
- [Workload Management](#workload-management)
|
||||
- [Handling Cross-Zone Scheduling (WaitForFirstConsumer)](#handling-cross-zone-scheduling-waitforfirstconsumer)
|
||||
- [Namespace Mapping](#namespace-mapping)
|
||||
- [Pre-flight Checks](#pre-flight-checks)
|
||||
- [1. PVC is Not Actively Used by a Running Pod](#1-pvc-is-not-actively-used-by-a-running-pod)
|
||||
- [2. PVC is Bound to the Original PV](#2-pvc-is-bound-to-the-original-pv)
|
||||
- [3. Volume Size Validation](#3-volume-size-validation)
|
||||
- [Error Handling](#error-handling)
|
||||
- [Restore Workflow Update](#restore-workflow-update)
|
||||
- [In-place Incremental Restore for CSI Snapshot with Block Data Move for Block Volumes](#in-place-incremental-restore-for-csi-snapshot-with-block-data-move-for-block-volumes)
|
||||
- [In-place Full Restore for CSI Snapshot with Block Data Move for Block Volumes](#in-place-full-restore-for-csi-snapshot-with-block-data-move-for-block-volumes)
|
||||
- [In-place Incremental Restore for CSI Snapshot with File System Data Move for File System Volumes](#in-place-incremental-restore-for-csi-snapshot-with-file-system-data-move-for-file-system-volumes)
|
||||
- [In-place Full Restore for CSI Snapshot with File System Data Move for File System Volumes](#in-place-full-restore-for-csi-snapshot-with-file-system-data-move-for-file-system-volumes)
|
||||
- [In-place Incremental Restore for CSI Snapshot with Block Data Move for File System Volumes](#in-place-incremental-restore-for-csi-snapshot-with-block-data-move-for-file-system-volumes)
|
||||
- [In-place Full Restore for CSI Snapshot with Block Data Move for File System Volumes](#in-place-full-restore-for-csi-snapshot-with-block-data-move-for-file-system-volumes)
|
||||
- [In-place Incremental Restore for File System Backup for File System Volumes](#in-place-incremental-restore-for-file-system-backup-for-file-system-volumes)
|
||||
- [In-place Full Restore for File System Backup for File System Volumes](#in-place-full-restore-for-file-system-backup-for-file-system-volumes)
|
||||
- [Installation](#installation)
|
||||
- [Upgrade](#upgrade)
|
||||
|
||||
## Background
|
||||
|
||||
Currently, Velero only supports restoring volume data to a newly provisioned PVC. If the target PVC already exists in the cluster, Velero skips the data restoration entirely and leaves the existing volume untouched.
|
||||
|
||||
This design introduces the "in-place restore" capability, allowing Velero to restore volume data directly into an existing, bound PVC. When performing an in-place restore, users can choose to either overwrite the volume entirely (in-place full restore) or only restore the modified data to optimize performance (in-place incremental restore).
|
||||
|
||||
To ensure data consistency and allow Velero to safely recreate the PVC during the process, users must manually delete any pods consuming the target volume before initiating an in-place restore.
|
||||
|
||||
## Goals
|
||||
|
||||
- Enable Velero to restore volume data directly into an existing, bound PVC without requiring the user to manually delete the PVC and PV.
|
||||
- Support both Full (overwrite all) and Incremental (overwrite only changed data) in-place restores.
|
||||
- Support in-place restores for Windows workloads.
|
||||
- Ensure data consistency and correct Kubernetes scheduling constraints (e.g., handling `WaitForFirstConsumer` and zonal topologies) are respected during and after the restore.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- Automating the deletion of workloads before the restore. It remains the user's responsibility to ensure the volume is not actively consumed and the Pods are completely removed before triggering the restore to prevent data corruption and allow PVC recreation.
|
||||
- In-place restore for CSI snapshot without data move.
|
||||
- In-place restore for Native Snapshots (cloud provider snapshots without CSI).
|
||||
- Fine-grained, per-volume control over in-place restores. The newly introduced in-place restore policies apply globally to all volumes within a single restore operation. Allowing users to specify different restore strategies for individual volumes is deferred to a future enhancement.
|
||||
|
||||
## Overview
|
||||
|
||||
This design focuses exclusively on volume data restoration. To support this, we are introducing a new field, `ExistingVolumeDataPolicy`, to the `Restore` spec. This feature operates independently of Kubernetes resource restoration, which remains controlled by the existing `ExistingResourcePolicy` field.
|
||||
|
||||
Depending on how unchanged data is handled during the restoration process, in-place volume data restores are categorized into two types:
|
||||
|
||||
- **In-place full restore**: Overwrites the volume with the backup data, regardless of whether the existing data has changed.
|
||||
- **In-place incremental restore**: Optimizes the process by restoring only the data that has changed since the backup, leaving unmodified data intact. This is achieved by leveraging Changed Block Tracking (CBT) for block data and file metadata comparisons for file system data.
|
||||
|
||||
Support for in-place full and incremental restores varies depending on the underlying backup method, as detailed in the following table:
|
||||
|
||||
| Backup Method | In-place Full Restore | In-place Incremental Restore |
|
||||
| --------------------------------------- | --------------------- | ---------------------------- |
|
||||
| CSI Snapshot with Block Data Move | Yes | Yes |
|
||||
| CSI Snapshot with File System Data Move | Yes | Yes |
|
||||
| CSI Snapshot without Data Move | No | No |
|
||||
| File System Backup | Yes | Yes |
|
||||
| Native Snapshot | No | No |
|
||||
|
||||
Additionally, a new boolean field `DeleteExtraFiles` is added to the `UploaderConfig` within the `Restore` spec. When performing a file system restore (either via PodVolumeBackup or CSI File System Data Move), this flag controls whether files present in the target volume but absent in the backup should be deleted. Setting this to `true` ensures the target volume's file system exactly mirrors the backup state. Note that this setting is ignored for block data mover restores, as block-level operations inherently overwrite the entire file system structure.
|
||||
|
||||
Because Velero must create a temporary restore Pod in the Velero namespace to mount the volume and restore the data, it cannot directly use the existing PVC, which resides in the workload namespace. Velero must delete the existing PVC, recreate a temporary restore PVC in the Velero namespace, and bind it to the existing PV. The core strategy for implementing an in-place restore involves the following sequence:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
subgraph PVC CSI RIA
|
||||
A[Patch existing PV's reclaim policy to Retain] --> B[Delete existing PVC]
|
||||
end
|
||||
subgraph Exposer
|
||||
B --> C[Create temporary restore PVC in Velero namespace<br>and bind it to existing PV]
|
||||
C --> D[Create temporary restore Pod<br>that mounts temporary restore PVC]
|
||||
end
|
||||
subgraph Block/File System Uploader
|
||||
D --> E[Restore data directly into the volume]
|
||||
end
|
||||
subgraph Exposer Post-Restore
|
||||
E --> F[Delete temporary restore Pod and PVC]
|
||||
end
|
||||
F --> G[Target workload Pod mounts target PVC<br>once it is recreated]
|
||||
```
|
||||
|
||||
When restoring a file system volume using the block data mover, the PV must temporarily have its `volumeMode` set to `Block` so the restore Pod can mount it as a raw block device. Because the `volumeMode` field in a PV spec is immutable, reusing the existing PV directly is not possible. Instead, Velero must delete the existing PV and create a temporary one. The sequence for this scenario is as follows:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
subgraph PVC CSI RIA
|
||||
A[Patch existing PV's reclaim policy to Retain] --> B[Delete existing PVC]
|
||||
end
|
||||
subgraph Exposer
|
||||
B --> C[Delete existing PV]
|
||||
C --> D[Create temporary restore PV with volumeMode: Block<br>using same volume handle]
|
||||
D --> E[Create temporary restore PVC in Velero namespace<br>with volumeMode: Block and bind to temporary PV]
|
||||
E --> F[Create temporary restore Pod<br>that mounts temporary restore PVC]
|
||||
end
|
||||
subgraph Block Uploader
|
||||
F --> G[Restore data directly into the volume]
|
||||
end
|
||||
subgraph Exposer Post-Restore
|
||||
G --> H[Delete temporary restore Pod, PVC, and PV]
|
||||
H --> I[Recreate original PV with volumeMode: Filesystem]
|
||||
end
|
||||
I --> J[Recreate original PVC in workload namespace<br>and allow it to bind to recreated PV]
|
||||
```
|
||||
|
||||
|
||||
## Detailed Design
|
||||
|
||||
### CRD Changes
|
||||
|
||||
To support the new in-place restore policies and incremental data transfer, several Custom Resource Definitions (CRDs) will be updated.
|
||||
|
||||
**Restore CRD**
|
||||
A new field `existingVolumeDataPolicy` is added to the `Restore` spec to allow users to define how existing volume data should be handled. Additionally, a new field `deleteExtraFiles` is added to the `uploaderConfig` to control file deletion during file system restores.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
existingVolumeDataPolicy: "" # Valid values: "", none, full, incremental
|
||||
uploaderConfig:
|
||||
deleteExtraFiles: false
|
||||
```
|
||||
|
||||
- `existingVolumeDataPolicy`:
|
||||
- `""` (default) or `none`: Do not restore volume data if the target PVC already exists.
|
||||
- `full`: Perform an in-place full restore, overwriting all existing data on the volume.
|
||||
- `incremental`: Perform an in-place incremental restore, only overwriting data that has changed since the backup.
|
||||
- `uploaderConfig.deleteExtraFiles`: A boolean flag that controls whether files present in the target volume but absent from the backup should be deleted. **Note:** This setting is *only* applicable to File System restores (PodVolumeBackup or CSI File System Data Move) and has no effect on Block Data Move restores. Furthermore, it is ignored for non-in-place restores (where `existingVolumeDataPolicy` is not set to `full` or `incremental`).
|
||||
|
||||
If the target PVC does not exist, Velero will fall back to its default behavior and provision a new PVC for the restore, regardless of whether `existingVolumeDataPolicy` is set to `full` or `incremental`. Furthermore, if `existingVolumeDataPolicy` is set to `incremental` but the underlying storage does not support incremental restores, Velero will automatically fall back to a `full` restore.
|
||||
|
||||
The following table summarizes the expected behavior for different combinations of `existingResourcePolicy` and `existingVolumeDataPolicy` when the target PVC already exists:
|
||||
|
||||
| `existingResourcePolicy` | `existingVolumeDataPolicy` | PVC Resource Action | Volume Data Restore |
|
||||
| ------------------------ | -------------------------- | ------------------- | ------------------- |
|
||||
| `none` | `none` | Untouched | Untouched |
|
||||
| `none` | `full` | Untouched | Full |
|
||||
| `none` | `incremental` | Untouched | Incremental |
|
||||
| `update` | `none` | Patched | Untouched |
|
||||
| `update` | `full` | Patched | Full |
|
||||
| `update` | `incremental` | Patched | Incremental |
|
||||
|
||||
**DataDownload CRD**
|
||||
To support incremental restores, the `DataDownload` spec is extended with a new `restoreType` string flag (valid values are `full` and `incremental`) to instruct the data mover to perform an incremental restore. It also introduces a new `csiSnapshot` field, which captures the metadata of a snapshot taken from the existing PVC, acting as the baseline for Changed Block Tracking (CBT) delta calculations during an in-place incremental block restore. Additionally, the `deleteExtraFiles` configuration is passed to the underlying data mover via the existing `dataMoverConfig` map.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
restoreType: "incremental"
|
||||
csiSnapshot:
|
||||
volumeSnapshot: ""
|
||||
storageClass: ""
|
||||
snapshotClass: ""
|
||||
driver: ""
|
||||
```
|
||||
|
||||
- `restoreType`: A string flag indicating whether the data mover should perform a `full` or `incremental` restore.
|
||||
- `csiSnapshot`:
|
||||
- `volumeSnapshot`: the name of the volume snapshot
|
||||
- `storageClass`: the name of the storage class of the PVC that the volume snapshot is created from
|
||||
- `snapshotClass`: the name of the snapshot class that the volume snapshot is created with
|
||||
- `driver`: the driver used by the VolumeSnapshotContent
|
||||
|
||||
**PodVolumeRestore CRD**
|
||||
A new `restoreType` string flag (valid values are `full` and `incremental`) is added to the `PodVolumeRestore` spec to instruct the file system data mover (e.g., Kopia) to perform an incremental restore. Additionally, the `deleteExtraFiles` configuration is passed to the underlying uploader via the existing `uploaderSettings` map.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
restoreType: "incremental"
|
||||
```
|
||||
|
||||
- `restoreType`: A string flag indicating whether the data mover should perform a `full` or `incremental` restore.
|
||||
|
||||
### CLI
|
||||
|
||||
New flags will be added to the `velero restore create` command to support the new policy:
|
||||
|
||||
- `--existing-volume-data-policy`: Accepts the values `none`, `full`, or `incremental`, mapping to `existingVolumeDataPolicy`.
|
||||
- `--delete-extra-files`: A boolean flag mapping to `uploaderConfig.deleteExtraFiles`.
|
||||
|
||||
### Workload Management
|
||||
|
||||
To ensure data consistency and allow for necessary configuration changes, users must delete any Pods actively using the target volume before initiating an in-place restore. This is required for three primary reasons:
|
||||
|
||||
1. **Preventing Data Corruption:** It is critical to prevent the active workload Pods and the temporary restore Pods from writing to the volume simultaneously, which would lead to data corruption.
|
||||
2. **PVC Recreation:** Velero creates a temporary restore Pod in the Velero namespace to mount the volume and restore the data. Since it cannot directly use the existing PVC located in the workload namespace, Velero must delete the existing PVC, create a temporary restore PVC in the Velero namespace, and bind it to the existing PV. However, Kubernetes' `pvc-protection` finalizer prevents the deletion of any PVC actively used by a running Pod. Consequently, simply pausing the workload is insufficient; the Pods must be completely removed to allow the PVC deletion to proceed.
|
||||
3. **ReadWriteOncePod Access Mode:** If the volume is configured with the `ReadWriteOncePod` access mode, Kubernetes strictly enforces that the volume can only be mounted by a single Pod at a time. The existing workload Pod must be completely deleted to release the volume, allowing Velero's temporary restore Pod to successfully mount it and perform the data transfer.
|
||||
|
||||
Users must manage the lifecycle of their workloads before starting the restore. This applies to various workload types:
|
||||
|
||||
- **Standard Controllers (Deployments, StatefulSets, Jobs, CronJobs):** The required action depends on the restore method:
|
||||
- **For CSI Snapshot Restores:** Users can scale these controllers down to zero replicas to terminate the underlying Pods.
|
||||
- **For File System Restores (PodVolumeRestore):** Users must completely delete the controllers. Simply scaling down to zero is insufficient because file system restores rely on an init container injected into the restored target Pod to process the data transfer. If the controller is only scaled down, it will immediately terminate the Pod restored by Velero to maintain its zero-replica count. Although the controller may subsequently spawn a new Pod, that new Pod will lack the required restore init container, causing the restore to fail.
|
||||
- **DaemonSets:** Since Kubernetes lacks a mechanism to scale DaemonSets to zero, users must either delete the DaemonSet entirely or use node selectors/cordoning to evict the Pods.
|
||||
- **Operator-Managed Pods:** Custom controllers (like ArgoCD) may have fast reconciliation loops that aggressively recreate Pods. These operators must be paused or suspended, and their managed Pods deleted.
|
||||
- **Out-of-Cluster Clients:** External consumers accessing the storage directly (e.g., via NFS or storage APIs) are invisible to Kubernetes and must be manually disconnected to ensure no external writes occur during the restore.
|
||||
|
||||
**Note:** Automating the deletion of these workloads is explicitly out of scope for this feature. It remains the user's responsibility to ensure the volume is not actively consumed and the Pods are removed before triggering the restore.
|
||||
|
||||
### Handling Cross-Zone Scheduling (WaitForFirstConsumer)
|
||||
|
||||
When performing an in-place restore, Velero deletes the existing target PVC and recreates it. For StorageClasses using the `WaitForFirstConsumer` volume binding mode, this recreation resets the scheduling lifecycle. Even though Velero adds a selector to the PVC spec to ensure it binds exclusively to the original PV, a scheduling issue can still occur. If the target PVC loses its node affinity, the Kubernetes Scheduler might schedule the recreated business Pod to a different availability zone. Because the original PV is physically constrained to its original zone, the Pod will fail to mount the volume and remain stuck in the `ContainerCreating` state with an attachment error.
|
||||
|
||||
**Solution**:
|
||||
During the PVC Restore Item Action (RIA), Velero must extract the `volume.kubernetes.io/selected-node` annotation from the original PVC. When Velero recreates the target PVC, it must inject this annotation back into the PVC spec.
|
||||
By preserving the `selected-node` annotation, the Kubernetes Scheduler is forced to schedule the recreated business Pod to the original node/zone, ensuring it successfully mounts the restored PV.
|
||||
|
||||
### Namespace Mapping
|
||||
When namespace mapping is configured, in-place restores work normally in most scenarios. However, in-place incremental restores using CSI snapshots with a block data mover are not natively supported across different namespaces. Velero cannot use Changed Block Tracking (CBT) to calculate data deltas when the target volume is in a different namespace, as the volumes may belong to different lineages.
|
||||
|
||||
Despite this, users can achieve a fast cross-namespace "clone and restore" workflow. For example, to quickly clone a large production workload into a test namespace ((e.g., for debugging, testing, or auditing)), a standard full restore would be too slow. Instead, users can manually take a CSI snapshot of the source PVC and provision a new PVC in the destination namespace from that snapshot.
|
||||
|
||||
When a Velero restore is triggered against this new PVC, Velero detects the snapshot and uses CBT to write only the blocks that changed since the backup. This effectively "rolls back" the clone to the backup's state, drastically reducing data transfer and speeding up the restore.
|
||||
|
||||
The key requirements for this approach are:
|
||||
1. **Manual Cloning:** Users must manually snapshot the source PVC and clone it to the destination namespace before the restore. *(Note: Users must manually recreate the `VolumeSnapshotContent` and `VolumeSnapshot` in the destination namespace, or use `CrossNamespaceVolumeDataSource` if supported).*
|
||||
2. **Workload Management:** Ensure no Pods are mounting the destination PVC during the restore to prevent data corruption.
|
||||
3. **Snapshot Detection:** Velero inspects the destination PVC's `dataSource`. If it is a `VolumeSnapshot`, Velero uses its `SnapshotHandle` along with the backup's handle to calculate CBT.
|
||||
4. **One-Shot Operation:** This is a one-time process. To restore a different backup later, users must clean up the destination namespace and repeat the workflow.
|
||||
5. **Snapshot Cleanup:** Users must manually delete the temporary snapshot after the restore completes.
|
||||
|
||||
### Pre-flight Checks
|
||||
|
||||
Before initiating an in-place restore for a volume, Velero performs the following pre-flight checks to ensure the operation is safe and valid:
|
||||
|
||||
#### 1. PVC is Not Actively Used by a Running Pod
|
||||
Velero verifies that the target PVC is not currently mounted or consumed by any running Pods in the cluster. If the PVC is in use, Velero will skip the in-place restore for that volume and log an error. This enforces the prerequisite that users must completely delete consuming workloads prior to the restore, which prevents data corruption and avoids deadlocks caused by the Kubernetes `pvc-protection` finalizer during PVC recreation.
|
||||
|
||||
#### 2. PVC is Bound to the Original PV
|
||||
Velero checks whether the existing PVC in the cluster is still bound to the same PersistentVolume (PV) it was bound to at the time of the backup. If the PVC is bound to a different PV, performing an in-place restore (especially an incremental one that relies on Changed Block Tracking) may be unsafe or result in unpredictable behavior. If this check fails, Velero will log an error and skip the in-place restore for that volume.
|
||||
|
||||
|
||||
#### 3. Volume Size Validation
|
||||
|
||||
For in-place restores, the target volume must be large enough to accommodate the backed-up data. While the data path performs size checks during the actual restoration (only for block data mover), Velero will fail early to prevent unnecessary operations (such as taking a temporary snapshot).
|
||||
|
||||
Before initiating an in-place restore, Velero compares the existing PV's size (`pv.spec.capacity.storage`) against the backup's data size (retrieved from the backup volume info). If the target PV is smaller than the backup data size, Velero will log an error and skip the volume data restoration.
|
||||
|
||||
### Error Handling
|
||||
|
||||
It is highly recommended that users create a backup (e.g., a CSI snapshot backup without data movement, if possible) before initiating an in-place restore. This ensures that the original state can be recovered in the event of a restore failure.
|
||||
|
||||
If an in-place restore fails, Velero will intentionally leave certain temporary resources intact, such as the temporary PVC bound to the existing PV. Velero does not automatically clean up these resources because doing so could inadvertently trigger the deletion of the underlying storage volume. In such failure scenarios, users must manually clean up these temporary resources and, if necessary, use their pre-restore backup to recover the system's state.
|
||||
|
||||
### Restore Workflow Update
|
||||
|
||||
This section outlines the step-by-step control path and data path workflows for in-place restores. The exact sequence of operations depends on the backup method (CSI snapshot vs. file system backup), the chosen data mover (block vs. file system), and the target volume mode (block vs. file system). The following subsections detail the mechanisms for each supported scenario.
|
||||
|
||||
#### In-place Incremental Restore for CSI Snapshot with Block Data Move for Block Volumes
|
||||
|
||||
**Control Path**
|
||||
|
||||
PVC RIA:
|
||||
- Preserve the `volume.kubernetes.io/selected-node` annotation to ensure correct scheduling during target PVC recreation.
|
||||
|
||||
PVC CSI RIA:
|
||||
- Create a snapshot of the existing `PVC` to serve as the baseline for CBT delta calculations.
|
||||
- Patch the existing PV's reclaim policy to `Retain`.
|
||||
- Delete the existing PVC.
|
||||
- Create a `DataDownload` resource referencing this snapshot and the existing `PV`, with `restoreType` set to `incremental`.
|
||||
|
||||
Restore Exposer:
|
||||
- Create a temporary restore PVC and bind it to the existing PV.
|
||||
- Create a temporary restore Pod that mounts the temporary restore PVC.
|
||||
|
||||
**Data Path**
|
||||
|
||||
Block Uploader:
|
||||
- The block uploader leverages Changed Block Tracking (CBT) to calculate the delta between the volume's current state and the backup snapshot. By skipping unchanged blocks and exclusively overwriting the modified ones, it significantly reduces I/O operations and accelerates the overall restore process. If the underlying storage system lacks CBT support, Velero will automatically fall back to performing an in-place full restore.
|
||||
|
||||
#### In-place Full Restore for CSI Snapshot with Block Data Move for Block Volumes
|
||||
|
||||
The workflow is identical to the **In-place Incremental Restore for CSI Snapshot with Block Data Move for Block Volumes**, with the following exceptions:
|
||||
- No baseline snapshot is taken.
|
||||
- The uploader does not use CBT to calculate deltas; instead, it overwrites all data on the volume.
|
||||
|
||||
#### In-place Incremental Restore for CSI Snapshot with File System Data Move for File System Volumes
|
||||
|
||||
**Control Path**
|
||||
|
||||
The control path workflow is identical to the **In-place Incremental Restore for CSI Snapshot with Block Data Move for Block Volumes**, with the following exceptions:
|
||||
- No baseline snapshot is taken.
|
||||
|
||||
**Data Path**
|
||||
|
||||
Kopia Uploader:
|
||||
- Set the `incremental` flag to `true` when initiating the restore with the Kopia uploader.
|
||||
- Pass the `deleteExtraFiles` configuration to the Kopia uploader based on the user's settings.
|
||||
- Kopia evaluates file metadata (e.g., modification times and sizes) to identify changed files. It skips downloading and overwriting files that are identical to the backup, only restoring those that are modified, missing, or corrupted.
|
||||
|
||||
#### In-place Full Restore for CSI Snapshot with File System Data Move for File System Volumes
|
||||
|
||||
The workflow is identical to the **In-place Incremental Restore for CSI Snapshot with File System Data Move for File System Volumes**, with the following exceptions:
|
||||
- The `restoreType` flag set to `full`.
|
||||
- The Kopia uploader does not evaluate file metadata to skip unchanged files; instead, it overwrites all data on the target volume.
|
||||
|
||||
#### In-place Incremental Restore for CSI Snapshot with Block Data Move for File System Volumes
|
||||
|
||||
**Control Path**
|
||||
|
||||
PVC RIA:
|
||||
- Preserve the `volume.kubernetes.io/selected-node` annotation to ensure correct scheduling during target PVC recreation.
|
||||
|
||||
PVC CSI RIA:
|
||||
- Create a snapshot of the existing `PVC` to serve as the baseline for CBT delta calculations.
|
||||
- Patch the existing `PV` to set its `persistentVolumeReclaimPolicy` to `Retain`.
|
||||
- Delete the existing `PVC`.
|
||||
- Create a `DataDownload` resource referencing the snapshot and the existing `PV`, with `restoreType` set to `incremental`.
|
||||
|
||||
Restore Exposer:
|
||||
- Delete the existing `PV`.
|
||||
- Create a temporary restore `PV` with `volumeMode` set to `Block`, using the same volume handle as the original `PV`.
|
||||
- Reset the bind information of the temporary restore `PV` to ensure it only binds to the temporary restore `PVC`.
|
||||
- Create a temporary restore `PVC` with `volumeMode` set to `Block`.
|
||||
- Create a temporary restore Pod that mounts the temporary restore `PVC`.
|
||||
|
||||
**Data Path**
|
||||
|
||||
Block Uploader:
|
||||
- The block uploader leverages Changed Block Tracking (CBT) to calculate the delta between the volume's current state and the backup snapshot. By skipping unchanged blocks and exclusively overwriting the modified ones, it significantly reduces I/O operations and accelerates the overall restore process. If the underlying storage system lacks CBT support, Velero will automatically fall back to performing an in-place full restore.
|
||||
|
||||
**Control Path (Post-Restore)**
|
||||
|
||||
Restore Exposer:
|
||||
- Delete the temporary restore Pod, `PVC`, and `PV`.
|
||||
- Recreate the original `PV` with its `volumeMode` set back to `Filesystem`.
|
||||
- Proceed with the standard process to allow the target `PVC` to bind to the recreated `PV`.
|
||||
|
||||
#### In-place Full Restore for CSI Snapshot with Block Data Move for File System Volumes
|
||||
|
||||
The workflow is identical to the **In-place Incremental Restore for CSI Snapshot with Block Data Move for File System Volumes**, with the following exceptions:
|
||||
- No baseline snapshot is taken.
|
||||
- The uploader does not use CBT to calculate deltas; instead, it overwrites all data on the volume.
|
||||
|
||||
#### In-place Incremental Restore for File System Backup for File System Volumes
|
||||
|
||||
**Control Path**
|
||||
|
||||
- Create a `PodVolumeRestore` resource with `restoreType` set to `incremental`.
|
||||
|
||||
**Data Path**
|
||||
|
||||
Kopia Uploader:
|
||||
- Set the `incremental` flag to `true` when initiating the restore with the Kopia uploader.
|
||||
- Pass the `deleteExtraFiles` configuration to the Kopia uploader based on the user's settings.
|
||||
- Similar to the CSI File System Data Move, Kopia evaluates file metadata to skip unchanged files and only restores those that are modified or missing.
|
||||
|
||||
#### In-place Full Restore for File System Backup for File System Volumes
|
||||
|
||||
The workflow is identical to the **In-place Incremental Restore for File System Backup for File System Volumes**, with the following exceptions:
|
||||
- The `restoreType` flag is set to `full`.
|
||||
- The Kopia uploader does not evaluate file metadata to skip unchanged files; instead, it overwrites all data on the target volume.
|
||||
|
||||
## Installation
|
||||
|
||||
No change to Installation.
|
||||
|
||||
## Upgrade
|
||||
|
||||
No impacts to Upgrade. The new fields in the CRDs are all optional fields and have backwards compatible values.
|
||||
+48
-33
@@ -29,8 +29,18 @@ RUN go install sigs.k8s.io/controller-runtime/tools/setup-envtest@v0.0.0-2026030
|
||||
ENVTEST_ASSETS_DIR=$(setup-envtest use 1.33.0 --bin-dir /usr/local/kubebuilder/bin -p path) && \
|
||||
cp -r ${ENVTEST_ASSETS_DIR}/* /usr/local/kubebuilder/bin/
|
||||
|
||||
RUN wget --quiet https://github.com/kubernetes-sigs/kubebuilder/releases/download/v3.2.0/kubebuilder_linux_$(go env GOARCH) && \
|
||||
mv kubebuilder_linux_$(go env GOARCH) /usr/local/kubebuilder/bin/kubebuilder && \
|
||||
RUN set -eux; \
|
||||
ARCH="$(go env GOARCH)"; \
|
||||
case "$ARCH" in \
|
||||
amd64) KUBEBUILDER_SHA256="102bb0f586dcb50951aded67856483a2ee114057c56475b3cda6051a12832a72" ;; \
|
||||
arm64) KUBEBUILDER_SHA256="0a340ea925c801aa71344becdefce96eda6fa0bc92352b9c7bcb36a4f8c56314" ;; \
|
||||
ppc64le) KUBEBUILDER_SHA256="74473d094908caad852a77088f64bb64eb4c79497f6695eb5e9e8bc4bacd9409" ;; \
|
||||
*) echo "Unsupported kubebuilder architecture: $ARCH" >&2; exit 1 ;; \
|
||||
esac; \
|
||||
FILE="kubebuilder_linux_$ARCH"; \
|
||||
wget --quiet "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v3.2.0/$FILE"; \
|
||||
echo "$KUBEBUILDER_SHA256 $FILE" | sha256sum -c -; \
|
||||
mv "$FILE" /usr/local/kubebuilder/bin/kubebuilder; \
|
||||
chmod +x /usr/local/kubebuilder/bin/kubebuilder
|
||||
|
||||
# get controller-tools
|
||||
@@ -52,26 +62,27 @@ RUN apt-get update && apt-get install -y unzip
|
||||
# cpu = "ppcle_64"
|
||||
# snippet from: https://github.com/protocolbuffers/protobuf/blob/d445953603e66eb8992a39b4e10fcafec8501f24/protobuf_release.bzl#L18-L24
|
||||
# cpu names: https://github.com/bazelbuild/platforms/blob/main/cpu/BUILD
|
||||
RUN ARCH=$(go env GOARCH) && \
|
||||
if [ "$ARCH" = "s390x" ] ; then \
|
||||
ARCH="s390_64"; \
|
||||
elif [ "$ARCH" = "arm64" ] ; then \
|
||||
ARCH="aarch_64"; \
|
||||
elif [ "$ARCH" = "ppc64le" ] ; then \
|
||||
ARCH="ppcle_64"; \
|
||||
elif [ "$ARCH" = "ppc64" ] ; then \
|
||||
ARCH="ppcle_64"; \
|
||||
else \
|
||||
ARCH=$(uname -m); \
|
||||
fi && echo "ARCH=$ARCH" && \
|
||||
wget --quiet https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-$ARCH.zip && \
|
||||
unzip protoc-25.2-linux-$ARCH.zip; \
|
||||
rm *.zip && \
|
||||
mv bin/protoc /usr/bin/protoc && \
|
||||
mv include/google /usr/include && \
|
||||
chmod a+x /usr/include/google && \
|
||||
chmod a+x /usr/include/google/protobuf && \
|
||||
chmod a+r -R /usr/include/google && \
|
||||
RUN set -eux; \
|
||||
GOARCH="$(go env GOARCH)"; \
|
||||
case "$GOARCH" in \
|
||||
amd64) ARCH="x86_64"; PROTOC_SHA256="78ab9c3288919bdaa6cfcec6127a04813cf8a0ce406afa625e48e816abee2878" ;; \
|
||||
386) ARCH="x86_32"; PROTOC_SHA256="cc1c6e31a9b333c3e6d026aac5fdc1f7d70c6cd8851631505188ca9826acee5a" ;; \
|
||||
arm64) ARCH="aarch_64"; PROTOC_SHA256="07683afc764e4efa3fa969d5f049fbc2bdfc6b4e7786a0b233413ac0d8753f6b" ;; \
|
||||
ppc64|ppc64le) ARCH="ppcle_64"; PROTOC_SHA256="cea283337101ed08ff6c76a98461b1d871bac21f41dc1dabdfddaa5d99df9339" ;; \
|
||||
s390x) ARCH="s390_64"; PROTOC_SHA256="8a13ec6518585f7664d58f929417c9e6d0c4aeedf3bcdd854aeafceb5ef0a389" ;; \
|
||||
*) echo "Unsupported protoc architecture: $GOARCH" >&2; exit 1 ;; \
|
||||
esac; \
|
||||
echo "ARCH=$ARCH"; \
|
||||
FILE="protoc-25.2-linux-$ARCH.zip"; \
|
||||
wget --quiet "https://github.com/protocolbuffers/protobuf/releases/download/v25.2/$FILE"; \
|
||||
echo "$PROTOC_SHA256 $FILE" | sha256sum -c -; \
|
||||
unzip "$FILE"; \
|
||||
rm "$FILE"; \
|
||||
mv bin/protoc /usr/bin/protoc; \
|
||||
mv include/google /usr/include; \
|
||||
chmod a+x /usr/include/google; \
|
||||
chmod a+x /usr/include/google/protobuf; \
|
||||
chmod a+r -R /usr/include/google; \
|
||||
chmod +x /usr/bin/protoc
|
||||
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOC_GEN_GO_VERSION} \
|
||||
&& go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
|
||||
@@ -84,17 +95,21 @@ RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOC_GEN_GO_VERS
|
||||
# {{- else if eq .Arch "386" }}i386
|
||||
# {{- else }}{{ .Arch }}{{ end }}
|
||||
# {{- if .Arm }}v{{ .Arm }}{{ end -}}
|
||||
RUN ARCH=$(go env GOARCH) && \
|
||||
if [ "$ARCH" = "amd64" ] ; then \
|
||||
ARCH="x86_64"; \
|
||||
elif [ "$ARCH" = "386" ] ; then \
|
||||
ARCH="i386"; \
|
||||
elif [ "$ARCH" = "ppc64le" ] ; then \
|
||||
ARCH="ppc64"; \
|
||||
fi && \
|
||||
wget --quiet "https://github.com/goreleaser/goreleaser/releases/download/v1.26.2/goreleaser_Linux_$ARCH.tar.gz" && \
|
||||
tar xvf goreleaser_Linux_$ARCH.tar.gz; \
|
||||
mv goreleaser /usr/bin/goreleaser && \
|
||||
RUN set -eux; \
|
||||
GOARCH="$(go env GOARCH)"; \
|
||||
case "$GOARCH" in \
|
||||
amd64) ARCH="x86_64"; GORELEASER_SHA256="cfbdf12e3ea20e4c3a209d07311f43c2e0baf20d5cce09bcdc232567e0f34307" ;; \
|
||||
386) ARCH="i386"; GORELEASER_SHA256="21c236575cccd29588182b570b4ffe83ad8fb96cd3b13b2af79feafd8ae37b1b" ;; \
|
||||
arm64) ARCH="arm64"; GORELEASER_SHA256="2b984e2932b24be0d638c7dab7357a59d86eb79ca7fee1afd31be5ebb1847cbb" ;; \
|
||||
arm) ARCH="armv7"; GORELEASER_SHA256="6db2899885be19f123b36192a42dcfb3bb2b3e1009fec7277517969e96d8a7c6" ;; \
|
||||
ppc64|ppc64le) ARCH="ppc64"; GORELEASER_SHA256="76d060ebb8d48e76fde45983f87040fe3ac0ca37c5ace4648a956959b81bfdf0" ;; \
|
||||
*) echo "Unsupported goreleaser architecture: $GOARCH" >&2; exit 1 ;; \
|
||||
esac; \
|
||||
FILE="goreleaser_Linux_$ARCH.tar.gz"; \
|
||||
wget --quiet "https://github.com/goreleaser/goreleaser/releases/download/v1.26.2/$FILE"; \
|
||||
echo "$GORELEASER_SHA256 $FILE" | sha256sum -c -; \
|
||||
tar xvf "$FILE"; \
|
||||
mv goreleaser /usr/bin/goreleaser; \
|
||||
chmod +x /usr/bin/goreleaser
|
||||
|
||||
# get golangci-lint
|
||||
|
||||
Executable
+111
@@ -0,0 +1,111 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright 2026 the Velero contributors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
DOCKERFILE="${ROOT_DIR}/hack/build-image/Dockerfile"
|
||||
|
||||
verify_block() {
|
||||
local tool=$1
|
||||
local start=$2
|
||||
local end=$3
|
||||
local hash_variable=$4
|
||||
local install_pattern=$5
|
||||
shift 5
|
||||
local expected_arches=("$@")
|
||||
local block
|
||||
|
||||
block=$(awk -v start="${start}" -v end="${end}" '
|
||||
$0 ~ start { printing = 1 }
|
||||
printing { print }
|
||||
printing && $0 ~ end { exit }
|
||||
' "${DOCKERFILE}")
|
||||
|
||||
if [[ -z "${block}" ]]; then
|
||||
echo "Unable to find ${tool} install block" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
local actual_arches
|
||||
actual_arches=$(printf '%s\n' "${block}" |
|
||||
sed -nE "s/^[[:space:]]*([[:alnum:]_|]+)\).*${hash_variable}=\"([[:xdigit:]]+)\".*/\1 \2/p")
|
||||
|
||||
local expected_arch
|
||||
for expected_arch in "${expected_arches[@]}"; do
|
||||
if ! printf '%s\n' "${actual_arches}" | awk -v arch="${expected_arch}" '
|
||||
$1 == arch && length($2) == 64 && $2 ~ /^[0-9a-f]+$/ { found = 1 }
|
||||
END { exit !found }
|
||||
'; then
|
||||
echo "${tool} is missing a lowercase 64-hex SHA-256 for ${expected_arch}" >&2
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
local actual_count
|
||||
actual_count=$(printf '%s\n' "${actual_arches}" | sed '/^$/d' | wc -l | tr -d ' ')
|
||||
if [[ "${actual_count}" -ne "${#expected_arches[@]}" ]]; then
|
||||
echo "${tool} architecture mapping changed; update this verification gate" >&2
|
||||
printf '%s\n' "${actual_arches}" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! printf '%s\n' "${block}" | grep -Eq '^ \*\).*Unsupported .+ architecture:.+exit 1'; then
|
||||
echo "${tool} does not fail closed for unknown architectures" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
local download_line checksum_line install_line
|
||||
download_line=$(printf '%s\n' "${block}" | grep -n 'wget --quiet' | head -1 | cut -d: -f1)
|
||||
checksum_line=$(printf '%s\n' "${block}" | grep -n "echo \"\$${hash_variable} \$FILE\" | sha256sum -c -" | head -1 | cut -d: -f1)
|
||||
install_line=$(printf '%s\n' "${block}" | grep -nE "${install_pattern}" | head -1 | cut -d: -f1)
|
||||
|
||||
if [[ -z "${download_line}" || -z "${checksum_line}" || -z "${install_line}" ||
|
||||
"${download_line}" -ge "${checksum_line}" || "${checksum_line}" -ge "${install_line}" ]]; then
|
||||
echo "${tool} must download, verify, then install/extract in that order" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! printf '%s\n' "${block}" | grep -q '^RUN set -eux;'; then
|
||||
echo "${tool} install block must use strict shell error handling" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
verify_block \
|
||||
kubebuilder \
|
||||
'^RUN set -eux;.*$' \
|
||||
'^# get controller-tools$' \
|
||||
KUBEBUILDER_SHA256 \
|
||||
'mv "\$FILE"' \
|
||||
amd64 arm64 ppc64le
|
||||
|
||||
verify_block \
|
||||
protoc \
|
||||
'^# cpu names:' \
|
||||
'^RUN go install google.golang.org/protobuf' \
|
||||
PROTOC_SHA256 \
|
||||
'unzip "\$FILE"' \
|
||||
amd64 386 arm64 'ppc64|ppc64le' s390x
|
||||
|
||||
verify_block \
|
||||
goreleaser \
|
||||
'^# goreleaser name template' \
|
||||
'^# get golangci-lint$' \
|
||||
GORELEASER_SHA256 \
|
||||
'tar xvf "\$FILE"' \
|
||||
amd64 386 arm64 arm 'ppc64|ppc64le'
|
||||
|
||||
echo "Verified pinned build-tool checksums and fail-closed install ordering"
|
||||
@@ -114,7 +114,10 @@ func InvokeDeleteActions(ctx *Context) error {
|
||||
|
||||
// Process individual items from the backup
|
||||
for _, item := range items {
|
||||
itemPath := archive.GetItemFilePath(dir, resource, namespace, item)
|
||||
itemPath, err := archive.GetItemFilePath(dir, resource, namespace, item)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "could not build item path: %v", item)
|
||||
}
|
||||
|
||||
// obj is the Unstructured item from the backup
|
||||
obj, err := archive.Unmarshal(ctx.Filesystem, itemPath)
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
corev1api "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
crclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
@@ -21,6 +22,8 @@ import (
|
||||
vhutil "github.com/vmware-tanzu/velero/pkg/util/volumehelper"
|
||||
)
|
||||
|
||||
var errGetPVForPVC = errors.New("fail to get PV for PVC")
|
||||
|
||||
type volumeHelperImpl struct {
|
||||
volumePolicy *resourcepolicies.Policies
|
||||
snapshotVolumes *bool
|
||||
@@ -123,6 +126,44 @@ func NewVolumeHelperImplWithCache(
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (v *volumeHelperImpl) getPVAndMatchAction(obj runtime.Unstructured, groupResource schema.GroupResource) (*resourcepolicies.Action, *corev1api.PersistentVolume, error) {
|
||||
pvc := new(corev1api.PersistentVolumeClaim)
|
||||
pv := new(corev1api.PersistentVolume)
|
||||
var err error
|
||||
var getPVErr error
|
||||
|
||||
if groupResource == kuberesource.PersistentVolumeClaims {
|
||||
if err = runtime.DefaultUnstructuredConverter.FromUnstructured(obj.UnstructuredContent(), &pvc); err != nil {
|
||||
v.logger.WithError(err).Warn("fail to convert unstructured into PVC")
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
pv, err = kubeutil.GetPVForPVC(pvc, v.client)
|
||||
if err != nil {
|
||||
v.logger.WithError(err).Warnf("failed to get PV for PVC %s", pvc.Namespace+"/"+pvc.Name)
|
||||
getPVErr = fmt.Errorf("fail to get PV for PVC %s: %w", pvc.Namespace+"/"+pvc.Name, errGetPVForPVC)
|
||||
}
|
||||
} else if groupResource == kuberesource.PersistentVolumes {
|
||||
if err = runtime.DefaultUnstructuredConverter.FromUnstructured(obj.UnstructuredContent(), &pv); err != nil {
|
||||
v.logger.WithError(err).Warn("fail to convert unstructured into PV")
|
||||
return nil, nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if v.volumePolicy != nil {
|
||||
vfd := resourcepolicies.NewVolumeFilterData(pv, nil, pvc)
|
||||
action, err := v.volumePolicy.GetMatchAction(vfd)
|
||||
if err != nil {
|
||||
v.logger.WithError(err).Warnf("fail to get VolumePolicy match action for %+v", vfd)
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
return action, pv, getPVErr
|
||||
}
|
||||
|
||||
return nil, pv, getPVErr
|
||||
}
|
||||
|
||||
func (v *volumeHelperImpl) ShouldPerformSnapshot(obj runtime.Unstructured, groupResource schema.GroupResource) (bool, error) {
|
||||
// check if volume policy exists and also check if the object(pv/pvc) fits a volume policy criteria and see if the associated action is snapshot
|
||||
// if it is not snapshot then skip the code path for snapshotting the PV/PVC
|
||||
@@ -316,117 +357,73 @@ func (v volumeHelperImpl) shouldPerformFSBackupLegacy(
|
||||
}
|
||||
|
||||
func (v *volumeHelperImpl) ShouldPerformCustomAction(obj runtime.Unstructured, groupResource schema.GroupResource, matchParams map[string]any) (bool, error) {
|
||||
// check if volume policy exists and also check if the object(pv/pvc) fits a volume policy criteria and see if the associated action is custom with the provided param values
|
||||
pvc := new(corev1api.PersistentVolumeClaim)
|
||||
pv := new(corev1api.PersistentVolume)
|
||||
var err error
|
||||
|
||||
var pvNotFoundErr error
|
||||
if groupResource == kuberesource.PersistentVolumeClaims {
|
||||
if err = runtime.DefaultUnstructuredConverter.FromUnstructured(obj.UnstructuredContent(), &pvc); err != nil {
|
||||
v.logger.WithError(err).Error("fail to convert unstructured into PVC")
|
||||
return false, err
|
||||
}
|
||||
|
||||
pv, err = kubeutil.GetPVForPVC(pvc, v.client)
|
||||
if err != nil {
|
||||
// Any error means PV not available - save to return later if no policy matches
|
||||
v.logger.Debugf("PV not found for PVC %s: %v", pvc.Namespace+"/"+pvc.Name, err)
|
||||
pvNotFoundErr = err
|
||||
pv = nil
|
||||
}
|
||||
action, pv, err := v.getPVAndMatchAction(obj, groupResource)
|
||||
if err != nil && !errors.Is(err, errGetPVForPVC) {
|
||||
return false, err
|
||||
}
|
||||
|
||||
if groupResource == kuberesource.PersistentVolumes {
|
||||
if err = runtime.DefaultUnstructuredConverter.FromUnstructured(obj.UnstructuredContent(), &pv); err != nil {
|
||||
v.logger.WithError(err).Error("fail to convert unstructured into PV")
|
||||
return false, err
|
||||
}
|
||||
metadata, metaErr := meta.Accessor(obj)
|
||||
if metaErr != nil {
|
||||
return false, metaErr
|
||||
}
|
||||
|
||||
if v.volumePolicy != nil {
|
||||
vfd := resourcepolicies.NewVolumeFilterData(pv, nil, pvc)
|
||||
action, err := v.volumePolicy.GetMatchAction(vfd)
|
||||
if err != nil {
|
||||
v.logger.WithError(err).Errorf("fail to get VolumePolicy match action for %+v", vfd)
|
||||
return false, err
|
||||
}
|
||||
|
||||
// If there is a match action, and the action type is custom, return true
|
||||
// if the provided parameters match as well, else return false.
|
||||
// If there is no match action, also return false
|
||||
if action != nil {
|
||||
if action.Type == resourcepolicies.Custom {
|
||||
for k, requiredValue := range matchParams {
|
||||
if actionValue, ok := action.Parameters[k]; !ok || actionValue != requiredValue {
|
||||
v.logger.Infof("Skipping custom action for %+v as value for parameter %s is %s rather than the required %s", vfd, k, actionValue, requiredValue)
|
||||
return false, nil
|
||||
}
|
||||
if action != nil {
|
||||
if action.Type == resourcepolicies.Custom {
|
||||
for k, requiredValue := range matchParams {
|
||||
if actionValue, ok := action.Parameters[k]; !ok || actionValue != requiredValue {
|
||||
v.logger.Infof("Skipping custom action for %s: %s as value for parameter %s is %s rather than the required %s",
|
||||
groupResource.String(),
|
||||
metadata.GetNamespace()+"/"+metadata.GetName(),
|
||||
k, actionValue, requiredValue)
|
||||
return false, nil
|
||||
}
|
||||
v.logger.Infof("performing custom action for %+v", vfd)
|
||||
return true, nil
|
||||
} else {
|
||||
v.logger.Infof("Skipping custom action for %+v as the action type is %s", vfd, action.Type)
|
||||
return false, nil
|
||||
}
|
||||
v.logger.Infof("performing custom action for %s: %s", groupResource.String(), metadata.GetNamespace()+"/"+metadata.GetName())
|
||||
return true, nil
|
||||
} else {
|
||||
v.logger.Infof("Skipping custom action for %s: %s as the action type is %s",
|
||||
groupResource.String(),
|
||||
metadata.GetNamespace()+"/"+metadata.GetName(),
|
||||
action.Type)
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
// If resource is PVC, and PV is nil (e.g., Pending/Lost PVC with no matching policy), return the original error
|
||||
// Don't error out on no PV, just return false
|
||||
if groupResource == kuberesource.PersistentVolumeClaims && pv == nil && pvNotFoundErr != nil {
|
||||
v.logger.WithError(pvNotFoundErr).Warnf("fail to get PV for PVC %s", pvc.Namespace+"/"+pvc.Name)
|
||||
|
||||
if (groupResource == kuberesource.PersistentVolumeClaims) && (pv == nil) && errors.Is(err, errGetPVForPVC) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
v.logger.Infof("skipping custom action for pv %s due to no matching volume policy", pv.Name)
|
||||
v.logger.Infof("skipping custom action for %s: %s due to no matching volume policy",
|
||||
groupResource.String(), metadata.GetNamespace()+"/"+metadata.GetName())
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// returns false if no matching action found. Returns true with the action name and Parameters map if there is a matching policy
|
||||
func (v *volumeHelperImpl) GetActionParameters(obj runtime.Unstructured, groupResource schema.GroupResource) (bool, string, map[string]any, error) {
|
||||
// if volume policy exists, return action parameters.
|
||||
pvc := new(corev1api.PersistentVolumeClaim)
|
||||
pv := new(corev1api.PersistentVolume)
|
||||
var err error
|
||||
|
||||
if groupResource == kuberesource.PersistentVolumeClaims {
|
||||
if err = runtime.DefaultUnstructuredConverter.FromUnstructured(obj.UnstructuredContent(), &pvc); err != nil {
|
||||
v.logger.WithError(err).Error("fail to convert unstructured into PVC")
|
||||
return false, "", nil, err
|
||||
}
|
||||
|
||||
pv, err = kubeutil.GetPVForPVC(pvc, v.client)
|
||||
if err != nil {
|
||||
v.logger.WithError(err).Warnf("failed to get PV for PVC %s", pvc.Namespace+"/"+pvc.Name)
|
||||
action, _, err := v.getPVAndMatchAction(obj, groupResource)
|
||||
if err != nil {
|
||||
if errors.Is(err, errGetPVForPVC) {
|
||||
return false, "", nil, nil
|
||||
}
|
||||
|
||||
return false, "", nil, err
|
||||
}
|
||||
|
||||
if groupResource == kuberesource.PersistentVolumes {
|
||||
if err = runtime.DefaultUnstructuredConverter.FromUnstructured(obj.UnstructuredContent(), &pv); err != nil {
|
||||
v.logger.WithError(err).Error("fail to convert unstructured into PV")
|
||||
return false, "", nil, err
|
||||
}
|
||||
metadata, metaErr := meta.Accessor(obj)
|
||||
if metaErr != nil {
|
||||
return false, "", nil, metaErr
|
||||
}
|
||||
|
||||
if v.volumePolicy != nil {
|
||||
vfd := resourcepolicies.NewVolumeFilterData(pv, nil, pvc)
|
||||
action, err := v.volumePolicy.GetMatchAction(vfd)
|
||||
if err != nil {
|
||||
v.logger.WithError(err).Errorf("fail to get VolumePolicy match action for PV %s", pv.Name)
|
||||
return false, "", nil, err
|
||||
}
|
||||
if action != nil {
|
||||
v.logger.Infof("found matching action for %s: %s, returning parameters",
|
||||
groupResource.String(), metadata.GetNamespace()+"/"+metadata.GetName())
|
||||
|
||||
// If there is a match action, and the action type is custom, return true
|
||||
// if the provided parameters match as well, else return false.
|
||||
// If there is no match action, also return false
|
||||
if action != nil {
|
||||
v.logger.Infof("found matching action for pv %s, returning parameters", pv.Name)
|
||||
return true, string(action.Type), action.Parameters, nil
|
||||
}
|
||||
return true, string(action.Type), action.Parameters, nil
|
||||
}
|
||||
|
||||
v.logger.Infof("no matching volume policy found for pv %s, no parameters to return", pv.Name)
|
||||
v.logger.Infof("no matching volume policy found for %s: %s, no parameters to return",
|
||||
groupResource.String(), metadata.GetNamespace()+"/"+metadata.GetName())
|
||||
|
||||
return false, "", nil, nil
|
||||
}
|
||||
|
||||
@@ -486,3 +483,30 @@ func (v *volumeHelperImpl) getVolumeFromResource(resource any) (*corev1api.Persi
|
||||
}
|
||||
return nil, nil, fmt.Errorf("resource is not a PersistentVolume or Volume")
|
||||
}
|
||||
|
||||
func (v *volumeHelperImpl) GetDataMoverFromActionParameters(obj runtime.Unstructured, groupResource schema.GroupResource) string {
|
||||
action, _, err := v.getPVAndMatchAction(obj, groupResource)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
metadata, metaErr := meta.Accessor(obj)
|
||||
if metaErr != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
if action != nil {
|
||||
dataMover, err := action.GetDataMover()
|
||||
if err != nil {
|
||||
v.logger.WithError(err).Warn("fail to get data mover.")
|
||||
return ""
|
||||
}
|
||||
v.logger.Infof("found matching action for %s: %s, returning data mover %s",
|
||||
groupResource.String(), metadata.GetNamespace()+"/"+metadata.GetName(), dataMover)
|
||||
return dataMover
|
||||
}
|
||||
|
||||
v.logger.Debugf("no matching volume policy found for %s: %s, no data mover parameter to return",
|
||||
groupResource.String(), metadata.GetNamespace()+"/"+metadata.GetName())
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -1543,3 +1543,586 @@ func TestVolumeHelperImpl_ShouldPerformFSBackup_UnboundPVC(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetDataMoverFromActionParameters(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
inputObj runtime.Object
|
||||
groupResource schema.GroupResource
|
||||
resourcePolicies *resourcepolicies.ResourcePolicies
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
name: "VolumePolicy match with dataMover parameter, returns dataMover string",
|
||||
inputObj: builder.ForPersistentVolume("example-pv").StorageClass("gp2-csi").ClaimRef("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Snapshot,
|
||||
Parameters: map[string]any{
|
||||
resourcepolicies.DataMoverParameter: "velero-block",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: "velero-block",
|
||||
},
|
||||
{
|
||||
name: "VolumePolicy match without dataMover parameter, returns default dataMover",
|
||||
inputObj: builder.ForPersistentVolume("example-pv").StorageClass("gp2-csi").ClaimRef("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Snapshot,
|
||||
Parameters: map[string]any{
|
||||
"otherParam": "value",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: "velero-fs",
|
||||
},
|
||||
{
|
||||
name: "VolumePolicy match with non-string dataMover parameter, returns empty string",
|
||||
inputObj: builder.ForPersistentVolume("example-pv").StorageClass("gp2-csi").ClaimRef("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Snapshot,
|
||||
Parameters: map[string]any{
|
||||
resourcepolicies.DataMoverParameter: 123,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: "",
|
||||
},
|
||||
{
|
||||
name: "VolumePolicy not match, returns empty string",
|
||||
inputObj: builder.ForPersistentVolume("example-pv").StorageClass("gp3-csi").ClaimRef("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Snapshot,
|
||||
Parameters: map[string]any{
|
||||
resourcepolicies.DataMoverParameter: "velero",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: "",
|
||||
},
|
||||
{
|
||||
name: "Error converting unstructured, returns empty string",
|
||||
inputObj: builder.ForPod("ns", "pod-1").Result(), // wrong type for PersistentVolumes
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
},
|
||||
expected: "",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
fakeClient := velerotest.NewFakeControllerRuntimeClient(t)
|
||||
|
||||
var p *resourcepolicies.Policies
|
||||
if tc.resourcePolicies != nil {
|
||||
p = &resourcepolicies.Policies{}
|
||||
err := p.BuildPolicy(tc.resourcePolicies)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
vh := NewVolumeHelperImpl(
|
||||
p,
|
||||
ptr.To(true),
|
||||
logrus.StandardLogger(),
|
||||
fakeClient,
|
||||
false,
|
||||
false,
|
||||
)
|
||||
|
||||
obj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(tc.inputObj)
|
||||
require.NoError(t, err)
|
||||
|
||||
actual := vh.GetDataMoverFromActionParameters(&unstructured.Unstructured{Object: obj}, tc.groupResource)
|
||||
assert.Equal(t, tc.expected, actual)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetActionParameters(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
inputObj runtime.Object
|
||||
groupResource schema.GroupResource
|
||||
resourcePolicies *resourcepolicies.ResourcePolicies
|
||||
expectedMatched bool
|
||||
expectedAction string
|
||||
expectedParams map[string]any
|
||||
expectedErr bool
|
||||
}{
|
||||
{
|
||||
name: "VolumePolicy match with parameters, returns true, action type, parameters",
|
||||
inputObj: builder.ForPersistentVolume("example-pv").StorageClass("gp2-csi").ClaimRef("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Custom,
|
||||
Parameters: map[string]any{
|
||||
"param1": "value1",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedMatched: true,
|
||||
expectedAction: string(resourcepolicies.Custom),
|
||||
expectedParams: map[string]any{
|
||||
"param1": "value1",
|
||||
},
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "VolumePolicy match without parameters, returns true, action type, nil parameters",
|
||||
inputObj: builder.ForPersistentVolume("example-pv").StorageClass("gp2-csi").ClaimRef("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Snapshot,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedMatched: true,
|
||||
expectedAction: string(resourcepolicies.Snapshot),
|
||||
expectedParams: nil,
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "VolumePolicy not match, returns false",
|
||||
inputObj: builder.ForPersistentVolume("example-pv").StorageClass("gp3-csi").ClaimRef("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Snapshot,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedMatched: false,
|
||||
expectedAction: "",
|
||||
expectedParams: nil,
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "PVC not having PV, returns false and no error",
|
||||
inputObj: builder.ForPersistentVolumeClaim("ns", "pvc-1").StorageClass("gp2-csi").Result(),
|
||||
groupResource: kuberesource.PersistentVolumeClaims,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
},
|
||||
expectedMatched: false,
|
||||
expectedAction: "",
|
||||
expectedParams: nil,
|
||||
expectedErr: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
fakeClient := velerotest.NewFakeControllerRuntimeClient(t)
|
||||
|
||||
var p *resourcepolicies.Policies
|
||||
if tc.resourcePolicies != nil {
|
||||
p = &resourcepolicies.Policies{}
|
||||
err := p.BuildPolicy(tc.resourcePolicies)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
vh := NewVolumeHelperImpl(
|
||||
p,
|
||||
ptr.To(true),
|
||||
logrus.StandardLogger(),
|
||||
fakeClient,
|
||||
false,
|
||||
false,
|
||||
)
|
||||
|
||||
obj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(tc.inputObj)
|
||||
require.NoError(t, err)
|
||||
|
||||
matched, actionType, params, err := vh.GetActionParameters(&unstructured.Unstructured{Object: obj}, tc.groupResource)
|
||||
if tc.expectedErr {
|
||||
require.Error(t, err)
|
||||
} else {
|
||||
require.NoError(t, err)
|
||||
}
|
||||
assert.Equal(t, tc.expectedMatched, matched)
|
||||
assert.Equal(t, tc.expectedAction, actionType)
|
||||
assert.Equal(t, tc.expectedParams, params)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestShouldPerformCustomAction(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
inputObj runtime.Object
|
||||
groupResource schema.GroupResource
|
||||
resourcePolicies *resourcepolicies.ResourcePolicies
|
||||
matchParams map[string]any
|
||||
expected bool
|
||||
expectedErr bool
|
||||
}{
|
||||
{
|
||||
name: "VolumePolicy match, action type is Custom, matchParams match exactly, returns true",
|
||||
inputObj: builder.ForPersistentVolume("example-pv").StorageClass("gp2-csi").ClaimRef("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Custom,
|
||||
Parameters: map[string]any{
|
||||
"param1": "value1",
|
||||
"param2": "value2",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
matchParams: map[string]any{
|
||||
"param1": "value1",
|
||||
},
|
||||
expected: true,
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "VolumePolicy match, action type is Custom, matchParams don't match (missing key), returns false",
|
||||
inputObj: builder.ForPersistentVolume("example-pv").StorageClass("gp2-csi").ClaimRef("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Custom,
|
||||
Parameters: map[string]any{
|
||||
"param1": "value1",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
matchParams: map[string]any{
|
||||
"param2": "value2",
|
||||
},
|
||||
expected: false,
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "VolumePolicy match, action type is Custom, matchParams don't match (different value), returns false",
|
||||
inputObj: builder.ForPersistentVolume("example-pv").StorageClass("gp2-csi").ClaimRef("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Custom,
|
||||
Parameters: map[string]any{
|
||||
"param1": "value1",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
matchParams: map[string]any{
|
||||
"param1": "value2",
|
||||
},
|
||||
expected: false,
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "VolumePolicy match, action type is not Custom, returns false",
|
||||
inputObj: builder.ForPersistentVolume("example-pv").StorageClass("gp2-csi").ClaimRef("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Snapshot,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
matchParams: map[string]any{
|
||||
"param1": "value1",
|
||||
},
|
||||
expected: false,
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "VolumePolicy not match, returns false",
|
||||
inputObj: builder.ForPersistentVolume("example-pv").StorageClass("gp3-csi").ClaimRef("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Custom,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
matchParams: map[string]any{
|
||||
"param1": "value1",
|
||||
},
|
||||
expected: false,
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "PVC not having PV, returns false and no error",
|
||||
inputObj: builder.ForPersistentVolumeClaim("ns", "pvc-1").StorageClass("gp2-csi").Result(),
|
||||
groupResource: kuberesource.PersistentVolumeClaims,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
},
|
||||
matchParams: map[string]any{
|
||||
"param1": "value1",
|
||||
},
|
||||
expected: false,
|
||||
expectedErr: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
fakeClient := velerotest.NewFakeControllerRuntimeClient(t)
|
||||
|
||||
var p *resourcepolicies.Policies
|
||||
if tc.resourcePolicies != nil {
|
||||
p = &resourcepolicies.Policies{}
|
||||
err := p.BuildPolicy(tc.resourcePolicies)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
vh := NewVolumeHelperImpl(
|
||||
p,
|
||||
ptr.To(true),
|
||||
logrus.StandardLogger(),
|
||||
fakeClient,
|
||||
false,
|
||||
false,
|
||||
)
|
||||
|
||||
obj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(tc.inputObj)
|
||||
require.NoError(t, err)
|
||||
|
||||
actual, err := vh.ShouldPerformCustomAction(&unstructured.Unstructured{Object: obj}, tc.groupResource, tc.matchParams)
|
||||
if tc.expectedErr {
|
||||
require.Error(t, err)
|
||||
} else {
|
||||
require.NoError(t, err)
|
||||
}
|
||||
assert.Equal(t, tc.expected, actual)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetPVAndMatchAction(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
inputObj runtime.Object
|
||||
groupResource schema.GroupResource
|
||||
resourcePolicies *resourcepolicies.ResourcePolicies
|
||||
expectedAction *resourcepolicies.Action
|
||||
expectedPVName string
|
||||
expectedErr bool
|
||||
expectedErrStr string
|
||||
}{
|
||||
{
|
||||
name: "PVC with matching PV and VolumePolicy, returns action and PV",
|
||||
inputObj: builder.ForPersistentVolumeClaim("ns", "pvc-1").VolumeName("pv-1").Phase(corev1api.ClaimBound).Result(),
|
||||
groupResource: kuberesource.PersistentVolumeClaims,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Snapshot,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedAction: &resourcepolicies.Action{
|
||||
Type: resourcepolicies.Snapshot,
|
||||
},
|
||||
expectedPVName: "pv-1",
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "PVC without matching PV, returns errGetPVForPVC",
|
||||
inputObj: builder.ForPersistentVolumeClaim("ns", "pvc-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumeClaims,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
},
|
||||
expectedAction: nil,
|
||||
expectedPVName: "",
|
||||
expectedErr: true,
|
||||
expectedErrStr: "fail to get PV for PVC ns/pvc-1: fail to get PV for PVC",
|
||||
},
|
||||
{
|
||||
name: "PV with matching VolumePolicy, returns action and PV",
|
||||
inputObj: builder.ForPersistentVolume("pv-1").StorageClass("gp2-csi").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
resourcePolicies: &resourcepolicies.ResourcePolicies{
|
||||
Version: "v1",
|
||||
VolumePolicies: []resourcepolicies.VolumePolicy{
|
||||
{
|
||||
Conditions: map[string]any{
|
||||
"storageClass": []string{"gp2-csi"},
|
||||
},
|
||||
Action: resourcepolicies.Action{
|
||||
Type: resourcepolicies.Snapshot,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedAction: &resourcepolicies.Action{
|
||||
Type: resourcepolicies.Snapshot,
|
||||
},
|
||||
expectedPVName: "pv-1",
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "PV without VolumePolicy, returns nil action and PV",
|
||||
inputObj: builder.ForPersistentVolume("pv-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumes,
|
||||
expectedAction: nil,
|
||||
expectedPVName: "pv-1",
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "Invalid object for PVC, returns error",
|
||||
inputObj: builder.ForPod("ns", "pod-1").Result(),
|
||||
groupResource: kuberesource.PersistentVolumeClaims,
|
||||
expectedAction: nil,
|
||||
expectedPVName: "",
|
||||
expectedErr: true,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
pv := builder.ForPersistentVolume("pv-1").StorageClass("gp2-csi").Result()
|
||||
fakeClient := velerotest.NewFakeControllerRuntimeClient(t, pv)
|
||||
|
||||
var p *resourcepolicies.Policies
|
||||
if tc.resourcePolicies != nil {
|
||||
p = &resourcepolicies.Policies{}
|
||||
err := p.BuildPolicy(tc.resourcePolicies)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
vh := NewVolumeHelperImpl(
|
||||
p,
|
||||
ptr.To(true),
|
||||
logrus.StandardLogger(),
|
||||
fakeClient,
|
||||
false,
|
||||
false,
|
||||
)
|
||||
|
||||
obj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(tc.inputObj)
|
||||
require.NoError(t, err)
|
||||
|
||||
action, outPV, err := vh.(*volumeHelperImpl).getPVAndMatchAction(&unstructured.Unstructured{Object: obj}, tc.groupResource)
|
||||
if tc.expectedErr {
|
||||
require.Error(t, err)
|
||||
if tc.expectedErrStr != "" {
|
||||
assert.Contains(t, err.Error(), tc.expectedErrStr)
|
||||
}
|
||||
} else {
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, tc.expectedAction, action)
|
||||
if tc.expectedPVName == "" {
|
||||
assert.Nil(t, outPV)
|
||||
} else {
|
||||
require.NotNil(t, outPV)
|
||||
assert.Equal(t, tc.expectedPVName, outPV.Name)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -520,6 +520,11 @@ type HookStatus struct {
|
||||
// +kubebuilder:rbac:groups=velero.io,resources=backups,verbs=create;delete;get;list;patch;update;watch
|
||||
// +kubebuilder:rbac:groups=velero.io,resources=backups/status,verbs=get;update;patch
|
||||
// +kubebuilder:resource:shortName=bak
|
||||
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="Backup status such as New/InProgress"
|
||||
// +kubebuilder:printcolumn:name="Errors",type="integer",JSONPath=".status.errors",description="Total number of errors logged during the backup"
|
||||
// +kubebuilder:printcolumn:name="Warnings",type="integer",JSONPath=".status.warnings",description="Total number of warnings logged during the backup"
|
||||
// +kubebuilder:printcolumn:name="Started",type="date",JSONPath=".status.startTimestamp",description="The time the backup was started"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
// Backup is a Velero resource that represents the capture of Kubernetes
|
||||
// cluster state at a point in time (API objects and associated volume state).
|
||||
|
||||
@@ -420,6 +420,11 @@ type RestoreProgress struct {
|
||||
// +kubebuilder:rbac:groups=velero.io,resources=restores,verbs=create;delete;get;list;patch;update;watch
|
||||
// +kubebuilder:rbac:groups=velero.io,resources=restores/status,verbs=get;update;patch
|
||||
// +kubebuilder:resource:shortName=rst
|
||||
// +kubebuilder:printcolumn:name="Backup",type="string",JSONPath=".spec.backupName",description="The name of the backup this restore is from"
|
||||
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="Restore status such as New/InProgress"
|
||||
// +kubebuilder:printcolumn:name="Errors",type="integer",JSONPath=".status.errors",description="Total number of errors logged during the restore"
|
||||
// +kubebuilder:printcolumn:name="Warnings",type="integer",JSONPath=".status.warnings",description="Total number of warnings logged during the restore"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
// Restore is a Velero resource that represents the application of
|
||||
// resources from a Velero backup to a target Kubernetes cluster.
|
||||
|
||||
@@ -27,6 +27,9 @@ import (
|
||||
// +kubebuilder:resource:shortName=vsl
|
||||
// +kubebuilder:object:generate=true
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="Provider",type="string",JSONPath=".spec.provider",description="Provider is the provider of the volume storage"
|
||||
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Volume Snapshot Location status such as Available/Unavailable"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
// VolumeSnapshotLocation is a location where Velero stores volume snapshots.
|
||||
type VolumeSnapshotLocation struct {
|
||||
|
||||
@@ -268,4 +268,8 @@ type DataUploadResult struct {
|
||||
// FSType is the file system type of the volume.
|
||||
// +optional
|
||||
FSType string `json:"fsType,omitempty"`
|
||||
|
||||
// SnapshotClass is the name of the snapshot class that the volume snapshot is created with
|
||||
// +optional
|
||||
SnapshotClass string `json:"snapshotClass,omitempty"`
|
||||
}
|
||||
|
||||
@@ -19,7 +19,9 @@ package archive
|
||||
import (
|
||||
"encoding/json"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
velerov1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
|
||||
@@ -27,13 +29,37 @@ import (
|
||||
)
|
||||
|
||||
// GetItemFilePath returns an item's file path once extracted from a Velero backup archive.
|
||||
func GetItemFilePath(rootDir, groupResource, namespace, name string) string {
|
||||
func GetItemFilePath(rootDir, groupResource, namespace, name string) (string, error) {
|
||||
return GetVersionedItemFilePath(rootDir, groupResource, namespace, name, "")
|
||||
}
|
||||
|
||||
// GetVersionedItemFilePath returns an item's file path once extracted from a Velero backup archive, with version included.
|
||||
func GetVersionedItemFilePath(rootDir, groupResource, namespace, name, versionPath string) string {
|
||||
return filepath.Join(rootDir, velerov1api.ResourcesDir, groupResource, versionPath, GetScopeDir(namespace), namespace, name+".json")
|
||||
//
|
||||
// The namespace and name components can originate from backup contents - for example the
|
||||
// additional items a RestoreItemAction returns are built from annotations on a backed up
|
||||
// object - so the joined path is verified to stay within rootDir. Without that check a
|
||||
// component containing ".." escapes the extracted backup directory and addresses an
|
||||
// arbitrary file on the Velero pod's filesystem.
|
||||
func GetVersionedItemFilePath(rootDir, groupResource, namespace, name, versionPath string) (string, error) {
|
||||
path := filepath.Join(rootDir, velerov1api.ResourcesDir, groupResource, versionPath, GetScopeDir(namespace), namespace, name+".json")
|
||||
|
||||
// rootDir is empty when building the path of an entry inside the backup tarball rather
|
||||
// than of an extracted file on disk; "." is the containment base for that relative form.
|
||||
base := rootDir
|
||||
if base == "" {
|
||||
base = "."
|
||||
}
|
||||
|
||||
rel, err := filepath.Rel(base, path)
|
||||
if err != nil {
|
||||
return "", errors.Wrapf(err, "error resolving item path for %q/%q", namespace, name)
|
||||
}
|
||||
|
||||
if rel == ".." || strings.HasPrefix(rel, ".."+string(filepath.Separator)) {
|
||||
return "", errors.Errorf("invalid item path for %q/%q: escapes the backup directory", namespace, name)
|
||||
}
|
||||
|
||||
return path, nil
|
||||
}
|
||||
|
||||
// GetScopeDir returns NamespaceScopedDir if namespace is present, or ClusterScopedDir if empty
|
||||
|
||||
@@ -27,31 +27,104 @@ import (
|
||||
)
|
||||
|
||||
func TestGetItemFilePath(t *testing.T) {
|
||||
res := GetItemFilePath("root", "resource", "", "item")
|
||||
res, err := GetItemFilePath("root", "resource", "", "item")
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "root/resources/resource/cluster/item.json", res)
|
||||
|
||||
res = GetItemFilePath("root", "resource", "namespace", "item")
|
||||
res, err = GetItemFilePath("root", "resource", "namespace", "item")
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "root/resources/resource/namespaces/namespace/item.json", res)
|
||||
|
||||
res = GetItemFilePath("", "resource", "", "item")
|
||||
res, err = GetItemFilePath("", "resource", "", "item")
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "resources/resource/cluster/item.json", res)
|
||||
|
||||
res = GetVersionedItemFilePath("root", "resource", "", "item", "")
|
||||
res, err = GetVersionedItemFilePath("root", "resource", "", "item", "")
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "root/resources/resource/cluster/item.json", res)
|
||||
|
||||
res = GetVersionedItemFilePath("root", "resource", "namespace", "item", "")
|
||||
res, err = GetVersionedItemFilePath("root", "resource", "namespace", "item", "")
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "root/resources/resource/namespaces/namespace/item.json", res)
|
||||
|
||||
res = GetVersionedItemFilePath("root", "resource", "namespace", "item", "v1")
|
||||
res, err = GetVersionedItemFilePath("root", "resource", "namespace", "item", "v1")
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "root/resources/resource/v1/namespaces/namespace/item.json", res)
|
||||
|
||||
res = GetVersionedItemFilePath("root", "resource", "", "item", "v1")
|
||||
res, err = GetVersionedItemFilePath("root", "resource", "", "item", "v1")
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "root/resources/resource/v1/cluster/item.json", res)
|
||||
|
||||
res = GetVersionedItemFilePath("", "resource", "", "item", "")
|
||||
res, err = GetVersionedItemFilePath("", "resource", "", "item", "")
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "resources/resource/cluster/item.json", res)
|
||||
}
|
||||
|
||||
// TestGetItemFilePathRejectsPathTraversal verifies that a name or namespace containing
|
||||
// ".." cannot address a file outside the extracted backup directory. These components can
|
||||
// come from backup contents, for example the additional items a RestoreItemAction builds
|
||||
// from annotations on a backed up object.
|
||||
func TestGetItemFilePathRejectsPathTraversal(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
rootDir string
|
||||
groupResource string
|
||||
namespace string
|
||||
itemName string
|
||||
}{
|
||||
{
|
||||
name: "traversal in name escapes root",
|
||||
rootDir: "/tmp/restore-dir",
|
||||
groupResource: "secrets",
|
||||
namespace: "x",
|
||||
itemName: "../../../../../../root/.docker/config",
|
||||
},
|
||||
{
|
||||
name: "traversal in namespace escapes root",
|
||||
rootDir: "/tmp/restore-dir",
|
||||
groupResource: "secrets",
|
||||
namespace: "../../../../../../etc",
|
||||
itemName: "passwd",
|
||||
},
|
||||
{
|
||||
name: "traversal in group resource escapes root",
|
||||
rootDir: "/tmp/restore-dir",
|
||||
groupResource: "../../../../../../etc",
|
||||
namespace: "",
|
||||
itemName: "passwd",
|
||||
},
|
||||
{
|
||||
name: "traversal escapes archive-relative root",
|
||||
rootDir: "",
|
||||
groupResource: "secrets",
|
||||
namespace: "x",
|
||||
itemName: "../../../../../../escape",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
res, err := GetItemFilePath(tc.rootDir, tc.groupResource, tc.namespace, tc.itemName)
|
||||
require.Error(t, err)
|
||||
assert.Contains(t, err.Error(), "escapes the backup directory")
|
||||
assert.Empty(t, res)
|
||||
|
||||
res, err = GetVersionedItemFilePath(tc.rootDir, tc.groupResource, tc.namespace, tc.itemName, "v1")
|
||||
require.Error(t, err)
|
||||
assert.Contains(t, err.Error(), "escapes the backup directory")
|
||||
assert.Empty(t, res)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// TestGetItemFilePathAllowsInnerDotDot verifies the containment check does not reject a
|
||||
// path whose ".." segments resolve back inside the root directory.
|
||||
func TestGetItemFilePathAllowsInnerDotDot(t *testing.T) {
|
||||
res, err := GetItemFilePath("root", "resource", "namespaces/..", "item")
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "root/resources/resource/namespaces/item.json", res)
|
||||
}
|
||||
|
||||
func TestGetScopeDir(t *testing.T) {
|
||||
res := GetScopeDir("")
|
||||
assert.Equal(t, velerov1api.ClusterScopedDir, res)
|
||||
|
||||
@@ -407,6 +407,8 @@ func (p *pvcBackupItemAction) Execute(
|
||||
"Backup": backup.Name,
|
||||
})
|
||||
|
||||
dataMoverFromVolumePolicy := vh.GetDataMoverFromActionParameters(item, kuberesource.PersistentVolumeClaims)
|
||||
|
||||
dataUploadLog.Info("Starting data upload of backup")
|
||||
|
||||
dataUpload, err := createDataUpload(
|
||||
@@ -418,6 +420,7 @@ func (p *pvcBackupItemAction) Execute(
|
||||
operationID,
|
||||
vsc,
|
||||
fsType,
|
||||
dataMoverFromVolumePolicy,
|
||||
)
|
||||
if err != nil {
|
||||
dataUploadLog.WithError(err).Error("failed to submit DataUpload")
|
||||
@@ -557,6 +560,7 @@ func newDataUpload(
|
||||
operationID string,
|
||||
vsc *snapshotv1api.VolumeSnapshotContent,
|
||||
fsType string,
|
||||
dataMoverFromVolumePolicy string,
|
||||
) *velerov2alpha1.DataUpload {
|
||||
parentSnapshot := ""
|
||||
|
||||
@@ -564,6 +568,11 @@ func newDataUpload(
|
||||
parentSnapshot = veleroshared.DataUploadParentSnapshotNone
|
||||
}
|
||||
|
||||
dataMover := backup.Spec.DataMover
|
||||
if dataMoverFromVolumePolicy != "" {
|
||||
dataMover = dataMoverFromVolumePolicy
|
||||
}
|
||||
|
||||
dataUpload := &velerov2alpha1.DataUpload{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
APIVersion: velerov2alpha1.SchemeGroupVersion.String(),
|
||||
@@ -596,7 +605,7 @@ func newDataUpload(
|
||||
Driver: vsc.Spec.Driver,
|
||||
},
|
||||
SourcePVC: pvc.Name,
|
||||
DataMover: backup.Spec.DataMover,
|
||||
DataMover: dataMover,
|
||||
BackupStorageLocation: backup.Spec.StorageLocation,
|
||||
SourceNamespace: pvc.Namespace,
|
||||
OperationTimeout: backup.Spec.CSISnapshotTimeout,
|
||||
@@ -627,8 +636,9 @@ func createDataUpload(
|
||||
operationID string,
|
||||
vsc *snapshotv1api.VolumeSnapshotContent,
|
||||
fsType string,
|
||||
dataMoverFromVolumePolicy string,
|
||||
) (*velerov2alpha1.DataUpload, error) {
|
||||
dataUpload := newDataUpload(backup, vs, pvc, operationID, vsc, fsType)
|
||||
dataUpload := newDataUpload(backup, vs, pvc, operationID, vsc, fsType, dataMoverFromVolumePolicy)
|
||||
|
||||
err := crClient.Create(ctx, dataUpload)
|
||||
if err != nil {
|
||||
|
||||
@@ -2229,12 +2229,13 @@ func TestGetOrCreateVolumeHelper(t *testing.T) {
|
||||
|
||||
func TestNewDataUpload(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
backupType velerov1api.BackupType
|
||||
vsClassName *string
|
||||
uploaderConfig *velerov1api.UploaderConfigForBackup
|
||||
expectedParentSnap string
|
||||
expectedDataMoverCfg map[string]string
|
||||
name string
|
||||
backupType velerov1api.BackupType
|
||||
vsClassName *string
|
||||
uploaderConfig *velerov1api.UploaderConfigForBackup
|
||||
dataMoverFromVolumePolicy string
|
||||
expectedParentSnap string
|
||||
expectedDataMoverCfg map[string]string
|
||||
}{
|
||||
{
|
||||
name: "Full backup type, no uploader config, no vs class name",
|
||||
@@ -2262,6 +2263,15 @@ func TestNewDataUpload(t *testing.T) {
|
||||
expectedParentSnap: "",
|
||||
expectedDataMoverCfg: nil,
|
||||
},
|
||||
{
|
||||
name: "Default backup type, uploader config with 0 parallel files",
|
||||
backupType: "",
|
||||
vsClassName: ptr.To("test-vs-class"),
|
||||
uploaderConfig: &velerov1api.UploaderConfigForBackup{ParallelFilesUpload: 0},
|
||||
dataMoverFromVolumePolicy: "velero-block",
|
||||
expectedParentSnap: "",
|
||||
expectedDataMoverCfg: nil,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
@@ -2310,7 +2320,7 @@ func TestNewDataUpload(t *testing.T) {
|
||||
operationID := "test-op-id"
|
||||
fsType := "ext4"
|
||||
|
||||
du := newDataUpload(backup, vs, pvc, operationID, vsc, fsType)
|
||||
du := newDataUpload(backup, vs, pvc, operationID, vsc, fsType, tc.dataMoverFromVolumePolicy)
|
||||
|
||||
require.NotNil(t, du)
|
||||
assert.Equal(t, velerov2alpha1.SchemeGroupVersion.String(), du.APIVersion)
|
||||
@@ -2344,7 +2354,12 @@ func TestNewDataUpload(t *testing.T) {
|
||||
}
|
||||
|
||||
assert.Equal(t, pvc.Name, du.Spec.SourcePVC)
|
||||
assert.Equal(t, backup.Spec.DataMover, du.Spec.DataMover)
|
||||
if tc.dataMoverFromVolumePolicy != "" {
|
||||
assert.Equal(t, tc.dataMoverFromVolumePolicy, du.Spec.DataMover)
|
||||
} else {
|
||||
assert.Equal(t, backup.Spec.DataMover, du.Spec.DataMover)
|
||||
}
|
||||
|
||||
assert.Equal(t, backup.Spec.StorageLocation, du.Spec.BackupStorageLocation)
|
||||
assert.Equal(t, pvc.Namespace, du.Spec.SourceNamespace)
|
||||
assert.Equal(t, backup.Spec.CSISnapshotTimeout, du.Spec.OperationTimeout)
|
||||
|
||||
@@ -5429,6 +5429,29 @@ func TestBackupNamespaces(t *testing.T) {
|
||||
"resources/namespaces/v1-preferredversion/cluster/ns-3.json",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Wildcard star with excluded namespaces test",
|
||||
backup: defaultBackup().IncludedNamespaces("*").ExcludedNamespaces("ns-2").Result(),
|
||||
apiResources: []*test.APIResource{
|
||||
test.Namespaces(
|
||||
builder.ForNamespace("ns-1").Phase(corev1api.NamespaceActive).Result(),
|
||||
builder.ForNamespace("ns-2").Phase(corev1api.NamespaceActive).Result(),
|
||||
builder.ForNamespace("ns-3").Phase(corev1api.NamespaceActive).Result(),
|
||||
),
|
||||
test.Deployments(
|
||||
builder.ForDeployment("ns-1", "deploy-1").Result(),
|
||||
builder.ForDeployment("ns-2", "deploy-2").Result(),
|
||||
),
|
||||
},
|
||||
want: []string{
|
||||
"resources/namespaces/cluster/ns-1.json",
|
||||
"resources/namespaces/v1-preferredversion/cluster/ns-1.json",
|
||||
"resources/namespaces/cluster/ns-3.json",
|
||||
"resources/namespaces/v1-preferredversion/cluster/ns-3.json",
|
||||
"resources/deployments.apps/namespaces/ns-1/deploy-1.json",
|
||||
"resources/deployments.apps/v1-preferredversion/namespaces/ns-1/deploy-1.json",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Empty namespace test",
|
||||
backup: defaultBackup().IncludedNamespaces("invalid*").Result(),
|
||||
|
||||
@@ -351,16 +351,28 @@ func (ib *itemBackupper) backupItemInternal(logger logrus.FieldLogger, obj runti
|
||||
if versionPath == preferredGVR.Version {
|
||||
// backing up preferred version backup without API Group version - for backward compatibility
|
||||
log.Debugf("Resource %s/%s, version= %s, preferredVersion=%s", groupResource.String(), name, versionPath, preferredGVR.Version)
|
||||
itemFiles = append(itemFiles, getFileForArchive(namespace, name, groupResource.String(), "", itemBytes))
|
||||
fileForArchive, err := getFileForArchive(namespace, name, groupResource.String(), "", itemBytes)
|
||||
if err != nil {
|
||||
return false, itemFiles, err
|
||||
}
|
||||
itemFiles = append(itemFiles, fileForArchive)
|
||||
versionPath = versionPath + velerov1api.PreferredVersionDir
|
||||
}
|
||||
|
||||
itemFiles = append(itemFiles, getFileForArchive(namespace, name, groupResource.String(), versionPath, itemBytes))
|
||||
fileForArchive, err := getFileForArchive(namespace, name, groupResource.String(), versionPath, itemBytes)
|
||||
if err != nil {
|
||||
return false, itemFiles, err
|
||||
}
|
||||
itemFiles = append(itemFiles, fileForArchive)
|
||||
return true, itemFiles, nil
|
||||
}
|
||||
|
||||
func getFileForArchive(namespace, name, groupResource, versionPath string, itemBytes []byte) FileForArchive {
|
||||
filePath := archive.GetVersionedItemFilePath("", groupResource, namespace, name, versionPath)
|
||||
func getFileForArchive(namespace, name, groupResource, versionPath string, itemBytes []byte) (FileForArchive, error) {
|
||||
filePath, err := archive.GetVersionedItemFilePath("", groupResource, namespace, name, versionPath)
|
||||
if err != nil {
|
||||
return FileForArchive{}, err
|
||||
}
|
||||
|
||||
hdr := &tar.Header{
|
||||
Name: filePath,
|
||||
Size: int64(len(itemBytes)),
|
||||
@@ -368,7 +380,7 @@ func getFileForArchive(namespace, name, groupResource, versionPath string, itemB
|
||||
Mode: 0755,
|
||||
ModTime: time.Now(),
|
||||
}
|
||||
return FileForArchive{FilePath: filePath, Header: hdr, FileBytes: itemBytes}
|
||||
return FileForArchive{FilePath: filePath, Header: hdr, FileBytes: itemBytes}, nil
|
||||
}
|
||||
|
||||
// backupPodVolumes triggers pod volume backups of the specified pod volumes, and returns a list of PodVolumeBackups
|
||||
|
||||
@@ -508,7 +508,8 @@ func (r *itemCollector) getResourceItems(
|
||||
kind: resource.Kind,
|
||||
})
|
||||
|
||||
if item.GetNamespace() != "" {
|
||||
if item.GetNamespace() != "" &&
|
||||
r.backupRequest.NamespaceIncludesExcludes.ShouldInclude(item.GetNamespace()) {
|
||||
log.Debugf("Track namespace %s in nsTracker", item.GetNamespace())
|
||||
r.nsTracker.track(item.GetNamespace())
|
||||
}
|
||||
|
||||
@@ -262,11 +262,17 @@ func (o *CreateOptions) validateFromScheduleFlag(c *cobra.Command) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// validateBackupType check the backupType value and return the valid value.
|
||||
func (o *CreateOptions) validateBackupType() error {
|
||||
backupType := strings.TrimSpace(o.BackupType)
|
||||
// Allow full, and incremental from the CLI, and ignore case of the input string's case.
|
||||
backupType := strings.ToLower(strings.TrimSpace(o.BackupType))
|
||||
|
||||
switch backupType {
|
||||
case "", "Incremental", "Full":
|
||||
case "":
|
||||
case "incremental":
|
||||
o.BackupType = string(velerov1api.BackupTypeIncremental)
|
||||
case "full":
|
||||
o.BackupType = string(velerov1api.BackupTypeFull)
|
||||
default:
|
||||
return fmt.Errorf("invalid backup type %s - valid values are 'Incremental', and 'Full'", backupType)
|
||||
}
|
||||
|
||||
@@ -129,30 +129,34 @@ func TestCreateOptions_ValidateBackupType(t *testing.T) {
|
||||
o.BackupType = ""
|
||||
err := o.validateBackupType()
|
||||
require.NoError(t, err)
|
||||
require.Empty(t, o.BackupType)
|
||||
|
||||
o.BackupType = "Incremental"
|
||||
err = o.validateBackupType()
|
||||
require.NoError(t, err)
|
||||
require.EqualValues(t, velerov1api.BackupTypeIncremental, o.BackupType)
|
||||
|
||||
o.BackupType = "Full"
|
||||
err = o.validateBackupType()
|
||||
require.NoError(t, err)
|
||||
require.EqualValues(t, velerov1api.BackupTypeFull, o.BackupType)
|
||||
|
||||
o.BackupType = " Incremental "
|
||||
err = o.validateBackupType()
|
||||
require.NoError(t, err)
|
||||
require.EqualValues(t, velerov1api.BackupTypeIncremental, o.BackupType)
|
||||
|
||||
o.BackupType = "iNcReMeNtAl"
|
||||
err = o.validateBackupType()
|
||||
require.NoError(t, err)
|
||||
require.EqualValues(t, velerov1api.BackupTypeIncremental, o.BackupType)
|
||||
})
|
||||
|
||||
t.Run("invalid backup type", func(t *testing.T) {
|
||||
o := NewCreateOptions()
|
||||
|
||||
o.BackupType = "incremental"
|
||||
err := o.validateBackupType()
|
||||
require.Error(t, err)
|
||||
require.Equal(t, "invalid backup type incremental - valid values are 'Incremental', and 'Full'", err.Error())
|
||||
|
||||
o.BackupType = "invalid"
|
||||
err = o.validateBackupType()
|
||||
err := o.validateBackupType()
|
||||
require.Error(t, err)
|
||||
require.Equal(t, "invalid backup type invalid - valid values are 'Incremental', and 'Full'", err.Error())
|
||||
})
|
||||
|
||||
+72
-36
@@ -23,8 +23,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
kbclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
velerov1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
|
||||
"github.com/vmware-tanzu/velero/pkg/client"
|
||||
@@ -34,59 +35,94 @@ import (
|
||||
"github.com/vmware-tanzu/velero/pkg/cmd/util/downloadrequest"
|
||||
)
|
||||
|
||||
func NewLogsCommand(f client.Factory) *cobra.Command {
|
||||
// LogsOptions holds the state for the restore logs command, mirroring
|
||||
// pkg/cmd/cli/backup.LogsOptions so both commands are shaped the same way.
|
||||
type LogsOptions struct {
|
||||
Timeout time.Duration
|
||||
InsecureSkipTLSVerify bool
|
||||
CaCertFile string
|
||||
Client kbclient.Client
|
||||
RestoreName string
|
||||
}
|
||||
|
||||
func NewLogsOptions() LogsOptions {
|
||||
config, err := client.LoadConfig()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "WARNING: Error reading config file: %v\n", err)
|
||||
}
|
||||
|
||||
timeout := time.Minute
|
||||
insecureSkipTLSVerify := false
|
||||
caCertFile := config.CACertFile()
|
||||
return LogsOptions{
|
||||
Timeout: time.Minute,
|
||||
InsecureSkipTLSVerify: false,
|
||||
CaCertFile: config.CACertFile(),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *LogsOptions) BindFlags(flags *pflag.FlagSet) {
|
||||
flags.DurationVar(&l.Timeout, "timeout", l.Timeout, "How long to wait to receive logs.")
|
||||
flags.BoolVar(&l.InsecureSkipTLSVerify, "insecure-skip-tls-verify", l.InsecureSkipTLSVerify, "If true, the object store's TLS certificate will not be checked for validity. This is insecure and susceptible to man-in-the-middle attacks. Not recommended for production.")
|
||||
flags.StringVar(&l.CaCertFile, "cacert", l.CaCertFile, "Path to a certificate bundle to use when verifying TLS connections. If not specified, the CA certificate from the BackupStorageLocation will be used if available.")
|
||||
}
|
||||
|
||||
func (l *LogsOptions) Run(c *cobra.Command, f client.Factory) error {
|
||||
restore := new(velerov1api.Restore)
|
||||
err := l.Client.Get(context.Background(), kbclient.ObjectKey{Namespace: f.Namespace(), Name: l.RestoreName}, restore)
|
||||
if apierrors.IsNotFound(err) {
|
||||
return fmt.Errorf("restore %q does not exist", l.RestoreName)
|
||||
} else if err != nil {
|
||||
return fmt.Errorf("error checking for restore %q: %v", l.RestoreName, err)
|
||||
}
|
||||
|
||||
switch restore.Status.Phase {
|
||||
case velerov1api.RestorePhaseCompleted, velerov1api.RestorePhaseFailed, velerov1api.RestorePhasePartiallyFailed, velerov1api.RestorePhaseWaitingForPluginOperations, velerov1api.RestorePhaseWaitingForPluginOperationsPartiallyFailed:
|
||||
// terminal and waiting for plugin operations phases, do nothing.
|
||||
default:
|
||||
return fmt.Errorf("logs for restore %q are not available until it's finished processing, please wait "+
|
||||
"until the restore has a phase of Completed or Failed and try again", l.RestoreName)
|
||||
}
|
||||
|
||||
// Get BSL cacert if available
|
||||
bslCACert, err := cacert.GetCACertFromRestore(context.Background(), l.Client, f.Namespace(), restore)
|
||||
if err != nil {
|
||||
// Log the error but don't fail - we can still try to download without the BSL cacert
|
||||
fmt.Fprintf(os.Stderr, "WARNING: Error getting cacert from BSL: %v\n", err)
|
||||
bslCACert = ""
|
||||
}
|
||||
|
||||
return downloadrequest.StreamWithBSLCACert(context.Background(), l.Client, f.Namespace(), l.RestoreName, velerov1api.DownloadTargetKindRestoreLog, os.Stdout, l.Timeout, l.InsecureSkipTLSVerify, l.CaCertFile, bslCACert)
|
||||
}
|
||||
|
||||
func (l *LogsOptions) Complete(args []string, f client.Factory) error {
|
||||
if len(args) > 0 {
|
||||
l.RestoreName = args[0]
|
||||
}
|
||||
|
||||
kbClient, err := f.KubebuilderClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
l.Client = kbClient
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewLogsCommand(f client.Factory) *cobra.Command {
|
||||
l := NewLogsOptions()
|
||||
|
||||
c := &cobra.Command{
|
||||
Use: "logs RESTORE",
|
||||
Short: "Get restore logs",
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(c *cobra.Command, args []string) {
|
||||
restoreName := args[0]
|
||||
|
||||
kbClient, err := f.KubebuilderClient()
|
||||
err := l.Complete(args, f)
|
||||
cmd.CheckError(err)
|
||||
|
||||
restore := new(velerov1api.Restore)
|
||||
err = kbClient.Get(context.Background(), ctrlclient.ObjectKey{Namespace: f.Namespace(), Name: restoreName}, restore)
|
||||
if apierrors.IsNotFound(err) {
|
||||
cmd.Exit("Restore %q does not exist.", restoreName)
|
||||
} else if err != nil {
|
||||
cmd.Exit("Error checking for restore %q: %v", restoreName, err)
|
||||
}
|
||||
|
||||
switch restore.Status.Phase {
|
||||
case velerov1api.RestorePhaseCompleted, velerov1api.RestorePhaseFailed, velerov1api.RestorePhasePartiallyFailed, velerov1api.RestorePhaseWaitingForPluginOperations, velerov1api.RestorePhaseWaitingForPluginOperationsPartiallyFailed:
|
||||
// terminal and waiting for plugin operations phases, don't exit.
|
||||
default:
|
||||
cmd.Exit("Logs for restore %q are not available until it's finished processing. Please wait "+
|
||||
"until the restore has a phase of Completed or Failed and try again.", restoreName)
|
||||
}
|
||||
|
||||
// Get BSL cacert if available
|
||||
bslCACert, err := cacert.GetCACertFromRestore(context.Background(), kbClient, f.Namespace(), restore)
|
||||
if err != nil {
|
||||
// Log the error but don't fail - we can still try to download without the BSL cacert
|
||||
fmt.Fprintf(os.Stderr, "WARNING: Error getting cacert from BSL: %v\n", err)
|
||||
bslCACert = ""
|
||||
}
|
||||
|
||||
err = downloadrequest.StreamWithBSLCACert(context.Background(), kbClient, f.Namespace(), restoreName, velerov1api.DownloadTargetKindRestoreLog, os.Stdout, timeout, insecureSkipTLSVerify, caCertFile, bslCACert)
|
||||
err = l.Run(c, f)
|
||||
cmd.CheckError(err)
|
||||
},
|
||||
}
|
||||
|
||||
c.ValidArgsFunction = cli.CompleteRestoreNames(f)
|
||||
c.Flags().DurationVar(&timeout, "timeout", timeout, "How long to wait to receive logs.")
|
||||
c.Flags().BoolVar(&insecureSkipTLSVerify, "insecure-skip-tls-verify", insecureSkipTLSVerify, "If true, the object store's TLS certificate will not be checked for validity. This is insecure and susceptible to man-in-the-middle attacks. Not recommended for production.")
|
||||
c.Flags().StringVar(&caCertFile, "cacert", caCertFile, "Path to a certificate bundle to use when verifying TLS connections. If not specified, the CA certificate from the BackupStorageLocation will be used if available.")
|
||||
l.BindFlags(c.Flags())
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -17,10 +17,12 @@ limitations under the License.
|
||||
package restore
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
flag "github.com/spf13/pflag"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
kbclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
@@ -77,13 +79,20 @@ func TestNewLogsCommand(t *testing.T) {
|
||||
c := NewLogsCommand(f)
|
||||
assert.Equal(t, "Get restore logs", c.Short)
|
||||
|
||||
// The restore command exits with an error message when restore is not complete
|
||||
// We can't easily test this since it calls cmd.Exit, which exits the process
|
||||
// So we'll skip this test case
|
||||
t.Skip("Cannot test restore not complete case due to cmd.Exit() call")
|
||||
l := NewLogsOptions()
|
||||
flags := new(flag.FlagSet)
|
||||
l.BindFlags(flags)
|
||||
err = l.Complete([]string{restoreName}, f)
|
||||
require.NoError(t, err)
|
||||
|
||||
err = l.Run(c, f)
|
||||
require.Error(t, err)
|
||||
require.ErrorContains(t, err, fmt.Sprintf("logs for restore %q are not available until it's finished processing", restoreName))
|
||||
})
|
||||
|
||||
t.Run("Restore not exist test", func(t *testing.T) {
|
||||
restoreName := "not-exist"
|
||||
|
||||
// create a factory
|
||||
f := &factorymocks.Factory{}
|
||||
|
||||
@@ -95,10 +104,15 @@ func TestNewLogsCommand(t *testing.T) {
|
||||
c := NewLogsCommand(f)
|
||||
assert.Equal(t, "Get restore logs", c.Short)
|
||||
|
||||
// The restore command exits with an error message when restore doesn't exist
|
||||
// We can't easily test this since it calls cmd.Exit, which exits the process
|
||||
// So we'll skip this test case
|
||||
t.Skip("Cannot test restore not exist case due to cmd.Exit() call")
|
||||
l := NewLogsOptions()
|
||||
flags := new(flag.FlagSet)
|
||||
l.BindFlags(flags)
|
||||
err := l.Complete([]string{restoreName}, f)
|
||||
require.NoError(t, err)
|
||||
|
||||
err = l.Run(c, f)
|
||||
require.Error(t, err)
|
||||
require.Equal(t, fmt.Sprintf("restore %q does not exist", restoreName), err.Error())
|
||||
})
|
||||
|
||||
t.Run("Restore with BSL cacert test", func(t *testing.T) {
|
||||
|
||||
@@ -107,7 +107,7 @@ func printBackup(backup *velerov1api.Backup) []metav1.TableRow {
|
||||
status,
|
||||
backup.Status.Errors,
|
||||
backup.Status.Warnings,
|
||||
backup.Status.StartTimestamp,
|
||||
formatTimestamp(backup.Status.StartTimestamp),
|
||||
humanReadableTimeFromNow(expiration),
|
||||
backup.Spec.StorageLocation,
|
||||
queuePosition(backup.Status.QueuePosition),
|
||||
|
||||
@@ -248,3 +248,17 @@ func NewPrinter(cmd *cobra.Command) (printers.ResourcePrinter, error) {
|
||||
|
||||
return printer, nil
|
||||
}
|
||||
|
||||
// formatTimestamp renders an optional timestamp for a table cell.
|
||||
//
|
||||
// Appending a nil *metav1.Time to a row prints "<nil>", which reaches the user
|
||||
// for any object that has not reached the phase that sets the field: a backup
|
||||
// that failed validation never gets a start time, and a restore that failed
|
||||
// validation gets neither a start nor a completion time. An unset timestamp
|
||||
// shows as "n/a" instead, matching humanReadableTimeFromNow in the same row.
|
||||
func formatTimestamp(t *metav1.Time) string {
|
||||
if t == nil || t.IsZero() {
|
||||
return "n/a"
|
||||
}
|
||||
return t.String()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package output
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
velerov1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
|
||||
)
|
||||
|
||||
func TestFormatTimestamp(t *testing.T) {
|
||||
set := metav1.NewTime(time.Date(2026, 8, 8, 21, 6, 28, 0, time.UTC))
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
input *metav1.Time
|
||||
want string
|
||||
}{
|
||||
{
|
||||
name: "nil renders as n/a",
|
||||
input: nil,
|
||||
want: "n/a",
|
||||
},
|
||||
{
|
||||
name: "zero value renders as n/a",
|
||||
input: &metav1.Time{},
|
||||
want: "n/a",
|
||||
},
|
||||
{
|
||||
name: "a set timestamp is unchanged",
|
||||
input: &set,
|
||||
want: set.String(),
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
assert.Equal(t, tc.want, formatTimestamp(tc.input))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// A backup that fails validation never starts, so StartTimestamp stays nil.
|
||||
func TestPrintBackupWithoutStartTimestamp(t *testing.T) {
|
||||
backup := &velerov1api.Backup{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "failed-validation"},
|
||||
Status: velerov1api.BackupStatus{
|
||||
Phase: velerov1api.BackupPhaseFailedValidation,
|
||||
},
|
||||
}
|
||||
|
||||
rows := printBackup(backup)
|
||||
require.Len(t, rows, 1)
|
||||
|
||||
// Name, Status, Errors, Warnings, Created, ...
|
||||
assert.Equal(t, "n/a", rows[0].Cells[4], "unset start time should not print as <nil>")
|
||||
assert.Equal(t, string(velerov1api.BackupPhaseFailedValidation), rows[0].Cells[1])
|
||||
}
|
||||
|
||||
func TestPrintBackupWithStartTimestamp(t *testing.T) {
|
||||
started := metav1.NewTime(time.Date(2026, 8, 8, 21, 6, 28, 0, time.UTC))
|
||||
backup := &velerov1api.Backup{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "completed"},
|
||||
Status: velerov1api.BackupStatus{
|
||||
Phase: velerov1api.BackupPhaseCompleted,
|
||||
StartTimestamp: &started,
|
||||
},
|
||||
}
|
||||
|
||||
rows := printBackup(backup)
|
||||
require.Len(t, rows, 1)
|
||||
assert.Equal(t, started.String(), rows[0].Cells[4])
|
||||
}
|
||||
|
||||
// A restore that fails validation gets neither timestamp.
|
||||
func TestPrintRestoreWithoutTimestamps(t *testing.T) {
|
||||
restore := &velerov1api.Restore{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "failed-validation"},
|
||||
Spec: velerov1api.RestoreSpec{BackupName: "does-not-exist"},
|
||||
Status: velerov1api.RestoreStatus{
|
||||
Phase: velerov1api.RestorePhaseFailedValidation,
|
||||
},
|
||||
}
|
||||
|
||||
rows := printRestore(restore)
|
||||
require.Len(t, rows, 1)
|
||||
|
||||
// Name, Backup, Status, Started, Completed, ...
|
||||
assert.Equal(t, "n/a", rows[0].Cells[3], "unset start time should not print as <nil>")
|
||||
assert.Equal(t, "n/a", rows[0].Cells[4], "unset completion time should not print as <nil>")
|
||||
}
|
||||
|
||||
func TestPrintRestoreWithTimestamps(t *testing.T) {
|
||||
started := metav1.NewTime(time.Date(2026, 8, 8, 21, 9, 40, 0, time.UTC))
|
||||
completed := metav1.NewTime(time.Date(2026, 8, 8, 21, 9, 41, 0, time.UTC))
|
||||
|
||||
restore := &velerov1api.Restore{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "completed"},
|
||||
Spec: velerov1api.RestoreSpec{BackupName: "nightly-1"},
|
||||
Status: velerov1api.RestoreStatus{
|
||||
Phase: velerov1api.RestorePhaseCompleted,
|
||||
StartTimestamp: &started,
|
||||
CompletionTimestamp: &completed,
|
||||
},
|
||||
}
|
||||
|
||||
rows := printRestore(restore)
|
||||
require.Len(t, rows, 1)
|
||||
assert.Equal(t, started.String(), rows[0].Cells[3])
|
||||
assert.Equal(t, completed.String(), rows[0].Cells[4])
|
||||
}
|
||||
@@ -62,8 +62,8 @@ func printRestore(restore *v1.Restore) []metav1.TableRow {
|
||||
restore.Name,
|
||||
restore.Spec.BackupName,
|
||||
status,
|
||||
restore.Status.StartTimestamp,
|
||||
restore.Status.CompletionTimestamp,
|
||||
formatTimestamp(restore.Status.StartTimestamp),
|
||||
formatTimestamp(restore.Status.CompletionTimestamp),
|
||||
restore.Status.Errors,
|
||||
restore.Status.Warnings,
|
||||
restore.CreationTimestamp.Time,
|
||||
|
||||
@@ -271,11 +271,11 @@ func (b *backupSyncReconciler) filterBackupOwnerReferences(ctx context.Context,
|
||||
case err != nil && apierrors.IsNotFound(err):
|
||||
log.Warnf("Removing missing schedule ownership reference %s/%s from backup", backup.Namespace, v.Name)
|
||||
continue
|
||||
case err != nil && !apierrors.IsNotFound(err):
|
||||
log.WithError(errors.WithStack(err)).Error("Error finding schedule ownership reference, keeping schedule on backup")
|
||||
case schedule.UID != v.UID:
|
||||
log.Warnf("Removing schedule ownership reference with mismatched UIDs. Expected %s, got %s", v.UID, schedule.UID)
|
||||
continue
|
||||
case err != nil && !apierrors.IsNotFound(err):
|
||||
log.WithError(errors.WithStack(err)).Error("Error finding schedule ownership reference, keeping schedule on backup")
|
||||
}
|
||||
default:
|
||||
log.Warnf("Unable to check ownership reference for unknown kind, %s", v.Kind)
|
||||
|
||||
@@ -36,6 +36,7 @@ import (
|
||||
ctrl "sigs.k8s.io/controller-runtime"
|
||||
ctrlClient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
ctrlfake "sigs.k8s.io/controller-runtime/pkg/client/fake"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client/interceptor"
|
||||
|
||||
velerov1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
|
||||
"github.com/vmware-tanzu/velero/pkg/builder"
|
||||
@@ -914,4 +915,47 @@ var _ = Describe("Backup Sync Reconciler", func() {
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
It("filterBackupOwnerReferences preserves owner reference on transient API error", func() {
|
||||
// This test verifies the fix for the switch case ordering bug:
|
||||
// When client.Get returns a non-NotFound error (e.g. transient API failure),
|
||||
// the owner reference must be kept on the backup rather than silently dropped
|
||||
// due to an incorrect UID comparison against a zero-value struct.
|
||||
scheduleUID := types.UID("schedule-uid-1")
|
||||
backup := &velerov1api.Backup{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test-backup",
|
||||
Namespace: "test-namespace",
|
||||
OwnerReferences: []metav1.OwnerReference{
|
||||
{
|
||||
Kind: "Schedule",
|
||||
Name: "my-schedule",
|
||||
UID: scheduleUID,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Build a fake client that returns a generic (non-NotFound) error on Get,
|
||||
// simulating a transient API server failure.
|
||||
transientErr := fmt.Errorf("transient connection error")
|
||||
fakeClient := ctrlfake.NewClientBuilder().
|
||||
WithInterceptorFuncs(interceptor.Funcs{
|
||||
Get: func(ctx context.Context, c ctrlClient.WithWatch, key ctrlClient.ObjectKey, obj ctrlClient.Object, opts ...ctrlClient.GetOption) error {
|
||||
return transientErr
|
||||
},
|
||||
}).
|
||||
Build()
|
||||
|
||||
b := backupSyncReconciler{
|
||||
client: fakeClient,
|
||||
}
|
||||
|
||||
logger := velerotest.NewLogger()
|
||||
references := b.filterBackupOwnerReferences(context.Background(), backup, logger)
|
||||
|
||||
// The owner reference must be preserved when a transient error occurs.
|
||||
Expect(references).To(HaveLen(1))
|
||||
Expect(references[0].UID).To(Equal(scheduleUID))
|
||||
})
|
||||
})
|
||||
|
||||
@@ -693,11 +693,11 @@ func (r *DataDownloadReconciler) findSnapshotRestoreForPod(ctx context.Context,
|
||||
r.prepareDataDownload(dd)
|
||||
return true
|
||||
}); err != nil {
|
||||
log.WithError(err).Warn("failed to update dataudownload, prepare will halt for this dataudownload")
|
||||
log.WithError(err).Warn("failed to update datadownload, prepare will halt for this datadownload")
|
||||
return []reconcile.Request{}
|
||||
}
|
||||
} else if unrecoverable, reason := kube.IsPodUnrecoverable(pod, log); unrecoverable {
|
||||
err := UpdateDataDownloadWithRetry(context.Background(), r.client, types.NamespacedName{Namespace: dd.Namespace, Name: dd.Name}, r.logger.WithField("datadownlad", dd.Name),
|
||||
err := UpdateDataDownloadWithRetry(context.Background(), r.client, types.NamespacedName{Namespace: dd.Namespace, Name: dd.Name}, r.logger.WithField("datadownload", dd.Name),
|
||||
func(dataDownload *velerov2alpha1api.DataDownload) bool {
|
||||
if dataDownload.Spec.Cancel {
|
||||
return false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc-gen-go v1.36.11-devel
|
||||
// protoc v4.25.2
|
||||
// source: BackupItemAction.proto
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -21,22 +22,19 @@ const (
|
||||
)
|
||||
|
||||
type ExecuteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
|
||||
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
|
||||
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ExecuteRequest) Reset() {
|
||||
*x = ExecuteRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_BackupItemAction_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_BackupItemAction_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ExecuteRequest) String() string {
|
||||
@@ -47,7 +45,7 @@ func (*ExecuteRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ExecuteRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_BackupItemAction_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -84,21 +82,18 @@ func (x *ExecuteRequest) GetBackup() []byte {
|
||||
}
|
||||
|
||||
type ExecuteResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Item []byte `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
|
||||
AdditionalItems []*ResourceIdentifier `protobuf:"bytes,2,rep,name=additionalItems,proto3" json:"additionalItems,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Item []byte `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
|
||||
AdditionalItems []*ResourceIdentifier `protobuf:"bytes,2,rep,name=additionalItems,proto3" json:"additionalItems,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ExecuteResponse) Reset() {
|
||||
*x = ExecuteResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_BackupItemAction_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_BackupItemAction_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ExecuteResponse) String() string {
|
||||
@@ -109,7 +104,7 @@ func (*ExecuteResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ExecuteResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_BackupItemAction_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -139,20 +134,17 @@ func (x *ExecuteResponse) GetAdditionalItems() []*ResourceIdentifier {
|
||||
}
|
||||
|
||||
type BackupItemActionAppliesToRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *BackupItemActionAppliesToRequest) Reset() {
|
||||
*x = BackupItemActionAppliesToRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_BackupItemAction_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_BackupItemAction_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *BackupItemActionAppliesToRequest) String() string {
|
||||
@@ -163,7 +155,7 @@ func (*BackupItemActionAppliesToRequest) ProtoMessage() {}
|
||||
|
||||
func (x *BackupItemActionAppliesToRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_BackupItemAction_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -186,20 +178,17 @@ func (x *BackupItemActionAppliesToRequest) GetPlugin() string {
|
||||
}
|
||||
|
||||
type BackupItemActionAppliesToResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ResourceSelector *ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ResourceSelector *ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *BackupItemActionAppliesToResponse) Reset() {
|
||||
*x = BackupItemActionAppliesToResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_BackupItemAction_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_BackupItemAction_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *BackupItemActionAppliesToResponse) String() string {
|
||||
@@ -210,7 +199,7 @@ func (*BackupItemActionAppliesToResponse) ProtoMessage() {}
|
||||
|
||||
func (x *BackupItemActionAppliesToResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_BackupItemAction_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -234,65 +223,38 @@ func (x *BackupItemActionAppliesToResponse) GetResourceSelector() *ResourceSelec
|
||||
|
||||
var File_BackupItemAction_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_BackupItemAction_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
|
||||
0x74, 0x65, 0x64, 0x1a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x22, 0x54, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69,
|
||||
0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x6e, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75,
|
||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74,
|
||||
0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x47,
|
||||
0x0a, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
|
||||
0x74, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e,
|
||||
0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x0a, 0x20, 0x42, 0x61, 0x63, 0x6b, 0x75,
|
||||
0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69,
|
||||
0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70,
|
||||
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75,
|
||||
0x67, 0x69, 0x6e, 0x22, 0x6c, 0x0a, 0x21, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52,
|
||||
0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f,
|
||||
0x72, 0x32, 0xbc, 0x01, 0x0a, 0x10, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65,
|
||||
0x73, 0x54, 0x6f, 0x12, 0x2b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e,
|
||||
0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x2c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x42, 0x61, 0x63,
|
||||
0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70,
|
||||
0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40,
|
||||
0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65,
|
||||
0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
|
||||
0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76,
|
||||
0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61, 0x6e, 0x7a, 0x75, 0x2f, 0x76, 0x65, 0x6c, 0x65,
|
||||
0x72, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x65,
|
||||
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_BackupItemAction_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x16BackupItemAction.proto\x12\tgenerated\x1a\fShared.proto\"T\n" +
|
||||
"\x0eExecuteRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x12\n" +
|
||||
"\x04item\x18\x02 \x01(\fR\x04item\x12\x16\n" +
|
||||
"\x06backup\x18\x03 \x01(\fR\x06backup\"n\n" +
|
||||
"\x0fExecuteResponse\x12\x12\n" +
|
||||
"\x04item\x18\x01 \x01(\fR\x04item\x12G\n" +
|
||||
"\x0fadditionalItems\x18\x02 \x03(\v2\x1d.generated.ResourceIdentifierR\x0fadditionalItems\":\n" +
|
||||
" BackupItemActionAppliesToRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\"l\n" +
|
||||
"!BackupItemActionAppliesToResponse\x12G\n" +
|
||||
"\x10ResourceSelector\x18\x01 \x01(\v2\x1b.generated.ResourceSelectorR\x10ResourceSelector2\xbc\x01\n" +
|
||||
"\x10BackupItemAction\x12f\n" +
|
||||
"\tAppliesTo\x12+.generated.BackupItemActionAppliesToRequest\x1a,.generated.BackupItemActionAppliesToResponse\x12@\n" +
|
||||
"\aExecute\x12\x19.generated.ExecuteRequest\x1a\x1a.generated.ExecuteResponseB5Z3github.com/vmware-tanzu/velero/pkg/plugin/generatedb\x06proto3"
|
||||
|
||||
var (
|
||||
file_BackupItemAction_proto_rawDescOnce sync.Once
|
||||
file_BackupItemAction_proto_rawDescData = file_BackupItemAction_proto_rawDesc
|
||||
file_BackupItemAction_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_BackupItemAction_proto_rawDescGZIP() []byte {
|
||||
file_BackupItemAction_proto_rawDescOnce.Do(func() {
|
||||
file_BackupItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(file_BackupItemAction_proto_rawDescData)
|
||||
file_BackupItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_BackupItemAction_proto_rawDesc), len(file_BackupItemAction_proto_rawDesc)))
|
||||
})
|
||||
return file_BackupItemAction_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_BackupItemAction_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_BackupItemAction_proto_goTypes = []interface{}{
|
||||
var file_BackupItemAction_proto_goTypes = []any{
|
||||
(*ExecuteRequest)(nil), // 0: generated.ExecuteRequest
|
||||
(*ExecuteResponse)(nil), // 1: generated.ExecuteResponse
|
||||
(*BackupItemActionAppliesToRequest)(nil), // 2: generated.BackupItemActionAppliesToRequest
|
||||
@@ -320,61 +282,11 @@ func file_BackupItemAction_proto_init() {
|
||||
return
|
||||
}
|
||||
file_Shared_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_BackupItemAction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ExecuteRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_BackupItemAction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ExecuteResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_BackupItemAction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BackupItemActionAppliesToRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_BackupItemAction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BackupItemActionAppliesToResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_BackupItemAction_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_BackupItemAction_proto_rawDesc), len(file_BackupItemAction_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
@@ -385,7 +297,6 @@ func file_BackupItemAction_proto_init() {
|
||||
MessageInfos: file_BackupItemAction_proto_msgTypes,
|
||||
}.Build()
|
||||
File_BackupItemAction_proto = out.File
|
||||
file_BackupItemAction_proto_rawDesc = nil
|
||||
file_BackupItemAction_proto_goTypes = nil
|
||||
file_BackupItemAction_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc-gen-go v1.36.11-devel
|
||||
// protoc v4.25.2
|
||||
// source: DeleteItemAction.proto
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -21,22 +22,19 @@ const (
|
||||
)
|
||||
|
||||
type DeleteItemActionExecuteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
|
||||
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
|
||||
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteItemActionExecuteRequest) Reset() {
|
||||
*x = DeleteItemActionExecuteRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_DeleteItemAction_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_DeleteItemAction_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteItemActionExecuteRequest) String() string {
|
||||
@@ -47,7 +45,7 @@ func (*DeleteItemActionExecuteRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteItemActionExecuteRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_DeleteItemAction_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -84,20 +82,17 @@ func (x *DeleteItemActionExecuteRequest) GetBackup() []byte {
|
||||
}
|
||||
|
||||
type DeleteItemActionAppliesToRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteItemActionAppliesToRequest) Reset() {
|
||||
*x = DeleteItemActionAppliesToRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_DeleteItemAction_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_DeleteItemAction_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteItemActionAppliesToRequest) String() string {
|
||||
@@ -108,7 +103,7 @@ func (*DeleteItemActionAppliesToRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteItemActionAppliesToRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_DeleteItemAction_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -131,20 +126,17 @@ func (x *DeleteItemActionAppliesToRequest) GetPlugin() string {
|
||||
}
|
||||
|
||||
type DeleteItemActionAppliesToResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ResourceSelector *ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ResourceSelector *ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteItemActionAppliesToResponse) Reset() {
|
||||
*x = DeleteItemActionAppliesToResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_DeleteItemAction_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_DeleteItemAction_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteItemActionAppliesToResponse) String() string {
|
||||
@@ -155,7 +147,7 @@ func (*DeleteItemActionAppliesToResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteItemActionAppliesToResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_DeleteItemAction_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -179,60 +171,35 @@ func (x *DeleteItemActionAppliesToResponse) GetResourceSelector() *ResourceSelec
|
||||
|
||||
var File_DeleteItemAction_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_DeleteItemAction_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
|
||||
0x74, 0x65, 0x64, 0x1a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x22, 0x64, 0x0a, 0x1e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69,
|
||||
0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69,
|
||||
0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70,
|
||||
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75,
|
||||
0x67, 0x69, 0x6e, 0x22, 0x6c, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52,
|
||||
0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f,
|
||||
0x72, 0x32, 0xc2, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65,
|
||||
0x73, 0x54, 0x6f, 0x12, 0x2b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x2c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70,
|
||||
0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46,
|
||||
0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x67, 0x65, 0x6e, 0x65,
|
||||
0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
|
||||
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61, 0x6e, 0x7a,
|
||||
0x75, 0x2f, 0x76, 0x65, 0x6c, 0x65, 0x72, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75,
|
||||
0x67, 0x69, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_DeleteItemAction_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x16DeleteItemAction.proto\x12\tgenerated\x1a\fShared.proto\"d\n" +
|
||||
"\x1eDeleteItemActionExecuteRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x12\n" +
|
||||
"\x04item\x18\x02 \x01(\fR\x04item\x12\x16\n" +
|
||||
"\x06backup\x18\x03 \x01(\fR\x06backup\":\n" +
|
||||
" DeleteItemActionAppliesToRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\"l\n" +
|
||||
"!DeleteItemActionAppliesToResponse\x12G\n" +
|
||||
"\x10ResourceSelector\x18\x01 \x01(\v2\x1b.generated.ResourceSelectorR\x10ResourceSelector2\xc2\x01\n" +
|
||||
"\x10DeleteItemAction\x12f\n" +
|
||||
"\tAppliesTo\x12+.generated.DeleteItemActionAppliesToRequest\x1a,.generated.DeleteItemActionAppliesToResponse\x12F\n" +
|
||||
"\aExecute\x12).generated.DeleteItemActionExecuteRequest\x1a\x10.generated.EmptyB5Z3github.com/vmware-tanzu/velero/pkg/plugin/generatedb\x06proto3"
|
||||
|
||||
var (
|
||||
file_DeleteItemAction_proto_rawDescOnce sync.Once
|
||||
file_DeleteItemAction_proto_rawDescData = file_DeleteItemAction_proto_rawDesc
|
||||
file_DeleteItemAction_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_DeleteItemAction_proto_rawDescGZIP() []byte {
|
||||
file_DeleteItemAction_proto_rawDescOnce.Do(func() {
|
||||
file_DeleteItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(file_DeleteItemAction_proto_rawDescData)
|
||||
file_DeleteItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_DeleteItemAction_proto_rawDesc), len(file_DeleteItemAction_proto_rawDesc)))
|
||||
})
|
||||
return file_DeleteItemAction_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_DeleteItemAction_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_DeleteItemAction_proto_goTypes = []interface{}{
|
||||
var file_DeleteItemAction_proto_goTypes = []any{
|
||||
(*DeleteItemActionExecuteRequest)(nil), // 0: generated.DeleteItemActionExecuteRequest
|
||||
(*DeleteItemActionAppliesToRequest)(nil), // 1: generated.DeleteItemActionAppliesToRequest
|
||||
(*DeleteItemActionAppliesToResponse)(nil), // 2: generated.DeleteItemActionAppliesToResponse
|
||||
@@ -258,49 +225,11 @@ func file_DeleteItemAction_proto_init() {
|
||||
return
|
||||
}
|
||||
file_Shared_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_DeleteItemAction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteItemActionExecuteRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_DeleteItemAction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteItemActionAppliesToRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_DeleteItemAction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteItemActionAppliesToResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_DeleteItemAction_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_DeleteItemAction_proto_rawDesc), len(file_DeleteItemAction_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
@@ -311,7 +240,6 @@ func file_DeleteItemAction_proto_init() {
|
||||
MessageInfos: file_DeleteItemAction_proto_msgTypes,
|
||||
}.Build()
|
||||
File_DeleteItemAction_proto = out.File
|
||||
file_DeleteItemAction_proto_rawDesc = nil
|
||||
file_DeleteItemAction_proto_goTypes = nil
|
||||
file_DeleteItemAction_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc-gen-go v1.36.11-devel
|
||||
// protoc v4.25.2
|
||||
// source: ObjectStore.proto
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -21,23 +22,20 @@ const (
|
||||
)
|
||||
|
||||
type PutObjectRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PutObjectRequest) Reset() {
|
||||
*x = PutObjectRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PutObjectRequest) String() string {
|
||||
@@ -48,7 +46,7 @@ func (*PutObjectRequest) ProtoMessage() {}
|
||||
|
||||
func (x *PutObjectRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -92,22 +90,19 @@ func (x *PutObjectRequest) GetBody() []byte {
|
||||
}
|
||||
|
||||
type ObjectExistsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ObjectExistsRequest) Reset() {
|
||||
*x = ObjectExistsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ObjectExistsRequest) String() string {
|
||||
@@ -118,7 +113,7 @@ func (*ObjectExistsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ObjectExistsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -155,20 +150,17 @@ func (x *ObjectExistsRequest) GetKey() string {
|
||||
}
|
||||
|
||||
type ObjectExistsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ObjectExistsResponse) Reset() {
|
||||
*x = ObjectExistsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ObjectExistsResponse) String() string {
|
||||
@@ -179,7 +171,7 @@ func (*ObjectExistsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ObjectExistsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -202,22 +194,19 @@ func (x *ObjectExistsResponse) GetExists() bool {
|
||||
}
|
||||
|
||||
type GetObjectRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetObjectRequest) Reset() {
|
||||
*x = GetObjectRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetObjectRequest) String() string {
|
||||
@@ -228,7 +217,7 @@ func (*GetObjectRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetObjectRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -265,20 +254,17 @@ func (x *GetObjectRequest) GetKey() string {
|
||||
}
|
||||
|
||||
type Bytes struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Bytes) Reset() {
|
||||
*x = Bytes{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Bytes) String() string {
|
||||
@@ -289,7 +275,7 @@ func (*Bytes) ProtoMessage() {}
|
||||
|
||||
func (x *Bytes) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -312,23 +298,20 @@ func (x *Bytes) GetData() []byte {
|
||||
}
|
||||
|
||||
type ListCommonPrefixesRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Delimiter string `protobuf:"bytes,3,opt,name=delimiter,proto3" json:"delimiter,omitempty"`
|
||||
Prefix string `protobuf:"bytes,4,opt,name=prefix,proto3" json:"prefix,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Delimiter string `protobuf:"bytes,3,opt,name=delimiter,proto3" json:"delimiter,omitempty"`
|
||||
Prefix string `protobuf:"bytes,4,opt,name=prefix,proto3" json:"prefix,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListCommonPrefixesRequest) Reset() {
|
||||
*x = ListCommonPrefixesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListCommonPrefixesRequest) String() string {
|
||||
@@ -339,7 +322,7 @@ func (*ListCommonPrefixesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListCommonPrefixesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -383,20 +366,17 @@ func (x *ListCommonPrefixesRequest) GetPrefix() string {
|
||||
}
|
||||
|
||||
type ListCommonPrefixesResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Prefixes []string `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Prefixes []string `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListCommonPrefixesResponse) Reset() {
|
||||
*x = ListCommonPrefixesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListCommonPrefixesResponse) String() string {
|
||||
@@ -407,7 +387,7 @@ func (*ListCommonPrefixesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListCommonPrefixesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -430,22 +410,19 @@ func (x *ListCommonPrefixesResponse) GetPrefixes() []string {
|
||||
}
|
||||
|
||||
type ListObjectsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListObjectsRequest) Reset() {
|
||||
*x = ListObjectsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListObjectsRequest) String() string {
|
||||
@@ -456,7 +433,7 @@ func (*ListObjectsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListObjectsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -493,20 +470,17 @@ func (x *ListObjectsRequest) GetPrefix() string {
|
||||
}
|
||||
|
||||
type ListObjectsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListObjectsResponse) Reset() {
|
||||
*x = ListObjectsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListObjectsResponse) String() string {
|
||||
@@ -517,7 +491,7 @@ func (*ListObjectsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListObjectsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -540,22 +514,19 @@ func (x *ListObjectsResponse) GetKeys() []string {
|
||||
}
|
||||
|
||||
type DeleteObjectRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteObjectRequest) Reset() {
|
||||
*x = DeleteObjectRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteObjectRequest) String() string {
|
||||
@@ -566,7 +537,7 @@ func (*DeleteObjectRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteObjectRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -603,23 +574,20 @@ func (x *DeleteObjectRequest) GetKey() string {
|
||||
}
|
||||
|
||||
type CreateSignedURLRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Ttl int64 `protobuf:"varint,4,opt,name=ttl,proto3" json:"ttl,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Ttl int64 `protobuf:"varint,4,opt,name=ttl,proto3" json:"ttl,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateSignedURLRequest) Reset() {
|
||||
*x = CreateSignedURLRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateSignedURLRequest) String() string {
|
||||
@@ -630,7 +598,7 @@ func (*CreateSignedURLRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateSignedURLRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -674,20 +642,17 @@ func (x *CreateSignedURLRequest) GetTtl() int64 {
|
||||
}
|
||||
|
||||
type CreateSignedURLResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateSignedURLResponse) Reset() {
|
||||
*x = CreateSignedURLResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateSignedURLResponse) String() string {
|
||||
@@ -698,7 +663,7 @@ func (*CreateSignedURLResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateSignedURLResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -721,21 +686,18 @@ func (x *CreateSignedURLResponse) GetUrl() string {
|
||||
}
|
||||
|
||||
type ObjectStoreInitRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Config map[string]string `protobuf:"bytes,2,rep,name=config,proto3" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Config map[string]string `protobuf:"bytes,2,rep,name=config,proto3" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ObjectStoreInitRequest) Reset() {
|
||||
*x = ObjectStoreInitRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ObjectStore_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_ObjectStore_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ObjectStoreInitRequest) String() string {
|
||||
@@ -746,7 +708,7 @@ func (*ObjectStoreInitRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ObjectStoreInitRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ObjectStore_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -777,138 +739,80 @@ func (x *ObjectStoreInitRequest) GetConfig() map[string]string {
|
||||
|
||||
var File_ObjectStore_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_ObjectStore_proto_rawDesc = []byte{
|
||||
0x0a, 0x11, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x1a, 0x0c,
|
||||
0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x68, 0x0a, 0x10,
|
||||
0x50, 0x75, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x57, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||
0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70,
|
||||
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22,
|
||||
0x2e, 0x0a, 0x14, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74,
|
||||
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22,
|
||||
0x54, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x62,
|
||||
0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x63,
|
||||
0x6b, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x1b, 0x0a, 0x05, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x22, 0x81, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x6e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||
0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x38, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73,
|
||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73,
|
||||
0x22, 0x5c, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||
0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x29,
|
||||
0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x57, 0x0a, 0x13, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x22, 0x6c, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e,
|
||||
0x65, 0x64, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c,
|
||||
0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x74, 0x74, 0x6c,
|
||||
0x22, 0x2b, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64,
|
||||
0x55, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75,
|
||||
0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xb2, 0x01,
|
||||
0x0a, 0x16, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x69,
|
||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67,
|
||||
0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
|
||||
0x12, 0x45, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x2d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x6a,
|
||||
0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
|
||||
0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
|
||||
0x38, 0x01, 0x32, 0xe4, 0x04, 0x0a, 0x0b, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f,
|
||||
0x72, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e,
|
||||
0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f,
|
||||
0x72, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e,
|
||||
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12,
|
||||
0x3c, 0x0a, 0x09, 0x50, 0x75, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1b, 0x2e, 0x67,
|
||||
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x50, 0x75, 0x74, 0x4f, 0x62, 0x6a, 0x65,
|
||||
0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x67, 0x65, 0x6e, 0x65,
|
||||
0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x28, 0x01, 0x12, 0x4f, 0x0a,
|
||||
0x0c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1e, 0x2e,
|
||||
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||
0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e,
|
||||
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||
0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c,
|
||||
0x0a, 0x09, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1b, 0x2e, 0x67, 0x65,
|
||||
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63,
|
||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
|
||||
0x61, 0x74, 0x65, 0x64, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x12,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78,
|
||||
0x65, 0x73, 0x12, 0x24, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
|
||||
0x61, 0x74, 0x65, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50,
|
||||
0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x4c, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1d,
|
||||
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f,
|
||||
0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e,
|
||||
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62,
|
||||
0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a,
|
||||
0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x2e,
|
||||
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e,
|
||||
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12,
|
||||
0x58, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55,
|
||||
0x52, 0x4c, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x52, 0x4c, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
|
||||
0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x52,
|
||||
0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74,
|
||||
0x61, 0x6e, 0x7a, 0x75, 0x2f, 0x76, 0x65, 0x6c, 0x65, 0x72, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f,
|
||||
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_ObjectStore_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x11ObjectStore.proto\x12\tgenerated\x1a\fShared.proto\"h\n" +
|
||||
"\x10PutObjectRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x16\n" +
|
||||
"\x06bucket\x18\x02 \x01(\tR\x06bucket\x12\x10\n" +
|
||||
"\x03key\x18\x03 \x01(\tR\x03key\x12\x12\n" +
|
||||
"\x04body\x18\x04 \x01(\fR\x04body\"W\n" +
|
||||
"\x13ObjectExistsRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x16\n" +
|
||||
"\x06bucket\x18\x02 \x01(\tR\x06bucket\x12\x10\n" +
|
||||
"\x03key\x18\x03 \x01(\tR\x03key\".\n" +
|
||||
"\x14ObjectExistsResponse\x12\x16\n" +
|
||||
"\x06exists\x18\x01 \x01(\bR\x06exists\"T\n" +
|
||||
"\x10GetObjectRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x16\n" +
|
||||
"\x06bucket\x18\x02 \x01(\tR\x06bucket\x12\x10\n" +
|
||||
"\x03key\x18\x03 \x01(\tR\x03key\"\x1b\n" +
|
||||
"\x05Bytes\x12\x12\n" +
|
||||
"\x04data\x18\x01 \x01(\fR\x04data\"\x81\x01\n" +
|
||||
"\x19ListCommonPrefixesRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x16\n" +
|
||||
"\x06bucket\x18\x02 \x01(\tR\x06bucket\x12\x1c\n" +
|
||||
"\tdelimiter\x18\x03 \x01(\tR\tdelimiter\x12\x16\n" +
|
||||
"\x06prefix\x18\x04 \x01(\tR\x06prefix\"8\n" +
|
||||
"\x1aListCommonPrefixesResponse\x12\x1a\n" +
|
||||
"\bprefixes\x18\x01 \x03(\tR\bprefixes\"\\\n" +
|
||||
"\x12ListObjectsRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x16\n" +
|
||||
"\x06bucket\x18\x02 \x01(\tR\x06bucket\x12\x16\n" +
|
||||
"\x06prefix\x18\x03 \x01(\tR\x06prefix\")\n" +
|
||||
"\x13ListObjectsResponse\x12\x12\n" +
|
||||
"\x04keys\x18\x01 \x03(\tR\x04keys\"W\n" +
|
||||
"\x13DeleteObjectRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x16\n" +
|
||||
"\x06bucket\x18\x02 \x01(\tR\x06bucket\x12\x10\n" +
|
||||
"\x03key\x18\x03 \x01(\tR\x03key\"l\n" +
|
||||
"\x16CreateSignedURLRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x16\n" +
|
||||
"\x06bucket\x18\x02 \x01(\tR\x06bucket\x12\x10\n" +
|
||||
"\x03key\x18\x03 \x01(\tR\x03key\x12\x10\n" +
|
||||
"\x03ttl\x18\x04 \x01(\x03R\x03ttl\"+\n" +
|
||||
"\x17CreateSignedURLResponse\x12\x10\n" +
|
||||
"\x03url\x18\x01 \x01(\tR\x03url\"\xb2\x01\n" +
|
||||
"\x16ObjectStoreInitRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12E\n" +
|
||||
"\x06config\x18\x02 \x03(\v2-.generated.ObjectStoreInitRequest.ConfigEntryR\x06config\x1a9\n" +
|
||||
"\vConfigEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\xe4\x04\n" +
|
||||
"\vObjectStore\x12;\n" +
|
||||
"\x04Init\x12!.generated.ObjectStoreInitRequest\x1a\x10.generated.Empty\x12<\n" +
|
||||
"\tPutObject\x12\x1b.generated.PutObjectRequest\x1a\x10.generated.Empty(\x01\x12O\n" +
|
||||
"\fObjectExists\x12\x1e.generated.ObjectExistsRequest\x1a\x1f.generated.ObjectExistsResponse\x12<\n" +
|
||||
"\tGetObject\x12\x1b.generated.GetObjectRequest\x1a\x10.generated.Bytes0\x01\x12a\n" +
|
||||
"\x12ListCommonPrefixes\x12$.generated.ListCommonPrefixesRequest\x1a%.generated.ListCommonPrefixesResponse\x12L\n" +
|
||||
"\vListObjects\x12\x1d.generated.ListObjectsRequest\x1a\x1e.generated.ListObjectsResponse\x12@\n" +
|
||||
"\fDeleteObject\x12\x1e.generated.DeleteObjectRequest\x1a\x10.generated.Empty\x12X\n" +
|
||||
"\x0fCreateSignedURL\x12!.generated.CreateSignedURLRequest\x1a\".generated.CreateSignedURLResponseB5Z3github.com/vmware-tanzu/velero/pkg/plugin/generatedb\x06proto3"
|
||||
|
||||
var (
|
||||
file_ObjectStore_proto_rawDescOnce sync.Once
|
||||
file_ObjectStore_proto_rawDescData = file_ObjectStore_proto_rawDesc
|
||||
file_ObjectStore_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_ObjectStore_proto_rawDescGZIP() []byte {
|
||||
file_ObjectStore_proto_rawDescOnce.Do(func() {
|
||||
file_ObjectStore_proto_rawDescData = protoimpl.X.CompressGZIP(file_ObjectStore_proto_rawDescData)
|
||||
file_ObjectStore_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ObjectStore_proto_rawDesc), len(file_ObjectStore_proto_rawDesc)))
|
||||
})
|
||||
return file_ObjectStore_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ObjectStore_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_ObjectStore_proto_goTypes = []interface{}{
|
||||
var file_ObjectStore_proto_goTypes = []any{
|
||||
(*PutObjectRequest)(nil), // 0: generated.PutObjectRequest
|
||||
(*ObjectExistsRequest)(nil), // 1: generated.ObjectExistsRequest
|
||||
(*ObjectExistsResponse)(nil), // 2: generated.ObjectExistsResponse
|
||||
@@ -956,169 +860,11 @@ func file_ObjectStore_proto_init() {
|
||||
return
|
||||
}
|
||||
file_Shared_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_ObjectStore_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PutObjectRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ObjectStore_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ObjectExistsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ObjectStore_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ObjectExistsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ObjectStore_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetObjectRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ObjectStore_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Bytes); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ObjectStore_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListCommonPrefixesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ObjectStore_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListCommonPrefixesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ObjectStore_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListObjectsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ObjectStore_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListObjectsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ObjectStore_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteObjectRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ObjectStore_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateSignedURLRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ObjectStore_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateSignedURLResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ObjectStore_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ObjectStoreInitRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_ObjectStore_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ObjectStore_proto_rawDesc), len(file_ObjectStore_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 14,
|
||||
NumExtensions: 0,
|
||||
@@ -1129,7 +875,6 @@ func file_ObjectStore_proto_init() {
|
||||
MessageInfos: file_ObjectStore_proto_msgTypes,
|
||||
}.Build()
|
||||
File_ObjectStore_proto = out.File
|
||||
file_ObjectStore_proto_rawDesc = nil
|
||||
file_ObjectStore_proto_goTypes = nil
|
||||
file_ObjectStore_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc-gen-go v1.36.11-devel
|
||||
// protoc v4.25.2
|
||||
// source: PluginLister.proto
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -21,22 +22,19 @@ const (
|
||||
)
|
||||
|
||||
type PluginIdentifier struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
|
||||
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
|
||||
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PluginIdentifier) Reset() {
|
||||
*x = PluginIdentifier{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_PluginLister_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_PluginLister_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PluginIdentifier) String() string {
|
||||
@@ -47,7 +45,7 @@ func (*PluginIdentifier) ProtoMessage() {}
|
||||
|
||||
func (x *PluginIdentifier) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_PluginLister_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -84,20 +82,17 @@ func (x *PluginIdentifier) GetName() string {
|
||||
}
|
||||
|
||||
type ListPluginsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugins []*PluginIdentifier `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugins []*PluginIdentifier `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListPluginsResponse) Reset() {
|
||||
*x = ListPluginsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_PluginLister_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_PluginLister_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListPluginsResponse) String() string {
|
||||
@@ -108,7 +103,7 @@ func (*ListPluginsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListPluginsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_PluginLister_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -132,46 +127,32 @@ func (x *ListPluginsResponse) GetPlugins() []*PluginIdentifier {
|
||||
|
||||
var File_PluginLister_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_PluginLister_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x1a,
|
||||
0x0c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x54, 0x0a,
|
||||
0x10, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,
|
||||
0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6b,
|
||||
0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69,
|
||||
0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x70, 0x6c,
|
||||
0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x65,
|
||||
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64,
|
||||
0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
|
||||
0x73, 0x32, 0x4f, 0x0a, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x65,
|
||||
0x72, 0x12, 0x3f, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73,
|
||||
0x12, 0x10, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61, 0x6e, 0x7a, 0x75, 0x2f, 0x76, 0x65,
|
||||
0x6c, 0x65, 0x72, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f,
|
||||
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
const file_PluginLister_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x12PluginLister.proto\x12\tgenerated\x1a\fShared.proto\"T\n" +
|
||||
"\x10PluginIdentifier\x12\x18\n" +
|
||||
"\acommand\x18\x01 \x01(\tR\acommand\x12\x12\n" +
|
||||
"\x04kind\x18\x02 \x01(\tR\x04kind\x12\x12\n" +
|
||||
"\x04name\x18\x03 \x01(\tR\x04name\"L\n" +
|
||||
"\x13ListPluginsResponse\x125\n" +
|
||||
"\aplugins\x18\x01 \x03(\v2\x1b.generated.PluginIdentifierR\aplugins2O\n" +
|
||||
"\fPluginLister\x12?\n" +
|
||||
"\vListPlugins\x12\x10.generated.Empty\x1a\x1e.generated.ListPluginsResponseB5Z3github.com/vmware-tanzu/velero/pkg/plugin/generatedb\x06proto3"
|
||||
|
||||
var (
|
||||
file_PluginLister_proto_rawDescOnce sync.Once
|
||||
file_PluginLister_proto_rawDescData = file_PluginLister_proto_rawDesc
|
||||
file_PluginLister_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_PluginLister_proto_rawDescGZIP() []byte {
|
||||
file_PluginLister_proto_rawDescOnce.Do(func() {
|
||||
file_PluginLister_proto_rawDescData = protoimpl.X.CompressGZIP(file_PluginLister_proto_rawDescData)
|
||||
file_PluginLister_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PluginLister_proto_rawDesc), len(file_PluginLister_proto_rawDesc)))
|
||||
})
|
||||
return file_PluginLister_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_PluginLister_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_PluginLister_proto_goTypes = []interface{}{
|
||||
var file_PluginLister_proto_goTypes = []any{
|
||||
(*PluginIdentifier)(nil), // 0: generated.PluginIdentifier
|
||||
(*ListPluginsResponse)(nil), // 1: generated.ListPluginsResponse
|
||||
(*Empty)(nil), // 2: generated.Empty
|
||||
@@ -193,37 +174,11 @@ func file_PluginLister_proto_init() {
|
||||
return
|
||||
}
|
||||
file_Shared_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_PluginLister_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PluginIdentifier); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_PluginLister_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListPluginsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_PluginLister_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_PluginLister_proto_rawDesc), len(file_PluginLister_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
@@ -234,7 +189,6 @@ func file_PluginLister_proto_init() {
|
||||
MessageInfos: file_PluginLister_proto_msgTypes,
|
||||
}.Build()
|
||||
File_PluginLister_proto = out.File
|
||||
file_PluginLister_proto_rawDesc = nil
|
||||
file_PluginLister_proto_goTypes = nil
|
||||
file_PluginLister_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc-gen-go v1.36.11-devel
|
||||
// protoc v4.25.2
|
||||
// source: RestoreItemAction.proto
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -21,23 +22,20 @@ const (
|
||||
)
|
||||
|
||||
type RestoreItemActionExecuteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
|
||||
Restore []byte `protobuf:"bytes,3,opt,name=restore,proto3" json:"restore,omitempty"`
|
||||
ItemFromBackup []byte `protobuf:"bytes,4,opt,name=itemFromBackup,proto3" json:"itemFromBackup,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
|
||||
Restore []byte `protobuf:"bytes,3,opt,name=restore,proto3" json:"restore,omitempty"`
|
||||
ItemFromBackup []byte `protobuf:"bytes,4,opt,name=itemFromBackup,proto3" json:"itemFromBackup,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionExecuteRequest) Reset() {
|
||||
*x = RestoreItemActionExecuteRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_RestoreItemAction_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_RestoreItemAction_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionExecuteRequest) String() string {
|
||||
@@ -48,7 +46,7 @@ func (*RestoreItemActionExecuteRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionExecuteRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_RestoreItemAction_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -92,22 +90,19 @@ func (x *RestoreItemActionExecuteRequest) GetItemFromBackup() []byte {
|
||||
}
|
||||
|
||||
type RestoreItemActionExecuteResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Item []byte `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
|
||||
AdditionalItems []*ResourceIdentifier `protobuf:"bytes,2,rep,name=additionalItems,proto3" json:"additionalItems,omitempty"`
|
||||
SkipRestore bool `protobuf:"varint,3,opt,name=skipRestore,proto3" json:"skipRestore,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Item []byte `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
|
||||
AdditionalItems []*ResourceIdentifier `protobuf:"bytes,2,rep,name=additionalItems,proto3" json:"additionalItems,omitempty"`
|
||||
SkipRestore bool `protobuf:"varint,3,opt,name=skipRestore,proto3" json:"skipRestore,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionExecuteResponse) Reset() {
|
||||
*x = RestoreItemActionExecuteResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_RestoreItemAction_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_RestoreItemAction_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionExecuteResponse) String() string {
|
||||
@@ -118,7 +113,7 @@ func (*RestoreItemActionExecuteResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionExecuteResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_RestoreItemAction_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -155,20 +150,17 @@ func (x *RestoreItemActionExecuteResponse) GetSkipRestore() bool {
|
||||
}
|
||||
|
||||
type RestoreItemActionAppliesToRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionAppliesToRequest) Reset() {
|
||||
*x = RestoreItemActionAppliesToRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_RestoreItemAction_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_RestoreItemAction_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionAppliesToRequest) String() string {
|
||||
@@ -179,7 +171,7 @@ func (*RestoreItemActionAppliesToRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionAppliesToRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_RestoreItemAction_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -202,20 +194,17 @@ func (x *RestoreItemActionAppliesToRequest) GetPlugin() string {
|
||||
}
|
||||
|
||||
type RestoreItemActionAppliesToResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ResourceSelector *ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ResourceSelector *ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionAppliesToResponse) Reset() {
|
||||
*x = RestoreItemActionAppliesToResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_RestoreItemAction_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_RestoreItemAction_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionAppliesToResponse) String() string {
|
||||
@@ -226,7 +215,7 @@ func (*RestoreItemActionAppliesToResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionAppliesToResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_RestoreItemAction_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -250,75 +239,40 @@ func (x *RestoreItemActionAppliesToResponse) GetResourceSelector() *ResourceSele
|
||||
|
||||
var File_RestoreItemAction_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_RestoreItemAction_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72,
|
||||
0x61, 0x74, 0x65, 0x64, 0x1a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x22, 0x8f, 0x01, 0x0a, 0x1f, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74,
|
||||
0x65, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x69, 0x74, 0x65, 0x6d, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61,
|
||||
0x63, 0x6b, 0x75, 0x70, 0x22, 0xa1, 0x01, 0x0a, 0x20, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65,
|
||||
0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x47, 0x0a,
|
||||
0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
|
||||
0x65, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74,
|
||||
0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61,
|
||||
0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x52, 0x65,
|
||||
0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6b, 0x69,
|
||||
0x70, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x3b, 0x0a, 0x21, 0x52, 0x65, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70,
|
||||
0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70,
|
||||
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22, 0x6d, 0x0a, 0x22, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65,
|
||||
0x73, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
|
||||
0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74,
|
||||
0x6f, 0x72, 0x52, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65,
|
||||
0x63, 0x74, 0x6f, 0x72, 0x32, 0xe1, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x09, 0x41, 0x70,
|
||||
0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x12, 0x2c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
|
||||
0x74, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
|
||||
0x64, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12,
|
||||
0x2a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65,
|
||||
0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x65,
|
||||
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61,
|
||||
0x6e, 0x7a, 0x75, 0x2f, 0x76, 0x65, 0x6c, 0x65, 0x72, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70,
|
||||
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_RestoreItemAction_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x17RestoreItemAction.proto\x12\tgenerated\x1a\fShared.proto\"\x8f\x01\n" +
|
||||
"\x1fRestoreItemActionExecuteRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x12\n" +
|
||||
"\x04item\x18\x02 \x01(\fR\x04item\x12\x18\n" +
|
||||
"\arestore\x18\x03 \x01(\fR\arestore\x12&\n" +
|
||||
"\x0eitemFromBackup\x18\x04 \x01(\fR\x0eitemFromBackup\"\xa1\x01\n" +
|
||||
" RestoreItemActionExecuteResponse\x12\x12\n" +
|
||||
"\x04item\x18\x01 \x01(\fR\x04item\x12G\n" +
|
||||
"\x0fadditionalItems\x18\x02 \x03(\v2\x1d.generated.ResourceIdentifierR\x0fadditionalItems\x12 \n" +
|
||||
"\vskipRestore\x18\x03 \x01(\bR\vskipRestore\";\n" +
|
||||
"!RestoreItemActionAppliesToRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\"m\n" +
|
||||
"\"RestoreItemActionAppliesToResponse\x12G\n" +
|
||||
"\x10ResourceSelector\x18\x01 \x01(\v2\x1b.generated.ResourceSelectorR\x10ResourceSelector2\xe1\x01\n" +
|
||||
"\x11RestoreItemAction\x12h\n" +
|
||||
"\tAppliesTo\x12,.generated.RestoreItemActionAppliesToRequest\x1a-.generated.RestoreItemActionAppliesToResponse\x12b\n" +
|
||||
"\aExecute\x12*.generated.RestoreItemActionExecuteRequest\x1a+.generated.RestoreItemActionExecuteResponseB5Z3github.com/vmware-tanzu/velero/pkg/plugin/generatedb\x06proto3"
|
||||
|
||||
var (
|
||||
file_RestoreItemAction_proto_rawDescOnce sync.Once
|
||||
file_RestoreItemAction_proto_rawDescData = file_RestoreItemAction_proto_rawDesc
|
||||
file_RestoreItemAction_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_RestoreItemAction_proto_rawDescGZIP() []byte {
|
||||
file_RestoreItemAction_proto_rawDescOnce.Do(func() {
|
||||
file_RestoreItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(file_RestoreItemAction_proto_rawDescData)
|
||||
file_RestoreItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_RestoreItemAction_proto_rawDesc), len(file_RestoreItemAction_proto_rawDesc)))
|
||||
})
|
||||
return file_RestoreItemAction_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_RestoreItemAction_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_RestoreItemAction_proto_goTypes = []interface{}{
|
||||
var file_RestoreItemAction_proto_goTypes = []any{
|
||||
(*RestoreItemActionExecuteRequest)(nil), // 0: generated.RestoreItemActionExecuteRequest
|
||||
(*RestoreItemActionExecuteResponse)(nil), // 1: generated.RestoreItemActionExecuteResponse
|
||||
(*RestoreItemActionAppliesToRequest)(nil), // 2: generated.RestoreItemActionAppliesToRequest
|
||||
@@ -346,61 +300,11 @@ func file_RestoreItemAction_proto_init() {
|
||||
return
|
||||
}
|
||||
file_Shared_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_RestoreItemAction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionExecuteRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_RestoreItemAction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionExecuteResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_RestoreItemAction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionAppliesToRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_RestoreItemAction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionAppliesToResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_RestoreItemAction_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_RestoreItemAction_proto_rawDesc), len(file_RestoreItemAction_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
@@ -411,7 +315,6 @@ func file_RestoreItemAction_proto_init() {
|
||||
MessageInfos: file_RestoreItemAction_proto_msgTypes,
|
||||
}.Build()
|
||||
File_RestoreItemAction_proto = out.File
|
||||
file_RestoreItemAction_proto_rawDesc = nil
|
||||
file_RestoreItemAction_proto_goTypes = nil
|
||||
file_RestoreItemAction_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc-gen-go v1.36.11-devel
|
||||
// protoc v4.25.2
|
||||
// source: Shared.proto
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -22,18 +23,16 @@ const (
|
||||
)
|
||||
|
||||
type Empty struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Empty) Reset() {
|
||||
*x = Empty{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_Shared_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_Shared_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Empty) String() string {
|
||||
@@ -44,7 +43,7 @@ func (*Empty) ProtoMessage() {}
|
||||
|
||||
func (x *Empty) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_Shared_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -60,20 +59,17 @@ func (*Empty) Descriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
type Stack struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Frames []*StackFrame `protobuf:"bytes,1,rep,name=frames,proto3" json:"frames,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Frames []*StackFrame `protobuf:"bytes,1,rep,name=frames,proto3" json:"frames,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Stack) Reset() {
|
||||
*x = Stack{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_Shared_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_Shared_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Stack) String() string {
|
||||
@@ -84,7 +80,7 @@ func (*Stack) ProtoMessage() {}
|
||||
|
||||
func (x *Stack) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_Shared_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -107,22 +103,19 @@ func (x *Stack) GetFrames() []*StackFrame {
|
||||
}
|
||||
|
||||
type StackFrame struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
|
||||
Line int32 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"`
|
||||
Function string `protobuf:"bytes,3,opt,name=function,proto3" json:"function,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
|
||||
Line int32 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"`
|
||||
Function string `protobuf:"bytes,3,opt,name=function,proto3" json:"function,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *StackFrame) Reset() {
|
||||
*x = StackFrame{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_Shared_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_Shared_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *StackFrame) String() string {
|
||||
@@ -133,7 +126,7 @@ func (*StackFrame) ProtoMessage() {}
|
||||
|
||||
func (x *StackFrame) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_Shared_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -170,23 +163,20 @@ func (x *StackFrame) GetFunction() string {
|
||||
}
|
||||
|
||||
type ResourceIdentifier struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
|
||||
Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
|
||||
Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
|
||||
Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
|
||||
Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ResourceIdentifier) Reset() {
|
||||
*x = ResourceIdentifier{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_Shared_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_Shared_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ResourceIdentifier) String() string {
|
||||
@@ -197,7 +187,7 @@ func (*ResourceIdentifier) ProtoMessage() {}
|
||||
|
||||
func (x *ResourceIdentifier) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_Shared_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -241,24 +231,21 @@ func (x *ResourceIdentifier) GetName() string {
|
||||
}
|
||||
|
||||
type ResourceSelector struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
IncludedNamespaces []string `protobuf:"bytes,1,rep,name=includedNamespaces,proto3" json:"includedNamespaces,omitempty"`
|
||||
ExcludedNamespaces []string `protobuf:"bytes,2,rep,name=excludedNamespaces,proto3" json:"excludedNamespaces,omitempty"`
|
||||
IncludedResources []string `protobuf:"bytes,3,rep,name=includedResources,proto3" json:"includedResources,omitempty"`
|
||||
ExcludedResources []string `protobuf:"bytes,4,rep,name=excludedResources,proto3" json:"excludedResources,omitempty"`
|
||||
Selector string `protobuf:"bytes,5,opt,name=selector,proto3" json:"selector,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IncludedNamespaces []string `protobuf:"bytes,1,rep,name=includedNamespaces,proto3" json:"includedNamespaces,omitempty"`
|
||||
ExcludedNamespaces []string `protobuf:"bytes,2,rep,name=excludedNamespaces,proto3" json:"excludedNamespaces,omitempty"`
|
||||
IncludedResources []string `protobuf:"bytes,3,rep,name=includedResources,proto3" json:"includedResources,omitempty"`
|
||||
ExcludedResources []string `protobuf:"bytes,4,rep,name=excludedResources,proto3" json:"excludedResources,omitempty"`
|
||||
Selector string `protobuf:"bytes,5,opt,name=selector,proto3" json:"selector,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ResourceSelector) Reset() {
|
||||
*x = ResourceSelector{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_Shared_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_Shared_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ResourceSelector) String() string {
|
||||
@@ -269,7 +256,7 @@ func (*ResourceSelector) ProtoMessage() {}
|
||||
|
||||
func (x *ResourceSelector) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_Shared_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -320,10 +307,7 @@ func (x *ResourceSelector) GetSelector() string {
|
||||
}
|
||||
|
||||
type OperationProgress struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Completed bool `protobuf:"varint,1,opt,name=completed,proto3" json:"completed,omitempty"`
|
||||
Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
|
||||
NCompleted int64 `protobuf:"varint,3,opt,name=nCompleted,proto3" json:"nCompleted,omitempty"`
|
||||
@@ -332,15 +316,15 @@ type OperationProgress struct {
|
||||
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Started *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=started,proto3" json:"started,omitempty"`
|
||||
Updated *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated,proto3" json:"updated,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *OperationProgress) Reset() {
|
||||
*x = OperationProgress{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_Shared_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_Shared_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *OperationProgress) String() string {
|
||||
@@ -351,7 +335,7 @@ func (*OperationProgress) ProtoMessage() {}
|
||||
|
||||
func (x *OperationProgress) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_Shared_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -424,82 +408,54 @@ func (x *OperationProgress) GetUpdated() *timestamppb.Timestamp {
|
||||
|
||||
var File_Shared_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_Shared_proto_rawDesc = []byte{
|
||||
0x0a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09,
|
||||
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73,
|
||||
0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d,
|
||||
0x70, 0x74, 0x79, 0x22, 0x36, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x2d, 0x0a, 0x06,
|
||||
0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67,
|
||||
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72,
|
||||
0x61, 0x6d, 0x65, 0x52, 0x06, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x50, 0x0a, 0x0a, 0x53,
|
||||
0x74, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x69, 0x6e,
|
||||
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x0a,
|
||||
0x12, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66,
|
||||
0x69, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xea, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x12,
|
||||
0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64,
|
||||
0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x12,
|
||||
0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64,
|
||||
0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11,
|
||||
0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65,
|
||||
0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x65, 0x78,
|
||||
0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18,
|
||||
0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65,
|
||||
0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65,
|
||||
0x63, 0x74, 0x6f, 0x72, 0x22, 0xb1, 0x02, 0x0a, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f,
|
||||
0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63,
|
||||
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x43,
|
||||
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
|
||||
0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x54,
|
||||
0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x54, 0x6f, 0x74,
|
||||
0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55,
|
||||
0x6e, 0x69, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
|
||||
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x07,
|
||||
0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74,
|
||||
0x65, 0x64, 0x12, 0x34, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
|
||||
0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61,
|
||||
0x6e, 0x7a, 0x75, 0x2f, 0x76, 0x65, 0x6c, 0x65, 0x72, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70,
|
||||
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_Shared_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\fShared.proto\x12\tgenerated\x1a\x1fgoogle/protobuf/timestamp.proto\"\a\n" +
|
||||
"\x05Empty\"6\n" +
|
||||
"\x05Stack\x12-\n" +
|
||||
"\x06frames\x18\x01 \x03(\v2\x15.generated.StackFrameR\x06frames\"P\n" +
|
||||
"\n" +
|
||||
"StackFrame\x12\x12\n" +
|
||||
"\x04file\x18\x01 \x01(\tR\x04file\x12\x12\n" +
|
||||
"\x04line\x18\x02 \x01(\x05R\x04line\x12\x1a\n" +
|
||||
"\bfunction\x18\x03 \x01(\tR\bfunction\"x\n" +
|
||||
"\x12ResourceIdentifier\x12\x14\n" +
|
||||
"\x05group\x18\x01 \x01(\tR\x05group\x12\x1a\n" +
|
||||
"\bresource\x18\x02 \x01(\tR\bresource\x12\x1c\n" +
|
||||
"\tnamespace\x18\x03 \x01(\tR\tnamespace\x12\x12\n" +
|
||||
"\x04name\x18\x04 \x01(\tR\x04name\"\xea\x01\n" +
|
||||
"\x10ResourceSelector\x12.\n" +
|
||||
"\x12includedNamespaces\x18\x01 \x03(\tR\x12includedNamespaces\x12.\n" +
|
||||
"\x12excludedNamespaces\x18\x02 \x03(\tR\x12excludedNamespaces\x12,\n" +
|
||||
"\x11includedResources\x18\x03 \x03(\tR\x11includedResources\x12,\n" +
|
||||
"\x11excludedResources\x18\x04 \x03(\tR\x11excludedResources\x12\x1a\n" +
|
||||
"\bselector\x18\x05 \x01(\tR\bselector\"\xb1\x02\n" +
|
||||
"\x11OperationProgress\x12\x1c\n" +
|
||||
"\tcompleted\x18\x01 \x01(\bR\tcompleted\x12\x10\n" +
|
||||
"\x03err\x18\x02 \x01(\tR\x03err\x12\x1e\n" +
|
||||
"\n" +
|
||||
"nCompleted\x18\x03 \x01(\x03R\n" +
|
||||
"nCompleted\x12\x16\n" +
|
||||
"\x06nTotal\x18\x04 \x01(\x03R\x06nTotal\x12&\n" +
|
||||
"\x0eoperationUnits\x18\x05 \x01(\tR\x0eoperationUnits\x12 \n" +
|
||||
"\vdescription\x18\x06 \x01(\tR\vdescription\x124\n" +
|
||||
"\astarted\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\astarted\x124\n" +
|
||||
"\aupdated\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\aupdatedB5Z3github.com/vmware-tanzu/velero/pkg/plugin/generatedb\x06proto3"
|
||||
|
||||
var (
|
||||
file_Shared_proto_rawDescOnce sync.Once
|
||||
file_Shared_proto_rawDescData = file_Shared_proto_rawDesc
|
||||
file_Shared_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_Shared_proto_rawDescGZIP() []byte {
|
||||
file_Shared_proto_rawDescOnce.Do(func() {
|
||||
file_Shared_proto_rawDescData = protoimpl.X.CompressGZIP(file_Shared_proto_rawDescData)
|
||||
file_Shared_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Shared_proto_rawDesc), len(file_Shared_proto_rawDesc)))
|
||||
})
|
||||
return file_Shared_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_Shared_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_Shared_proto_goTypes = []interface{}{
|
||||
var file_Shared_proto_goTypes = []any{
|
||||
(*Empty)(nil), // 0: generated.Empty
|
||||
(*Stack)(nil), // 1: generated.Stack
|
||||
(*StackFrame)(nil), // 2: generated.StackFrame
|
||||
@@ -524,85 +480,11 @@ func file_Shared_proto_init() {
|
||||
if File_Shared_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_Shared_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Empty); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_Shared_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Stack); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_Shared_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StackFrame); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_Shared_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ResourceIdentifier); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_Shared_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ResourceSelector); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_Shared_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*OperationProgress); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_Shared_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_Shared_proto_rawDesc), len(file_Shared_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
@@ -613,7 +495,6 @@ func file_Shared_proto_init() {
|
||||
MessageInfos: file_Shared_proto_msgTypes,
|
||||
}.Build()
|
||||
File_Shared_proto = out.File
|
||||
file_Shared_proto_rawDesc = nil
|
||||
file_Shared_proto_goTypes = nil
|
||||
file_Shared_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc-gen-go v1.36.11-devel
|
||||
// protoc v4.25.2
|
||||
// source: VolumeSnapshotter.proto
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -21,24 +22,21 @@ const (
|
||||
)
|
||||
|
||||
type CreateVolumeRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
SnapshotID string `protobuf:"bytes,2,opt,name=snapshotID,proto3" json:"snapshotID,omitempty"`
|
||||
VolumeType string `protobuf:"bytes,3,opt,name=volumeType,proto3" json:"volumeType,omitempty"`
|
||||
VolumeAZ string `protobuf:"bytes,4,opt,name=volumeAZ,proto3" json:"volumeAZ,omitempty"`
|
||||
Iops int64 `protobuf:"varint,5,opt,name=iops,proto3" json:"iops,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
SnapshotID string `protobuf:"bytes,2,opt,name=snapshotID,proto3" json:"snapshotID,omitempty"`
|
||||
VolumeType string `protobuf:"bytes,3,opt,name=volumeType,proto3" json:"volumeType,omitempty"`
|
||||
VolumeAZ string `protobuf:"bytes,4,opt,name=volumeAZ,proto3" json:"volumeAZ,omitempty"`
|
||||
Iops int64 `protobuf:"varint,5,opt,name=iops,proto3" json:"iops,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateVolumeRequest) Reset() {
|
||||
*x = CreateVolumeRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateVolumeRequest) String() string {
|
||||
@@ -49,7 +47,7 @@ func (*CreateVolumeRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateVolumeRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -100,20 +98,17 @@ func (x *CreateVolumeRequest) GetIops() int64 {
|
||||
}
|
||||
|
||||
type CreateVolumeResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
VolumeID string `protobuf:"bytes,1,opt,name=volumeID,proto3" json:"volumeID,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
VolumeID string `protobuf:"bytes,1,opt,name=volumeID,proto3" json:"volumeID,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateVolumeResponse) Reset() {
|
||||
*x = CreateVolumeResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateVolumeResponse) String() string {
|
||||
@@ -124,7 +119,7 @@ func (*CreateVolumeResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateVolumeResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -147,22 +142,19 @@ func (x *CreateVolumeResponse) GetVolumeID() string {
|
||||
}
|
||||
|
||||
type GetVolumeInfoRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
VolumeID string `protobuf:"bytes,2,opt,name=volumeID,proto3" json:"volumeID,omitempty"`
|
||||
VolumeAZ string `protobuf:"bytes,3,opt,name=volumeAZ,proto3" json:"volumeAZ,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
VolumeID string `protobuf:"bytes,2,opt,name=volumeID,proto3" json:"volumeID,omitempty"`
|
||||
VolumeAZ string `protobuf:"bytes,3,opt,name=volumeAZ,proto3" json:"volumeAZ,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetVolumeInfoRequest) Reset() {
|
||||
*x = GetVolumeInfoRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetVolumeInfoRequest) String() string {
|
||||
@@ -173,7 +165,7 @@ func (*GetVolumeInfoRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetVolumeInfoRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -210,21 +202,18 @@ func (x *GetVolumeInfoRequest) GetVolumeAZ() string {
|
||||
}
|
||||
|
||||
type GetVolumeInfoResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
VolumeType string `protobuf:"bytes,1,opt,name=volumeType,proto3" json:"volumeType,omitempty"`
|
||||
Iops int64 `protobuf:"varint,2,opt,name=iops,proto3" json:"iops,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
VolumeType string `protobuf:"bytes,1,opt,name=volumeType,proto3" json:"volumeType,omitempty"`
|
||||
Iops int64 `protobuf:"varint,2,opt,name=iops,proto3" json:"iops,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetVolumeInfoResponse) Reset() {
|
||||
*x = GetVolumeInfoResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetVolumeInfoResponse) String() string {
|
||||
@@ -235,7 +224,7 @@ func (*GetVolumeInfoResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetVolumeInfoResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -265,23 +254,20 @@ func (x *GetVolumeInfoResponse) GetIops() int64 {
|
||||
}
|
||||
|
||||
type CreateSnapshotRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
VolumeID string `protobuf:"bytes,2,opt,name=volumeID,proto3" json:"volumeID,omitempty"`
|
||||
VolumeAZ string `protobuf:"bytes,3,opt,name=volumeAZ,proto3" json:"volumeAZ,omitempty"`
|
||||
Tags map[string]string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
VolumeID string `protobuf:"bytes,2,opt,name=volumeID,proto3" json:"volumeID,omitempty"`
|
||||
VolumeAZ string `protobuf:"bytes,3,opt,name=volumeAZ,proto3" json:"volumeAZ,omitempty"`
|
||||
Tags map[string]string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateSnapshotRequest) Reset() {
|
||||
*x = CreateSnapshotRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateSnapshotRequest) String() string {
|
||||
@@ -292,7 +278,7 @@ func (*CreateSnapshotRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateSnapshotRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -336,20 +322,17 @@ func (x *CreateSnapshotRequest) GetTags() map[string]string {
|
||||
}
|
||||
|
||||
type CreateSnapshotResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SnapshotID string `protobuf:"bytes,1,opt,name=snapshotID,proto3" json:"snapshotID,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SnapshotID string `protobuf:"bytes,1,opt,name=snapshotID,proto3" json:"snapshotID,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateSnapshotResponse) Reset() {
|
||||
*x = CreateSnapshotResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateSnapshotResponse) String() string {
|
||||
@@ -360,7 +343,7 @@ func (*CreateSnapshotResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateSnapshotResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -383,21 +366,18 @@ func (x *CreateSnapshotResponse) GetSnapshotID() string {
|
||||
}
|
||||
|
||||
type DeleteSnapshotRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
SnapshotID string `protobuf:"bytes,2,opt,name=snapshotID,proto3" json:"snapshotID,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
SnapshotID string `protobuf:"bytes,2,opt,name=snapshotID,proto3" json:"snapshotID,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteSnapshotRequest) Reset() {
|
||||
*x = DeleteSnapshotRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteSnapshotRequest) String() string {
|
||||
@@ -408,7 +388,7 @@ func (*DeleteSnapshotRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteSnapshotRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -438,21 +418,18 @@ func (x *DeleteSnapshotRequest) GetSnapshotID() string {
|
||||
}
|
||||
|
||||
type GetVolumeIDRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
PersistentVolume []byte `protobuf:"bytes,2,opt,name=persistentVolume,proto3" json:"persistentVolume,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
PersistentVolume []byte `protobuf:"bytes,2,opt,name=persistentVolume,proto3" json:"persistentVolume,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetVolumeIDRequest) Reset() {
|
||||
*x = GetVolumeIDRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetVolumeIDRequest) String() string {
|
||||
@@ -463,7 +440,7 @@ func (*GetVolumeIDRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetVolumeIDRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -493,20 +470,17 @@ func (x *GetVolumeIDRequest) GetPersistentVolume() []byte {
|
||||
}
|
||||
|
||||
type GetVolumeIDResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
VolumeID string `protobuf:"bytes,1,opt,name=volumeID,proto3" json:"volumeID,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
VolumeID string `protobuf:"bytes,1,opt,name=volumeID,proto3" json:"volumeID,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetVolumeIDResponse) Reset() {
|
||||
*x = GetVolumeIDResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetVolumeIDResponse) String() string {
|
||||
@@ -517,7 +491,7 @@ func (*GetVolumeIDResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetVolumeIDResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -540,22 +514,19 @@ func (x *GetVolumeIDResponse) GetVolumeID() string {
|
||||
}
|
||||
|
||||
type SetVolumeIDRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
PersistentVolume []byte `protobuf:"bytes,2,opt,name=persistentVolume,proto3" json:"persistentVolume,omitempty"`
|
||||
VolumeID string `protobuf:"bytes,3,opt,name=volumeID,proto3" json:"volumeID,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
PersistentVolume []byte `protobuf:"bytes,2,opt,name=persistentVolume,proto3" json:"persistentVolume,omitempty"`
|
||||
VolumeID string `protobuf:"bytes,3,opt,name=volumeID,proto3" json:"volumeID,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetVolumeIDRequest) Reset() {
|
||||
*x = SetVolumeIDRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetVolumeIDRequest) String() string {
|
||||
@@ -566,7 +537,7 @@ func (*SetVolumeIDRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SetVolumeIDRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -603,20 +574,17 @@ func (x *SetVolumeIDRequest) GetVolumeID() string {
|
||||
}
|
||||
|
||||
type SetVolumeIDResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
PersistentVolume []byte `protobuf:"bytes,1,opt,name=persistentVolume,proto3" json:"persistentVolume,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
PersistentVolume []byte `protobuf:"bytes,1,opt,name=persistentVolume,proto3" json:"persistentVolume,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetVolumeIDResponse) Reset() {
|
||||
*x = SetVolumeIDResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetVolumeIDResponse) String() string {
|
||||
@@ -627,7 +595,7 @@ func (*SetVolumeIDResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SetVolumeIDResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -650,21 +618,18 @@ func (x *SetVolumeIDResponse) GetPersistentVolume() []byte {
|
||||
}
|
||||
|
||||
type VolumeSnapshotterInitRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Config map[string]string `protobuf:"bytes,2,rep,name=config,proto3" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Config map[string]string `protobuf:"bytes,2,rep,name=config,proto3" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *VolumeSnapshotterInitRequest) Reset() {
|
||||
*x = VolumeSnapshotterInitRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *VolumeSnapshotterInitRequest) String() string {
|
||||
@@ -675,7 +640,7 @@ func (*VolumeSnapshotterInitRequest) ProtoMessage() {}
|
||||
|
||||
func (x *VolumeSnapshotterInitRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_VolumeSnapshotter_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -706,147 +671,87 @@ func (x *VolumeSnapshotterInitRequest) GetConfig() map[string]string {
|
||||
|
||||
var File_VolumeSnapshotter_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_VolumeSnapshotter_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74,
|
||||
0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72,
|
||||
0x61, 0x74, 0x65, 0x64, 0x1a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x22, 0x9d, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c,
|
||||
0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67,
|
||||
0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x44,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74,
|
||||
0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x54, 0x79,
|
||||
0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x41, 0x5a, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x41, 0x5a, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x69, 0x6f, 0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x69, 0x6f,
|
||||
0x70, 0x73, 0x22, 0x32, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75,
|
||||
0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x22, 0x66, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
|
||||
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
|
||||
0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x41, 0x5a, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x41, 0x5a, 0x22, 0x4b,
|
||||
0x0a, 0x15, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x6f, 0x6c, 0x75, 0x6d,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6f, 0x70, 0x73, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x69, 0x6f, 0x70, 0x73, 0x22, 0xe0, 0x01, 0x0a, 0x15,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x65, 0x41, 0x5a, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x65, 0x41, 0x5a, 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
|
||||
0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x38,
|
||||
0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70,
|
||||
0x73, 0x68, 0x6f, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e,
|
||||
0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x44, 0x22, 0x4f, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61,
|
||||
0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73,
|
||||
0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x44, 0x22, 0x58, 0x0a, 0x12, 0x47, 0x65, 0x74,
|
||||
0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x73, 0x69,
|
||||
0x73, 0x74, 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0c, 0x52, 0x10, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
|
||||
0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x22, 0x74, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x56, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c,
|
||||
0x75, 0x67, 0x69, 0x6e, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65,
|
||||
0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10,
|
||||
0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x22, 0x41, 0x0a, 0x13,
|
||||
0x53, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e,
|
||||
0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x70,
|
||||
0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22,
|
||||
0xbe, 0x01, 0x0a, 0x1c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68,
|
||||
0x6f, 0x74, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
|
||||
0x61, 0x74, 0x65, 0x64, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73,
|
||||
0x68, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x63,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
|
||||
0x32, 0xc0, 0x04, 0x0a, 0x11, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73,
|
||||
0x68, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x27,
|
||||
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d,
|
||||
0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
|
||||
0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x5b, 0x0a, 0x18, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61,
|
||||
0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
|
||||
0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
|
||||
0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
|
||||
0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
|
||||
0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0e, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x20, 0x2e, 0x67,
|
||||
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53,
|
||||
0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21,
|
||||
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x44, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73,
|
||||
0x68, 0x6f, 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
|
||||
0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4c, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x56, 0x6f,
|
||||
0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
|
||||
0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
|
||||
0x64, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75,
|
||||
0x6d, 0x65, 0x49, 0x44, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
|
||||
0x2e, 0x53, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e,
|
||||
0x53, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61, 0x6e, 0x7a, 0x75, 0x2f, 0x76,
|
||||
0x65, 0x6c, 0x65, 0x72, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
|
||||
0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
const file_VolumeSnapshotter_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x17VolumeSnapshotter.proto\x12\tgenerated\x1a\fShared.proto\"\x9d\x01\n" +
|
||||
"\x13CreateVolumeRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x1e\n" +
|
||||
"\n" +
|
||||
"snapshotID\x18\x02 \x01(\tR\n" +
|
||||
"snapshotID\x12\x1e\n" +
|
||||
"\n" +
|
||||
"volumeType\x18\x03 \x01(\tR\n" +
|
||||
"volumeType\x12\x1a\n" +
|
||||
"\bvolumeAZ\x18\x04 \x01(\tR\bvolumeAZ\x12\x12\n" +
|
||||
"\x04iops\x18\x05 \x01(\x03R\x04iops\"2\n" +
|
||||
"\x14CreateVolumeResponse\x12\x1a\n" +
|
||||
"\bvolumeID\x18\x01 \x01(\tR\bvolumeID\"f\n" +
|
||||
"\x14GetVolumeInfoRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x1a\n" +
|
||||
"\bvolumeID\x18\x02 \x01(\tR\bvolumeID\x12\x1a\n" +
|
||||
"\bvolumeAZ\x18\x03 \x01(\tR\bvolumeAZ\"K\n" +
|
||||
"\x15GetVolumeInfoResponse\x12\x1e\n" +
|
||||
"\n" +
|
||||
"volumeType\x18\x01 \x01(\tR\n" +
|
||||
"volumeType\x12\x12\n" +
|
||||
"\x04iops\x18\x02 \x01(\x03R\x04iops\"\xe0\x01\n" +
|
||||
"\x15CreateSnapshotRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x1a\n" +
|
||||
"\bvolumeID\x18\x02 \x01(\tR\bvolumeID\x12\x1a\n" +
|
||||
"\bvolumeAZ\x18\x03 \x01(\tR\bvolumeAZ\x12>\n" +
|
||||
"\x04tags\x18\x04 \x03(\v2*.generated.CreateSnapshotRequest.TagsEntryR\x04tags\x1a7\n" +
|
||||
"\tTagsEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"8\n" +
|
||||
"\x16CreateSnapshotResponse\x12\x1e\n" +
|
||||
"\n" +
|
||||
"snapshotID\x18\x01 \x01(\tR\n" +
|
||||
"snapshotID\"O\n" +
|
||||
"\x15DeleteSnapshotRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x1e\n" +
|
||||
"\n" +
|
||||
"snapshotID\x18\x02 \x01(\tR\n" +
|
||||
"snapshotID\"X\n" +
|
||||
"\x12GetVolumeIDRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12*\n" +
|
||||
"\x10persistentVolume\x18\x02 \x01(\fR\x10persistentVolume\"1\n" +
|
||||
"\x13GetVolumeIDResponse\x12\x1a\n" +
|
||||
"\bvolumeID\x18\x01 \x01(\tR\bvolumeID\"t\n" +
|
||||
"\x12SetVolumeIDRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12*\n" +
|
||||
"\x10persistentVolume\x18\x02 \x01(\fR\x10persistentVolume\x12\x1a\n" +
|
||||
"\bvolumeID\x18\x03 \x01(\tR\bvolumeID\"A\n" +
|
||||
"\x13SetVolumeIDResponse\x12*\n" +
|
||||
"\x10persistentVolume\x18\x01 \x01(\fR\x10persistentVolume\"\xbe\x01\n" +
|
||||
"\x1cVolumeSnapshotterInitRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12K\n" +
|
||||
"\x06config\x18\x02 \x03(\v23.generated.VolumeSnapshotterInitRequest.ConfigEntryR\x06config\x1a9\n" +
|
||||
"\vConfigEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\xc0\x04\n" +
|
||||
"\x11VolumeSnapshotter\x12A\n" +
|
||||
"\x04Init\x12'.generated.VolumeSnapshotterInitRequest\x1a\x10.generated.Empty\x12[\n" +
|
||||
"\x18CreateVolumeFromSnapshot\x12\x1e.generated.CreateVolumeRequest\x1a\x1f.generated.CreateVolumeResponse\x12R\n" +
|
||||
"\rGetVolumeInfo\x12\x1f.generated.GetVolumeInfoRequest\x1a .generated.GetVolumeInfoResponse\x12U\n" +
|
||||
"\x0eCreateSnapshot\x12 .generated.CreateSnapshotRequest\x1a!.generated.CreateSnapshotResponse\x12D\n" +
|
||||
"\x0eDeleteSnapshot\x12 .generated.DeleteSnapshotRequest\x1a\x10.generated.Empty\x12L\n" +
|
||||
"\vGetVolumeID\x12\x1d.generated.GetVolumeIDRequest\x1a\x1e.generated.GetVolumeIDResponse\x12L\n" +
|
||||
"\vSetVolumeID\x12\x1d.generated.SetVolumeIDRequest\x1a\x1e.generated.SetVolumeIDResponseB5Z3github.com/vmware-tanzu/velero/pkg/plugin/generatedb\x06proto3"
|
||||
|
||||
var (
|
||||
file_VolumeSnapshotter_proto_rawDescOnce sync.Once
|
||||
file_VolumeSnapshotter_proto_rawDescData = file_VolumeSnapshotter_proto_rawDesc
|
||||
file_VolumeSnapshotter_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_VolumeSnapshotter_proto_rawDescGZIP() []byte {
|
||||
file_VolumeSnapshotter_proto_rawDescOnce.Do(func() {
|
||||
file_VolumeSnapshotter_proto_rawDescData = protoimpl.X.CompressGZIP(file_VolumeSnapshotter_proto_rawDescData)
|
||||
file_VolumeSnapshotter_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_VolumeSnapshotter_proto_rawDesc), len(file_VolumeSnapshotter_proto_rawDesc)))
|
||||
})
|
||||
return file_VolumeSnapshotter_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_VolumeSnapshotter_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_VolumeSnapshotter_proto_goTypes = []interface{}{
|
||||
var file_VolumeSnapshotter_proto_goTypes = []any{
|
||||
(*CreateVolumeRequest)(nil), // 0: generated.CreateVolumeRequest
|
||||
(*CreateVolumeResponse)(nil), // 1: generated.CreateVolumeResponse
|
||||
(*GetVolumeInfoRequest)(nil), // 2: generated.GetVolumeInfoRequest
|
||||
@@ -893,157 +798,11 @@ func file_VolumeSnapshotter_proto_init() {
|
||||
return
|
||||
}
|
||||
file_Shared_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_VolumeSnapshotter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateVolumeRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_VolumeSnapshotter_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateVolumeResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_VolumeSnapshotter_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetVolumeInfoRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_VolumeSnapshotter_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetVolumeInfoResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_VolumeSnapshotter_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateSnapshotRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_VolumeSnapshotter_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateSnapshotResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_VolumeSnapshotter_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteSnapshotRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_VolumeSnapshotter_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetVolumeIDRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_VolumeSnapshotter_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetVolumeIDResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_VolumeSnapshotter_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SetVolumeIDRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_VolumeSnapshotter_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SetVolumeIDResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_VolumeSnapshotter_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*VolumeSnapshotterInitRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_VolumeSnapshotter_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_VolumeSnapshotter_proto_rawDesc), len(file_VolumeSnapshotter_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 14,
|
||||
NumExtensions: 0,
|
||||
@@ -1054,7 +813,6 @@ func file_VolumeSnapshotter_proto_init() {
|
||||
MessageInfos: file_VolumeSnapshotter_proto_msgTypes,
|
||||
}.Build()
|
||||
File_VolumeSnapshotter_proto = out.File
|
||||
file_VolumeSnapshotter_proto_rawDesc = nil
|
||||
file_VolumeSnapshotter_proto_goTypes = nil
|
||||
file_VolumeSnapshotter_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc-gen-go v1.36.11-devel
|
||||
// protoc v4.25.2
|
||||
// source: backupitemaction/v2/BackupItemAction.proto
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -23,22 +24,19 @@ const (
|
||||
)
|
||||
|
||||
type ExecuteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
|
||||
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
|
||||
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ExecuteRequest) Reset() {
|
||||
*x = ExecuteRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ExecuteRequest) String() string {
|
||||
@@ -49,7 +47,7 @@ func (*ExecuteRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ExecuteRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -86,23 +84,20 @@ func (x *ExecuteRequest) GetBackup() []byte {
|
||||
}
|
||||
|
||||
type ExecuteResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Item []byte `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
|
||||
AdditionalItems []*generated.ResourceIdentifier `protobuf:"bytes,2,rep,name=additionalItems,proto3" json:"additionalItems,omitempty"`
|
||||
OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID,omitempty"`
|
||||
PostOperationItems []*generated.ResourceIdentifier `protobuf:"bytes,4,rep,name=postOperationItems,proto3" json:"postOperationItems,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ExecuteResponse) Reset() {
|
||||
*x = ExecuteResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ExecuteResponse) String() string {
|
||||
@@ -113,7 +108,7 @@ func (*ExecuteResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ExecuteResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -157,20 +152,17 @@ func (x *ExecuteResponse) GetPostOperationItems() []*generated.ResourceIdentifie
|
||||
}
|
||||
|
||||
type BackupItemActionAppliesToRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *BackupItemActionAppliesToRequest) Reset() {
|
||||
*x = BackupItemActionAppliesToRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *BackupItemActionAppliesToRequest) String() string {
|
||||
@@ -181,7 +173,7 @@ func (*BackupItemActionAppliesToRequest) ProtoMessage() {}
|
||||
|
||||
func (x *BackupItemActionAppliesToRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -204,20 +196,17 @@ func (x *BackupItemActionAppliesToRequest) GetPlugin() string {
|
||||
}
|
||||
|
||||
type BackupItemActionAppliesToResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ResourceSelector *generated.ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *BackupItemActionAppliesToResponse) Reset() {
|
||||
*x = BackupItemActionAppliesToResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *BackupItemActionAppliesToResponse) String() string {
|
||||
@@ -228,7 +217,7 @@ func (*BackupItemActionAppliesToResponse) ProtoMessage() {}
|
||||
|
||||
func (x *BackupItemActionAppliesToResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -251,22 +240,19 @@ func (x *BackupItemActionAppliesToResponse) GetResourceSelector() *generated.Res
|
||||
}
|
||||
|
||||
type BackupItemActionProgressRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID,omitempty"`
|
||||
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID,omitempty"`
|
||||
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *BackupItemActionProgressRequest) Reset() {
|
||||
*x = BackupItemActionProgressRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *BackupItemActionProgressRequest) String() string {
|
||||
@@ -277,7 +263,7 @@ func (*BackupItemActionProgressRequest) ProtoMessage() {}
|
||||
|
||||
func (x *BackupItemActionProgressRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -314,20 +300,17 @@ func (x *BackupItemActionProgressRequest) GetBackup() []byte {
|
||||
}
|
||||
|
||||
type BackupItemActionProgressResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Progress *generated.OperationProgress `protobuf:"bytes,1,opt,name=progress,proto3" json:"progress,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Progress *generated.OperationProgress `protobuf:"bytes,1,opt,name=progress,proto3" json:"progress,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *BackupItemActionProgressResponse) Reset() {
|
||||
*x = BackupItemActionProgressResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *BackupItemActionProgressResponse) String() string {
|
||||
@@ -338,7 +321,7 @@ func (*BackupItemActionProgressResponse) ProtoMessage() {}
|
||||
|
||||
func (x *BackupItemActionProgressResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -361,22 +344,19 @@ func (x *BackupItemActionProgressResponse) GetProgress() *generated.OperationPro
|
||||
}
|
||||
|
||||
type BackupItemActionCancelRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID,omitempty"`
|
||||
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID,omitempty"`
|
||||
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *BackupItemActionCancelRequest) Reset() {
|
||||
*x = BackupItemActionCancelRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *BackupItemActionCancelRequest) String() string {
|
||||
@@ -387,7 +367,7 @@ func (*BackupItemActionCancelRequest) ProtoMessage() {}
|
||||
|
||||
func (x *BackupItemActionCancelRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_backupitemaction_v2_BackupItemAction_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -425,105 +405,52 @@ func (x *BackupItemActionCancelRequest) GetBackup() []byte {
|
||||
|
||||
var File_backupitemaction_v2_BackupItemAction_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_backupitemaction_v2_BackupItemAction_proto_rawDesc = []byte{
|
||||
0x0a, 0x2a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x2f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x32,
|
||||
0x1a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
|
||||
0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x54, 0x0a, 0x0e, 0x45,
|
||||
0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70,
|
||||
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x61, 0x63,
|
||||
0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75,
|
||||
0x70, 0x22, 0xdf, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x47, 0x0a, 0x0f, 0x61, 0x64, 0x64,
|
||||
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,
|
||||
0x72, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
|
||||
0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x49, 0x44, 0x12, 0x4d, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52,
|
||||
0x12, 0x70, 0x6f, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x73, 0x22, 0x3a, 0x0a, 0x20, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69,
|
||||
0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22,
|
||||
0x6c, 0x0a, 0x21, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
|
||||
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x10, 0x52, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x73, 0x0a,
|
||||
0x1f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x61,
|
||||
0x63, 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b,
|
||||
0x75, 0x70, 0x22, 0x5c, 0x0a, 0x20, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65,
|
||||
0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
|
||||
0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72,
|
||||
0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73,
|
||||
0x22, 0x71, 0x0a, 0x1d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
|
||||
0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x62,
|
||||
0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x62, 0x61, 0x63,
|
||||
0x6b, 0x75, 0x70, 0x32, 0xbc, 0x02, 0x0a, 0x10, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x6c,
|
||||
0x69, 0x65, 0x73, 0x54, 0x6f, 0x12, 0x24, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75,
|
||||
0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69,
|
||||
0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x12, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x13, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65,
|
||||
0x73, 0x73, 0x12, 0x23, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x63,
|
||||
0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f,
|
||||
0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a,
|
||||
0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x21, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x63,
|
||||
0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e,
|
||||
0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x42, 0x49, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61, 0x6e, 0x7a, 0x75, 0x2f, 0x76, 0x65,
|
||||
0x6c, 0x65, 0x72, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f,
|
||||
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_backupitemaction_v2_BackupItemAction_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"*backupitemaction/v2/BackupItemAction.proto\x12\x02v2\x1a\fShared.proto\x1a\x1bgoogle/protobuf/empty.proto\"T\n" +
|
||||
"\x0eExecuteRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x12\n" +
|
||||
"\x04item\x18\x02 \x01(\fR\x04item\x12\x16\n" +
|
||||
"\x06backup\x18\x03 \x01(\fR\x06backup\"\xdf\x01\n" +
|
||||
"\x0fExecuteResponse\x12\x12\n" +
|
||||
"\x04item\x18\x01 \x01(\fR\x04item\x12G\n" +
|
||||
"\x0fadditionalItems\x18\x02 \x03(\v2\x1d.generated.ResourceIdentifierR\x0fadditionalItems\x12 \n" +
|
||||
"\voperationID\x18\x03 \x01(\tR\voperationID\x12M\n" +
|
||||
"\x12postOperationItems\x18\x04 \x03(\v2\x1d.generated.ResourceIdentifierR\x12postOperationItems\":\n" +
|
||||
" BackupItemActionAppliesToRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\"l\n" +
|
||||
"!BackupItemActionAppliesToResponse\x12G\n" +
|
||||
"\x10ResourceSelector\x18\x01 \x01(\v2\x1b.generated.ResourceSelectorR\x10ResourceSelector\"s\n" +
|
||||
"\x1fBackupItemActionProgressRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12 \n" +
|
||||
"\voperationID\x18\x02 \x01(\tR\voperationID\x12\x16\n" +
|
||||
"\x06backup\x18\x03 \x01(\fR\x06backup\"\\\n" +
|
||||
" BackupItemActionProgressResponse\x128\n" +
|
||||
"\bprogress\x18\x01 \x01(\v2\x1c.generated.OperationProgressR\bprogress\"q\n" +
|
||||
"\x1dBackupItemActionCancelRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12 \n" +
|
||||
"\voperationID\x18\x02 \x01(\tR\voperationID\x12\x16\n" +
|
||||
"\x06backup\x18\x03 \x01(\fR\x06backup2\xbc\x02\n" +
|
||||
"\x10BackupItemAction\x12X\n" +
|
||||
"\tAppliesTo\x12$.v2.BackupItemActionAppliesToRequest\x1a%.v2.BackupItemActionAppliesToResponse\x122\n" +
|
||||
"\aExecute\x12\x12.v2.ExecuteRequest\x1a\x13.v2.ExecuteResponse\x12U\n" +
|
||||
"\bProgress\x12#.v2.BackupItemActionProgressRequest\x1a$.v2.BackupItemActionProgressResponse\x12C\n" +
|
||||
"\x06Cancel\x12!.v2.BackupItemActionCancelRequest\x1a\x16.google.protobuf.EmptyBIZGgithub.com/vmware-tanzu/velero/pkg/plugin/generated/backupitemaction/v2b\x06proto3"
|
||||
|
||||
var (
|
||||
file_backupitemaction_v2_BackupItemAction_proto_rawDescOnce sync.Once
|
||||
file_backupitemaction_v2_BackupItemAction_proto_rawDescData = file_backupitemaction_v2_BackupItemAction_proto_rawDesc
|
||||
file_backupitemaction_v2_BackupItemAction_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_backupitemaction_v2_BackupItemAction_proto_rawDescGZIP() []byte {
|
||||
file_backupitemaction_v2_BackupItemAction_proto_rawDescOnce.Do(func() {
|
||||
file_backupitemaction_v2_BackupItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(file_backupitemaction_v2_BackupItemAction_proto_rawDescData)
|
||||
file_backupitemaction_v2_BackupItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backupitemaction_v2_BackupItemAction_proto_rawDesc), len(file_backupitemaction_v2_BackupItemAction_proto_rawDesc)))
|
||||
})
|
||||
return file_backupitemaction_v2_BackupItemAction_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_backupitemaction_v2_BackupItemAction_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_backupitemaction_v2_BackupItemAction_proto_goTypes = []interface{}{
|
||||
var file_backupitemaction_v2_BackupItemAction_proto_goTypes = []any{
|
||||
(*ExecuteRequest)(nil), // 0: v2.ExecuteRequest
|
||||
(*ExecuteResponse)(nil), // 1: v2.ExecuteResponse
|
||||
(*BackupItemActionAppliesToRequest)(nil), // 2: v2.BackupItemActionAppliesToRequest
|
||||
@@ -561,97 +488,11 @@ func file_backupitemaction_v2_BackupItemAction_proto_init() {
|
||||
if File_backupitemaction_v2_BackupItemAction_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_backupitemaction_v2_BackupItemAction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ExecuteRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_backupitemaction_v2_BackupItemAction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ExecuteResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_backupitemaction_v2_BackupItemAction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BackupItemActionAppliesToRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_backupitemaction_v2_BackupItemAction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BackupItemActionAppliesToResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_backupitemaction_v2_BackupItemAction_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BackupItemActionProgressRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_backupitemaction_v2_BackupItemAction_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BackupItemActionProgressResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_backupitemaction_v2_BackupItemAction_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BackupItemActionCancelRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_backupitemaction_v2_BackupItemAction_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_backupitemaction_v2_BackupItemAction_proto_rawDesc), len(file_backupitemaction_v2_BackupItemAction_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
@@ -662,7 +503,6 @@ func file_backupitemaction_v2_BackupItemAction_proto_init() {
|
||||
MessageInfos: file_backupitemaction_v2_BackupItemAction_proto_msgTypes,
|
||||
}.Build()
|
||||
File_backupitemaction_v2_BackupItemAction_proto = out.File
|
||||
file_backupitemaction_v2_BackupItemAction_proto_rawDesc = nil
|
||||
file_backupitemaction_v2_BackupItemAction_proto_goTypes = nil
|
||||
file_backupitemaction_v2_BackupItemAction_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc-gen-go v1.36.11-devel
|
||||
// protoc v4.25.2
|
||||
// source: itemblockaction/v1/ItemBlockAction.proto
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -22,20 +23,17 @@ const (
|
||||
)
|
||||
|
||||
type ItemBlockActionAppliesToRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ItemBlockActionAppliesToRequest) Reset() {
|
||||
*x = ItemBlockActionAppliesToRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ItemBlockActionAppliesToRequest) String() string {
|
||||
@@ -46,7 +44,7 @@ func (*ItemBlockActionAppliesToRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ItemBlockActionAppliesToRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -69,20 +67,17 @@ func (x *ItemBlockActionAppliesToRequest) GetPlugin() string {
|
||||
}
|
||||
|
||||
type ItemBlockActionAppliesToResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ResourceSelector *generated.ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ItemBlockActionAppliesToResponse) Reset() {
|
||||
*x = ItemBlockActionAppliesToResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ItemBlockActionAppliesToResponse) String() string {
|
||||
@@ -93,7 +88,7 @@ func (*ItemBlockActionAppliesToResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ItemBlockActionAppliesToResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -116,22 +111,19 @@ func (x *ItemBlockActionAppliesToResponse) GetResourceSelector() *generated.Reso
|
||||
}
|
||||
|
||||
type ItemBlockActionGetRelatedItemsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
|
||||
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
|
||||
Backup []byte `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ItemBlockActionGetRelatedItemsRequest) Reset() {
|
||||
*x = ItemBlockActionGetRelatedItemsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ItemBlockActionGetRelatedItemsRequest) String() string {
|
||||
@@ -142,7 +134,7 @@ func (*ItemBlockActionGetRelatedItemsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ItemBlockActionGetRelatedItemsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -179,20 +171,17 @@ func (x *ItemBlockActionGetRelatedItemsRequest) GetBackup() []byte {
|
||||
}
|
||||
|
||||
type ItemBlockActionGetRelatedItemsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
RelatedItems []*generated.ResourceIdentifier `protobuf:"bytes,1,rep,name=relatedItems,proto3" json:"relatedItems,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RelatedItems []*generated.ResourceIdentifier `protobuf:"bytes,1,rep,name=relatedItems,proto3" json:"relatedItems,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ItemBlockActionGetRelatedItemsResponse) Reset() {
|
||||
*x = ItemBlockActionGetRelatedItemsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ItemBlockActionGetRelatedItemsResponse) String() string {
|
||||
@@ -203,7 +192,7 @@ func (*ItemBlockActionGetRelatedItemsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ItemBlockActionGetRelatedItemsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -227,70 +216,37 @@ func (x *ItemBlockActionGetRelatedItemsResponse) GetRelatedItems() []*generated.
|
||||
|
||||
var File_itemblockaction_v1_ItemBlockAction_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_itemblockaction_v1_ItemBlockAction_proto_rawDesc = []byte{
|
||||
0x0a, 0x28, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x61, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x1a, 0x0c,
|
||||
0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x39, 0x0a, 0x1f,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41,
|
||||
0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22, 0x6b, 0x0a, 0x20, 0x49, 0x74, 0x65, 0x6d, 0x42,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65,
|
||||
0x73, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
|
||||
0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74,
|
||||
0x6f, 0x72, 0x52, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65,
|
||||
0x63, 0x74, 0x6f, 0x72, 0x22, 0x6b, 0x0a, 0x25, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70,
|
||||
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x61, 0x63,
|
||||
0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75,
|
||||
0x70, 0x22, 0x6b, 0x0a, 0x26, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x72,
|
||||
0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72,
|
||||
0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0xd3,
|
||||
0x01, 0x0a, 0x0f, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x12,
|
||||
0x23, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73,
|
||||
0x54, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0f, 0x47, 0x65,
|
||||
0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x29, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74,
|
||||
0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61, 0x6e, 0x7a, 0x75, 0x2f,
|
||||
0x76, 0x65, 0x6c, 0x65, 0x72, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69,
|
||||
0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x69, 0x74, 0x65, 0x6d,
|
||||
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_itemblockaction_v1_ItemBlockAction_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"(itemblockaction/v1/ItemBlockAction.proto\x12\x02v1\x1a\fShared.proto\"9\n" +
|
||||
"\x1fItemBlockActionAppliesToRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\"k\n" +
|
||||
" ItemBlockActionAppliesToResponse\x12G\n" +
|
||||
"\x10ResourceSelector\x18\x01 \x01(\v2\x1b.generated.ResourceSelectorR\x10ResourceSelector\"k\n" +
|
||||
"%ItemBlockActionGetRelatedItemsRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x12\n" +
|
||||
"\x04item\x18\x02 \x01(\fR\x04item\x12\x16\n" +
|
||||
"\x06backup\x18\x03 \x01(\fR\x06backup\"k\n" +
|
||||
"&ItemBlockActionGetRelatedItemsResponse\x12A\n" +
|
||||
"\frelatedItems\x18\x01 \x03(\v2\x1d.generated.ResourceIdentifierR\frelatedItems2\xd3\x01\n" +
|
||||
"\x0fItemBlockAction\x12V\n" +
|
||||
"\tAppliesTo\x12#.v1.ItemBlockActionAppliesToRequest\x1a$.v1.ItemBlockActionAppliesToResponse\x12h\n" +
|
||||
"\x0fGetRelatedItems\x12).v1.ItemBlockActionGetRelatedItemsRequest\x1a*.v1.ItemBlockActionGetRelatedItemsResponseBHZFgithub.com/vmware-tanzu/velero/pkg/plugin/generated/itemblockaction/v1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_rawDescOnce sync.Once
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_rawDescData = file_itemblockaction_v1_ItemBlockAction_proto_rawDesc
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_itemblockaction_v1_ItemBlockAction_proto_rawDescGZIP() []byte {
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_rawDescOnce.Do(func() {
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_rawDescData = protoimpl.X.CompressGZIP(file_itemblockaction_v1_ItemBlockAction_proto_rawDescData)
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_itemblockaction_v1_ItemBlockAction_proto_rawDesc), len(file_itemblockaction_v1_ItemBlockAction_proto_rawDesc)))
|
||||
})
|
||||
return file_itemblockaction_v1_ItemBlockAction_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_itemblockaction_v1_ItemBlockAction_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_itemblockaction_v1_ItemBlockAction_proto_goTypes = []interface{}{
|
||||
var file_itemblockaction_v1_ItemBlockAction_proto_goTypes = []any{
|
||||
(*ItemBlockActionAppliesToRequest)(nil), // 0: v1.ItemBlockActionAppliesToRequest
|
||||
(*ItemBlockActionAppliesToResponse)(nil), // 1: v1.ItemBlockActionAppliesToResponse
|
||||
(*ItemBlockActionGetRelatedItemsRequest)(nil), // 2: v1.ItemBlockActionGetRelatedItemsRequest
|
||||
@@ -317,61 +273,11 @@ func file_itemblockaction_v1_ItemBlockAction_proto_init() {
|
||||
if File_itemblockaction_v1_ItemBlockAction_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ItemBlockActionAppliesToRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ItemBlockActionAppliesToResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ItemBlockActionGetRelatedItemsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ItemBlockActionGetRelatedItemsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_itemblockaction_v1_ItemBlockAction_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_itemblockaction_v1_ItemBlockAction_proto_rawDesc), len(file_itemblockaction_v1_ItemBlockAction_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
@@ -382,7 +288,6 @@ func file_itemblockaction_v1_ItemBlockAction_proto_init() {
|
||||
MessageInfos: file_itemblockaction_v1_ItemBlockAction_proto_msgTypes,
|
||||
}.Build()
|
||||
File_itemblockaction_v1_ItemBlockAction_proto = out.File
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_rawDesc = nil
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_goTypes = nil
|
||||
file_itemblockaction_v1_ItemBlockAction_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc-gen-go v1.36.11-devel
|
||||
// protoc v4.25.2
|
||||
// source: restoreitemaction/v2/RestoreItemAction.proto
|
||||
|
||||
@@ -14,6 +14,7 @@ import (
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -24,23 +25,20 @@ const (
|
||||
)
|
||||
|
||||
type RestoreItemActionExecuteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
|
||||
Restore []byte `protobuf:"bytes,3,opt,name=restore,proto3" json:"restore,omitempty"`
|
||||
ItemFromBackup []byte `protobuf:"bytes,4,opt,name=itemFromBackup,proto3" json:"itemFromBackup,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Item []byte `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
|
||||
Restore []byte `protobuf:"bytes,3,opt,name=restore,proto3" json:"restore,omitempty"`
|
||||
ItemFromBackup []byte `protobuf:"bytes,4,opt,name=itemFromBackup,proto3" json:"itemFromBackup,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionExecuteRequest) Reset() {
|
||||
*x = RestoreItemActionExecuteRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionExecuteRequest) String() string {
|
||||
@@ -51,7 +49,7 @@ func (*RestoreItemActionExecuteRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionExecuteRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -95,25 +93,22 @@ func (x *RestoreItemActionExecuteRequest) GetItemFromBackup() []byte {
|
||||
}
|
||||
|
||||
type RestoreItemActionExecuteResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Item []byte `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
|
||||
AdditionalItems []*generated.ResourceIdentifier `protobuf:"bytes,2,rep,name=additionalItems,proto3" json:"additionalItems,omitempty"`
|
||||
SkipRestore bool `protobuf:"varint,3,opt,name=skipRestore,proto3" json:"skipRestore,omitempty"`
|
||||
OperationID string `protobuf:"bytes,4,opt,name=operationID,proto3" json:"operationID,omitempty"`
|
||||
WaitForAdditionalItems bool `protobuf:"varint,5,opt,name=waitForAdditionalItems,proto3" json:"waitForAdditionalItems,omitempty"`
|
||||
AdditionalItemsReadyTimeout *durationpb.Duration `protobuf:"bytes,6,opt,name=additionalItemsReadyTimeout,proto3" json:"additionalItemsReadyTimeout,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionExecuteResponse) Reset() {
|
||||
*x = RestoreItemActionExecuteResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionExecuteResponse) String() string {
|
||||
@@ -124,7 +119,7 @@ func (*RestoreItemActionExecuteResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionExecuteResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -182,20 +177,17 @@ func (x *RestoreItemActionExecuteResponse) GetAdditionalItemsReadyTimeout() *dur
|
||||
}
|
||||
|
||||
type RestoreItemActionAppliesToRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionAppliesToRequest) Reset() {
|
||||
*x = RestoreItemActionAppliesToRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionAppliesToRequest) String() string {
|
||||
@@ -206,7 +198,7 @@ func (*RestoreItemActionAppliesToRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionAppliesToRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -229,20 +221,17 @@ func (x *RestoreItemActionAppliesToRequest) GetPlugin() string {
|
||||
}
|
||||
|
||||
type RestoreItemActionAppliesToResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ResourceSelector *generated.ResourceSelector `protobuf:"bytes,1,opt,name=ResourceSelector,proto3" json:"ResourceSelector,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionAppliesToResponse) Reset() {
|
||||
*x = RestoreItemActionAppliesToResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionAppliesToResponse) String() string {
|
||||
@@ -253,7 +242,7 @@ func (*RestoreItemActionAppliesToResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionAppliesToResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -276,22 +265,19 @@ func (x *RestoreItemActionAppliesToResponse) GetResourceSelector() *generated.Re
|
||||
}
|
||||
|
||||
type RestoreItemActionProgressRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID,omitempty"`
|
||||
Restore []byte `protobuf:"bytes,3,opt,name=restore,proto3" json:"restore,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID,omitempty"`
|
||||
Restore []byte `protobuf:"bytes,3,opt,name=restore,proto3" json:"restore,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionProgressRequest) Reset() {
|
||||
*x = RestoreItemActionProgressRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionProgressRequest) String() string {
|
||||
@@ -302,7 +288,7 @@ func (*RestoreItemActionProgressRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionProgressRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -339,20 +325,17 @@ func (x *RestoreItemActionProgressRequest) GetRestore() []byte {
|
||||
}
|
||||
|
||||
type RestoreItemActionProgressResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Progress *generated.OperationProgress `protobuf:"bytes,1,opt,name=progress,proto3" json:"progress,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Progress *generated.OperationProgress `protobuf:"bytes,1,opt,name=progress,proto3" json:"progress,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionProgressResponse) Reset() {
|
||||
*x = RestoreItemActionProgressResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionProgressResponse) String() string {
|
||||
@@ -363,7 +346,7 @@ func (*RestoreItemActionProgressResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionProgressResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -386,22 +369,19 @@ func (x *RestoreItemActionProgressResponse) GetProgress() *generated.OperationPr
|
||||
}
|
||||
|
||||
type RestoreItemActionCancelRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID,omitempty"`
|
||||
Restore []byte `protobuf:"bytes,3,opt,name=restore,proto3" json:"restore,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID,omitempty"`
|
||||
Restore []byte `protobuf:"bytes,3,opt,name=restore,proto3" json:"restore,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionCancelRequest) Reset() {
|
||||
*x = RestoreItemActionCancelRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionCancelRequest) String() string {
|
||||
@@ -412,7 +392,7 @@ func (*RestoreItemActionCancelRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionCancelRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -449,22 +429,19 @@ func (x *RestoreItemActionCancelRequest) GetRestore() []byte {
|
||||
}
|
||||
|
||||
type RestoreItemActionItemsReadyRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
|
||||
Restore []byte `protobuf:"bytes,2,opt,name=restore,proto3" json:"restore,omitempty"`
|
||||
AdditionalItems []*generated.ResourceIdentifier `protobuf:"bytes,3,rep,name=additionalItems,proto3" json:"additionalItems,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionItemsReadyRequest) Reset() {
|
||||
*x = RestoreItemActionItemsReadyRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionItemsReadyRequest) String() string {
|
||||
@@ -475,7 +452,7 @@ func (*RestoreItemActionItemsReadyRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionItemsReadyRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -512,20 +489,17 @@ func (x *RestoreItemActionItemsReadyRequest) GetAdditionalItems() []*generated.R
|
||||
}
|
||||
|
||||
type RestoreItemActionItemsReadyResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Ready bool `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Ready bool `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionItemsReadyResponse) Reset() {
|
||||
*x = RestoreItemActionItemsReadyResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RestoreItemActionItemsReadyResponse) String() string {
|
||||
@@ -536,7 +510,7 @@ func (*RestoreItemActionItemsReadyResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RestoreItemActionItemsReadyResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -560,142 +534,62 @@ func (x *RestoreItemActionItemsReadyResponse) GetReady() bool {
|
||||
|
||||
var File_restoreitemaction_v2_RestoreItemAction_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_restoreitemaction_v2_RestoreItemAction_proto_rawDesc = []byte{
|
||||
0x0a, 0x2c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x2f, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02,
|
||||
0x76, 0x32, 0x1a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64,
|
||||
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x01,
|
||||
0x0a, 0x1f, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65,
|
||||
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
|
||||
0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x74, 0x65, 0x6d, 0x46,
|
||||
0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x0e, 0x69, 0x74, 0x65, 0x6d, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22,
|
||||
0xd8, 0x02, 0x0a, 0x20, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x47, 0x0a, 0x0f, 0x61, 0x64, 0x64, 0x69,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72,
|
||||
0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x73, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x52, 0x65, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x36, 0x0a, 0x16, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72,
|
||||
0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x41, 0x64,
|
||||
0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x5b, 0x0a,
|
||||
0x1b, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73,
|
||||
0x52, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1b, 0x61,
|
||||
0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65,
|
||||
0x61, 0x64, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x3b, 0x0a, 0x21, 0x52, 0x65,
|
||||
0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41,
|
||||
0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22, 0x6d, 0x0a, 0x22, 0x52, 0x65, 0x73, 0x74, 0x6f,
|
||||
0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c,
|
||||
0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a,
|
||||
0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f,
|
||||
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
|
||||
0x74, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65,
|
||||
0x63, 0x74, 0x6f, 0x72, 0x52, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65,
|
||||
0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x76, 0x0a, 0x20, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72,
|
||||
0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c,
|
||||
0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67,
|
||||
0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
|
||||
0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x5d,
|
||||
0x0a, 0x21, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
|
||||
0x64, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72,
|
||||
0x65, 0x73, 0x73, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x74, 0x0a,
|
||||
0x1e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70,
|
||||
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73,
|
||||
0x74, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x22, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65,
|
||||
0x61, 0x64, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c,
|
||||
0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67,
|
||||
0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x47, 0x0a, 0x0f,
|
||||
0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18,
|
||||
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
|
||||
0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,
|
||||
0x66, 0x69, 0x65, 0x72, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3b, 0x0a, 0x23, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52,
|
||||
0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61,
|
||||
0x64, 0x79, 0x32, 0xd0, 0x03, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x6c,
|
||||
0x69, 0x65, 0x73, 0x54, 0x6f, 0x12, 0x25, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f,
|
||||
0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c,
|
||||
0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12,
|
||||
0x23, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75,
|
||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x08, 0x50, 0x72,
|
||||
0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f,
|
||||
0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x22, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x6a, 0x0a, 0x17, 0x41, 0x72, 0x65,
|
||||
0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52,
|
||||
0x65, 0x61, 0x64, 0x79, 0x12, 0x26, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73,
|
||||
0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61, 0x6e, 0x7a, 0x75,
|
||||
0x2f, 0x76, 0x65, 0x6c, 0x65, 0x72, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67,
|
||||
0x69, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x72, 0x65, 0x73,
|
||||
0x74, 0x6f, 0x72, 0x65, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,
|
||||
0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_restoreitemaction_v2_RestoreItemAction_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
",restoreitemaction/v2/RestoreItemAction.proto\x12\x02v2\x1a\fShared.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1egoogle/protobuf/duration.proto\"\x8f\x01\n" +
|
||||
"\x1fRestoreItemActionExecuteRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x12\n" +
|
||||
"\x04item\x18\x02 \x01(\fR\x04item\x12\x18\n" +
|
||||
"\arestore\x18\x03 \x01(\fR\arestore\x12&\n" +
|
||||
"\x0eitemFromBackup\x18\x04 \x01(\fR\x0eitemFromBackup\"\xd8\x02\n" +
|
||||
" RestoreItemActionExecuteResponse\x12\x12\n" +
|
||||
"\x04item\x18\x01 \x01(\fR\x04item\x12G\n" +
|
||||
"\x0fadditionalItems\x18\x02 \x03(\v2\x1d.generated.ResourceIdentifierR\x0fadditionalItems\x12 \n" +
|
||||
"\vskipRestore\x18\x03 \x01(\bR\vskipRestore\x12 \n" +
|
||||
"\voperationID\x18\x04 \x01(\tR\voperationID\x126\n" +
|
||||
"\x16waitForAdditionalItems\x18\x05 \x01(\bR\x16waitForAdditionalItems\x12[\n" +
|
||||
"\x1badditionalItemsReadyTimeout\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\x1badditionalItemsReadyTimeout\";\n" +
|
||||
"!RestoreItemActionAppliesToRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\"m\n" +
|
||||
"\"RestoreItemActionAppliesToResponse\x12G\n" +
|
||||
"\x10ResourceSelector\x18\x01 \x01(\v2\x1b.generated.ResourceSelectorR\x10ResourceSelector\"v\n" +
|
||||
" RestoreItemActionProgressRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12 \n" +
|
||||
"\voperationID\x18\x02 \x01(\tR\voperationID\x12\x18\n" +
|
||||
"\arestore\x18\x03 \x01(\fR\arestore\"]\n" +
|
||||
"!RestoreItemActionProgressResponse\x128\n" +
|
||||
"\bprogress\x18\x01 \x01(\v2\x1c.generated.OperationProgressR\bprogress\"t\n" +
|
||||
"\x1eRestoreItemActionCancelRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12 \n" +
|
||||
"\voperationID\x18\x02 \x01(\tR\voperationID\x12\x18\n" +
|
||||
"\arestore\x18\x03 \x01(\fR\arestore\"\x9f\x01\n" +
|
||||
"\"RestoreItemActionItemsReadyRequest\x12\x16\n" +
|
||||
"\x06plugin\x18\x01 \x01(\tR\x06plugin\x12\x18\n" +
|
||||
"\arestore\x18\x02 \x01(\fR\arestore\x12G\n" +
|
||||
"\x0fadditionalItems\x18\x03 \x03(\v2\x1d.generated.ResourceIdentifierR\x0fadditionalItems\";\n" +
|
||||
"#RestoreItemActionItemsReadyResponse\x12\x14\n" +
|
||||
"\x05ready\x18\x01 \x01(\bR\x05ready2\xd0\x03\n" +
|
||||
"\x11RestoreItemAction\x12Z\n" +
|
||||
"\tAppliesTo\x12%.v2.RestoreItemActionAppliesToRequest\x1a&.v2.RestoreItemActionAppliesToResponse\x12T\n" +
|
||||
"\aExecute\x12#.v2.RestoreItemActionExecuteRequest\x1a$.v2.RestoreItemActionExecuteResponse\x12W\n" +
|
||||
"\bProgress\x12$.v2.RestoreItemActionProgressRequest\x1a%.v2.RestoreItemActionProgressResponse\x12D\n" +
|
||||
"\x06Cancel\x12\".v2.RestoreItemActionCancelRequest\x1a\x16.google.protobuf.Empty\x12j\n" +
|
||||
"\x17AreAdditionalItemsReady\x12&.v2.RestoreItemActionItemsReadyRequest\x1a'.v2.RestoreItemActionItemsReadyResponseBJZHgithub.com/vmware-tanzu/velero/pkg/plugin/generated/restoreitemaction/v2b\x06proto3"
|
||||
|
||||
var (
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_rawDescOnce sync.Once
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_rawDescData = file_restoreitemaction_v2_RestoreItemAction_proto_rawDesc
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_restoreitemaction_v2_RestoreItemAction_proto_rawDescGZIP() []byte {
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_rawDescOnce.Do(func() {
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(file_restoreitemaction_v2_RestoreItemAction_proto_rawDescData)
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_restoreitemaction_v2_RestoreItemAction_proto_rawDesc), len(file_restoreitemaction_v2_RestoreItemAction_proto_rawDesc)))
|
||||
})
|
||||
return file_restoreitemaction_v2_RestoreItemAction_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_restoreitemaction_v2_RestoreItemAction_proto_goTypes = []interface{}{
|
||||
var file_restoreitemaction_v2_RestoreItemAction_proto_goTypes = []any{
|
||||
(*RestoreItemActionExecuteRequest)(nil), // 0: v2.RestoreItemActionExecuteRequest
|
||||
(*RestoreItemActionExecuteResponse)(nil), // 1: v2.RestoreItemActionExecuteResponse
|
||||
(*RestoreItemActionAppliesToRequest)(nil), // 2: v2.RestoreItemActionAppliesToRequest
|
||||
@@ -739,121 +633,11 @@ func file_restoreitemaction_v2_RestoreItemAction_proto_init() {
|
||||
if File_restoreitemaction_v2_RestoreItemAction_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionExecuteRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionExecuteResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionAppliesToRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionAppliesToResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionProgressRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionProgressResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionCancelRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionItemsReadyRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RestoreItemActionItemsReadyResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_restoreitemaction_v2_RestoreItemAction_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_restoreitemaction_v2_RestoreItemAction_proto_rawDesc), len(file_restoreitemaction_v2_RestoreItemAction_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 9,
|
||||
NumExtensions: 0,
|
||||
@@ -864,7 +648,6 @@ func file_restoreitemaction_v2_RestoreItemAction_proto_init() {
|
||||
MessageInfos: file_restoreitemaction_v2_RestoreItemAction_proto_msgTypes,
|
||||
}.Build()
|
||||
File_restoreitemaction_v2_RestoreItemAction_proto = out.File
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_rawDesc = nil
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_goTypes = nil
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -36,6 +36,10 @@ import (
|
||||
|
||||
const defaultTimeout = 30 * time.Second
|
||||
|
||||
// maxHookTimeout bounds a user-supplied hook timeout, which can come from a pod
|
||||
// annotation, so a single hook cannot hold up a backup for an unbounded time.
|
||||
const maxHookTimeout = 4 * time.Hour
|
||||
|
||||
// PodCommandExecutor is capable of executing a command in a container in a pod.
|
||||
type PodCommandExecutor interface {
|
||||
// ExecutePodCommand executes a command in a container in a pod. If the command takes longer than
|
||||
@@ -112,9 +116,15 @@ func (e *defaultPodCommandExecutor) ExecutePodCommand(log logrus.FieldLogger, it
|
||||
localHook.OnError = api.HookErrorModeFail
|
||||
}
|
||||
|
||||
if localHook.Timeout.Duration == 0 {
|
||||
// A non-positive timeout is not a valid bound. Timeouts sourced from pod annotations are
|
||||
// parsed with time.ParseDuration, which accepts negative values, and a negative duration
|
||||
// would otherwise leave the hook without any timeout at all.
|
||||
if localHook.Timeout.Duration <= 0 {
|
||||
localHook.Timeout.Duration = defaultTimeout
|
||||
}
|
||||
if localHook.Timeout.Duration > maxHookTimeout {
|
||||
localHook.Timeout.Duration = maxHookTimeout
|
||||
}
|
||||
|
||||
hookLog := log.WithFields(
|
||||
logrus.Fields{
|
||||
@@ -158,23 +168,26 @@ func (e *defaultPodCommandExecutor) ExecutePodCommand(log logrus.FieldLogger, it
|
||||
Stderr: &stderr,
|
||||
}
|
||||
|
||||
errCh := make(chan error)
|
||||
// The timeout drives the context so the exec stream is actually canceled, rather than
|
||||
// being left running on the API server after this function has returned.
|
||||
ctx, cancel := context.WithTimeout(context.Background(), localHook.Timeout.Duration)
|
||||
defer cancel()
|
||||
|
||||
// Buffered so the goroutine below can always send its result and exit, even when this
|
||||
// function has already returned on the timeout path.
|
||||
errCh := make(chan error, 1)
|
||||
|
||||
go func() {
|
||||
err = executor.StreamWithContext(context.Background(), streamOptions)
|
||||
errCh <- err
|
||||
streamErr := executor.StreamWithContext(ctx, streamOptions)
|
||||
// Inspect the local context as soon as the stream returns. Otherwise a stream error
|
||||
// completed before the deadline could be misclassified if this goroutine sends its
|
||||
// result before the caller is scheduled to receive it.
|
||||
errCh <- normalizeExecHookError(streamErr, ctx.Err(), localHook.Timeout.Duration)
|
||||
}()
|
||||
|
||||
var timeoutCh <-chan time.Time
|
||||
if localHook.Timeout.Duration > 0 {
|
||||
timer := time.NewTimer(localHook.Timeout.Duration)
|
||||
defer timer.Stop()
|
||||
timeoutCh = timer.C
|
||||
}
|
||||
|
||||
select {
|
||||
case err = <-errCh:
|
||||
case <-timeoutCh:
|
||||
case <-ctx.Done():
|
||||
return errors.Errorf("timed out after %v", localHook.Timeout.Duration)
|
||||
}
|
||||
|
||||
@@ -184,6 +197,14 @@ func (e *defaultPodCommandExecutor) ExecutePodCommand(log logrus.FieldLogger, it
|
||||
return err
|
||||
}
|
||||
|
||||
func normalizeExecHookError(streamErr, contextErr error, timeout time.Duration) error {
|
||||
if errors.Is(contextErr, context.DeadlineExceeded) {
|
||||
return errors.Errorf("timed out after %v", timeout)
|
||||
}
|
||||
|
||||
return streamErr
|
||||
}
|
||||
|
||||
func ensureContainerExists(pod *corev1api.Pod, container string) error {
|
||||
existsAsMainContainer := slices.ContainsFunc(pod.Spec.Containers, func(c corev1api.Container) bool {
|
||||
return c.Name == container
|
||||
|
||||
@@ -177,6 +177,33 @@ func TestExecutePodCommand(t *testing.T) {
|
||||
hookError: errors.New("hook error"),
|
||||
expectedError: "hook error",
|
||||
},
|
||||
{
|
||||
name: "stream deadline exceeded before local timeout",
|
||||
command: []string{"some", "command"},
|
||||
expectedContainerName: "foo",
|
||||
expectedErrorMode: v1.HookErrorModeFail,
|
||||
expectedTimeout: defaultTimeout,
|
||||
hookError: context.DeadlineExceeded,
|
||||
expectedError: context.DeadlineExceeded.Error(),
|
||||
},
|
||||
{
|
||||
// Timeouts from pod annotations go through time.ParseDuration, which accepts
|
||||
// negative values. Without clamping, the hook would run with no timeout at all.
|
||||
name: "negative timeout falls back to the default",
|
||||
command: []string{"some", "command"},
|
||||
expectedContainerName: "foo",
|
||||
expectedErrorMode: v1.HookErrorModeFail,
|
||||
timeout: -1 * time.Second,
|
||||
expectedTimeout: 30 * time.Second,
|
||||
},
|
||||
{
|
||||
name: "timeout above the maximum is capped",
|
||||
command: []string{"some", "command"},
|
||||
expectedContainerName: "foo",
|
||||
expectedErrorMode: v1.HookErrorModeFail,
|
||||
timeout: 100000 * time.Hour,
|
||||
expectedTimeout: maxHookTimeout,
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
@@ -246,6 +273,54 @@ func TestExecutePodCommand(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNormalizeExecHookError(t *testing.T) {
|
||||
hookErr := errors.New("hook error")
|
||||
tests := []struct {
|
||||
name string
|
||||
streamErr error
|
||||
contextErr error
|
||||
expectedError string
|
||||
preserveStreamErr bool
|
||||
}{
|
||||
{
|
||||
name: "local context deadline exceeded",
|
||||
streamErr: context.DeadlineExceeded,
|
||||
contextErr: context.DeadlineExceeded,
|
||||
expectedError: "timed out after 30s",
|
||||
},
|
||||
{
|
||||
name: "stream deadline exceeded before local timeout",
|
||||
streamErr: context.DeadlineExceeded,
|
||||
expectedError: context.DeadlineExceeded.Error(),
|
||||
preserveStreamErr: true,
|
||||
},
|
||||
{
|
||||
name: "ordinary hook error",
|
||||
streamErr: hookErr,
|
||||
expectedError: hookErr.Error(),
|
||||
preserveStreamErr: true,
|
||||
},
|
||||
{
|
||||
name: "no errors",
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
err := normalizeExecHookError(test.streamErr, test.contextErr, defaultTimeout)
|
||||
if test.expectedError == "" {
|
||||
require.NoError(t, err)
|
||||
return
|
||||
}
|
||||
|
||||
require.EqualError(t, err, test.expectedError)
|
||||
if test.preserveStreamErr && err != test.streamErr {
|
||||
t.Fatalf("expected stream error to be returned unchanged")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestEnsureContainerExists(t *testing.T) {
|
||||
pod := &corev1api.Pod{
|
||||
Spec: corev1api.PodSpec{
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
Copyright 2026 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package podexec
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/url"
|
||||
"runtime"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/mock"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/tools/remotecommand"
|
||||
|
||||
v1 "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
|
||||
velerotest "github.com/vmware-tanzu/velero/pkg/test"
|
||||
)
|
||||
|
||||
const timeoutTestPodJSON = `{
|
||||
"metadata": {"namespace": "ns", "name": "pod-1"},
|
||||
"spec": {"containers": [{"name": "container-1"}]}
|
||||
}`
|
||||
|
||||
// contextAwareExecutor returns once its context is canceled, like the SPDY executor does.
|
||||
type contextAwareExecutor struct {
|
||||
canceled chan struct{}
|
||||
canceledOnce bool
|
||||
}
|
||||
|
||||
func (e *contextAwareExecutor) Stream(options remotecommand.StreamOptions) error { return nil }
|
||||
|
||||
func (e *contextAwareExecutor) StreamWithContext(ctx context.Context, options remotecommand.StreamOptions) error {
|
||||
<-ctx.Done()
|
||||
if !e.canceledOnce {
|
||||
e.canceledOnce = true
|
||||
close(e.canceled)
|
||||
}
|
||||
return ctx.Err()
|
||||
}
|
||||
|
||||
// contextIgnoringExecutor lets the outer timeout path return before the stream does.
|
||||
// Once released, the stream goroutine can only exit if its result channel is buffered.
|
||||
type contextIgnoringExecutor struct {
|
||||
release <-chan struct{}
|
||||
returned *sync.WaitGroup
|
||||
}
|
||||
|
||||
func (e *contextIgnoringExecutor) Stream(options remotecommand.StreamOptions) error { return nil }
|
||||
|
||||
func (e *contextIgnoringExecutor) StreamWithContext(ctx context.Context, options remotecommand.StreamOptions) error {
|
||||
defer e.returned.Done()
|
||||
<-e.release
|
||||
return nil
|
||||
}
|
||||
|
||||
func newTimeoutTestExecutor(t *testing.T, exec remotecommand.Executor) (*defaultPodCommandExecutor, map[string]any) {
|
||||
t.Helper()
|
||||
|
||||
clientConfig := &rest.Config{}
|
||||
poster := &mockPoster{}
|
||||
podCommandExecutor := NewPodCommandExecutor(clientConfig, poster).(*defaultPodCommandExecutor)
|
||||
|
||||
factory := &mockStreamExecutorFactory{}
|
||||
podCommandExecutor.streamExecutorFactory = factory
|
||||
|
||||
baseURL, _ := url.Parse("https://some.server")
|
||||
contentConfig := rest.ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}}
|
||||
poster.On("Post").Return(rest.NewRequestWithClient(baseURL, "/api/v1", contentConfig, nil))
|
||||
factory.On("NewSPDYExecutor", clientConfig, "POST", mock.Anything).Return(exec, nil)
|
||||
|
||||
pod, err := velerotest.GetAsMap(timeoutTestPodJSON)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
return podCommandExecutor, pod
|
||||
}
|
||||
|
||||
func timeoutTestHook(timeout time.Duration) *v1.ExecHook {
|
||||
return &v1.ExecHook{
|
||||
Container: "container-1",
|
||||
Command: []string{"sh", "-c", "sleep 60"},
|
||||
Timeout: metav1.Duration{Duration: timeout},
|
||||
}
|
||||
}
|
||||
|
||||
// A hook that times out must have its exec stream canceled, otherwise the command keeps
|
||||
// running on the API server after ExecutePodCommand has returned.
|
||||
func TestExecutePodCommandCancelsStreamOnTimeout(t *testing.T) {
|
||||
exec := &contextAwareExecutor{canceled: make(chan struct{})}
|
||||
podCommandExecutor, pod := newTimeoutTestExecutor(t, exec)
|
||||
|
||||
err := podCommandExecutor.ExecutePodCommand(velerotest.NewLogger(), pod, "ns", "pod-1", "hookName", timeoutTestHook(100*time.Millisecond))
|
||||
if err == nil {
|
||||
t.Fatal("expected a timeout error")
|
||||
}
|
||||
|
||||
select {
|
||||
case <-exec.canceled:
|
||||
case <-time.After(2 * time.Second):
|
||||
t.Fatal("stream was not canceled after the hook timed out")
|
||||
}
|
||||
}
|
||||
|
||||
// When the stream returns because the context expired, both select cases are ready and one
|
||||
// is picked at random, so the reported error must not depend on which one wins.
|
||||
func TestExecutePodCommandTimeoutErrorIsDeterministic(t *testing.T) {
|
||||
const (
|
||||
rounds = 50
|
||||
expectedError = "timed out after 1ms"
|
||||
)
|
||||
|
||||
messages := map[string]int{}
|
||||
for range rounds {
|
||||
exec := &contextAwareExecutor{canceled: make(chan struct{})}
|
||||
podCommandExecutor, pod := newTimeoutTestExecutor(t, exec)
|
||||
|
||||
err := podCommandExecutor.ExecutePodCommand(velerotest.NewLogger(), pod, "ns", "pod-1", "hookName", timeoutTestHook(time.Millisecond))
|
||||
if err == nil {
|
||||
t.Fatal("expected a timeout error")
|
||||
}
|
||||
if err.Error() != expectedError {
|
||||
t.Fatalf("expected %q, got %q", expectedError, err)
|
||||
}
|
||||
messages[err.Error()]++
|
||||
}
|
||||
|
||||
if len(messages) != 1 {
|
||||
t.Fatalf("expected one error message, got %d: %v", len(messages), messages)
|
||||
}
|
||||
}
|
||||
|
||||
func TestExecutePodCommandDoesNotLeakOnTimeout(t *testing.T) {
|
||||
const rounds = 10
|
||||
|
||||
runtime.GC()
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
before := runtime.NumGoroutine()
|
||||
|
||||
release := make(chan struct{})
|
||||
returned := &sync.WaitGroup{}
|
||||
for range rounds {
|
||||
returned.Add(1)
|
||||
exec := &contextIgnoringExecutor{release: release, returned: returned}
|
||||
podCommandExecutor, pod := newTimeoutTestExecutor(t, exec)
|
||||
|
||||
if err := podCommandExecutor.ExecutePodCommand(velerotest.NewLogger(), pod, "ns", "pod-1", "hookName", timeoutTestHook(50*time.Millisecond)); err == nil {
|
||||
t.Fatal("expected a timeout error")
|
||||
}
|
||||
}
|
||||
|
||||
// Every ExecutePodCommand call has already taken the timeout path. Releasing the
|
||||
// streams now forces their goroutines to send into an errCh with no receiver.
|
||||
close(release)
|
||||
returned.Wait()
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
runtime.GC()
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
|
||||
if leaked := runtime.NumGoroutine() - before; leaked >= rounds {
|
||||
t.Fatalf("%d goroutines leaked over %d timed out hooks", leaked, rounds)
|
||||
}
|
||||
}
|
||||
@@ -380,6 +380,8 @@ func TestBackupPodVolumes(t *testing.T) {
|
||||
pvbs int
|
||||
mockGetRepositoryType bool
|
||||
errs []string
|
||||
expectedBackedup []string
|
||||
expectedSkipped map[string]string
|
||||
}{
|
||||
{
|
||||
name: "empty volume list",
|
||||
@@ -573,6 +575,10 @@ func TestBackupPodVolumes(t *testing.T) {
|
||||
uploaderType: "kopia",
|
||||
bsl: "fake-bsl",
|
||||
errs: []string{},
|
||||
expectedSkipped: map[string]string{
|
||||
"fake-volume-1": "volume fake-volume-1 is declared in pod fake-ns/fake-pod but not mounted by any container, skipping",
|
||||
"fake-volume-2": "volume fake-volume-2 is declared in pod fake-ns/fake-pod but not mounted by any container, skipping",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "return completed pvbs",
|
||||
@@ -589,14 +595,14 @@ func TestBackupPodVolumes(t *testing.T) {
|
||||
ctlClientObj: []runtime.Object{
|
||||
createBackupRepoObj(),
|
||||
},
|
||||
runtimeScheme: scheme,
|
||||
uploaderType: "kopia",
|
||||
bsl: "fake-bsl",
|
||||
pvbs: 1,
|
||||
errs: []string{},
|
||||
runtimeScheme: scheme,
|
||||
uploaderType: "kopia",
|
||||
bsl: "fake-bsl",
|
||||
pvbs: 1,
|
||||
errs: []string{},
|
||||
expectedBackedup: []string{"fake-volume-1"},
|
||||
},
|
||||
}
|
||||
// TODO add more verification around PVCBackupSummary returned by "BackupPodVolumes"
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
ctx := t.Context()
|
||||
@@ -627,7 +633,7 @@ func TestBackupPodVolumes(t *testing.T) {
|
||||
funcGetRepositoryType = getRepositoryType
|
||||
}
|
||||
|
||||
pvbs, _, errs := bp.BackupPodVolumes(backupObj, test.sourcePod, test.volumes, nil, velerotest.NewLogger())
|
||||
pvbs, summary, errs := bp.BackupPodVolumes(backupObj, test.sourcePod, test.volumes, nil, velerotest.NewLogger())
|
||||
|
||||
if test.errs != nil {
|
||||
for i := 0; i < len(errs); i++ {
|
||||
@@ -636,6 +642,22 @@ func TestBackupPodVolumes(t *testing.T) {
|
||||
}
|
||||
|
||||
assert.Len(t, pvbs, test.pvbs)
|
||||
|
||||
if summary != nil {
|
||||
assert.Len(t, summary.Backedup, len(test.expectedBackedup))
|
||||
for _, vol := range test.expectedBackedup {
|
||||
assert.Contains(t, summary.Backedup, vol)
|
||||
}
|
||||
|
||||
assert.Len(t, summary.Skipped, len(test.expectedSkipped))
|
||||
for vol, reason := range test.expectedSkipped {
|
||||
require.Contains(t, summary.Skipped, vol)
|
||||
assert.Equal(t, reason, summary.Skipped[vol].Reason)
|
||||
}
|
||||
} else {
|
||||
assert.Empty(t, test.expectedBackedup)
|
||||
assert.Empty(t, test.expectedSkipped)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,10 +63,9 @@ type restorer struct {
|
||||
kubeClient kubernetes.Interface
|
||||
crClient ctrlclient.Client
|
||||
|
||||
resultsLock sync.Mutex
|
||||
results map[string]chan *velerov1api.PodVolumeRestore
|
||||
nodeAgentCheck chan error
|
||||
log logrus.FieldLogger
|
||||
resultsLock sync.Mutex
|
||||
results map[string]chan *velerov1api.PodVolumeRestore
|
||||
log logrus.FieldLogger
|
||||
}
|
||||
|
||||
func newRestorer(
|
||||
@@ -153,7 +152,7 @@ func (r *restorer) RestorePodVolumes(data RestoreData, tracker *volume.RestoreVo
|
||||
r.results[resultsKey(data.Pod.Namespace, data.Pod.Name)] = resultsChan
|
||||
r.resultsLock.Unlock()
|
||||
|
||||
r.nodeAgentCheck = make(chan error)
|
||||
nodeAgentCheck := make(chan error)
|
||||
|
||||
var (
|
||||
errs []error
|
||||
@@ -217,7 +216,7 @@ func (r *restorer) RestorePodVolumes(data RestoreData, tracker *volume.RestoreVo
|
||||
err = nodeagent.IsRunningInNode(checkCtx, data.Restore.Namespace, nodeName, r.crClient)
|
||||
if err != nil {
|
||||
r.log.WithField("node", nodeName).WithError(err).Error("node-agent pod is not running in node, abort the restore")
|
||||
r.nodeAgentCheck <- errors.Wrapf(err, "node-agent pod is not running in node %s", nodeName)
|
||||
nodeAgentCheck <- errors.Wrapf(err, "node-agent pod is not running in node %s", nodeName)
|
||||
}
|
||||
}
|
||||
}()
|
||||
@@ -235,7 +234,7 @@ ForEachVolume:
|
||||
errs = append(errs, errors.Errorf("pod volume restore canceled: %s", res.Status.Message))
|
||||
}
|
||||
tracker.TrackPodVolume(res)
|
||||
case err := <-r.nodeAgentCheck:
|
||||
case err := <-nodeAgentCheck:
|
||||
errs = append(errs, err)
|
||||
break ForEachVolume
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ func WaitJobComplete(cli client.Client, ctx context.Context, jobName, ns string,
|
||||
if maintenanceJob.Status.Failed > 0 {
|
||||
if r, err := getResultFromJob(cli, maintenanceJob); err != nil {
|
||||
log.WithError(err).Warn("Failed to get maintenance job result")
|
||||
result = "Repo maintenance failed but result is not retrieveable"
|
||||
result = "Repo maintenance failed but result is not retrievable"
|
||||
} else {
|
||||
result = r
|
||||
}
|
||||
@@ -414,7 +414,7 @@ func WaitAllJobsComplete(ctx context.Context, cli client.Client, repo *velerov1a
|
||||
if job.Status.Failed > 0 {
|
||||
if msg, err := getResultFromJob(cli, job); err != nil {
|
||||
log.WithError(err).Warnf("Failed to get result of maintenance job %s", job.Name)
|
||||
message = fmt.Sprintf("Repo maintenance failed but result is not retrieveable, err: %v", err)
|
||||
message = fmt.Sprintf("Repo maintenance failed but result is not retrievable, err: %v", err)
|
||||
} else {
|
||||
message = msg
|
||||
}
|
||||
|
||||
@@ -789,7 +789,7 @@ func TestWaitAllJobsComplete(t *testing.T) {
|
||||
{
|
||||
Result: velerov1api.BackupRepositoryMaintenanceFailed,
|
||||
StartTimestamp: &metav1.Time{Time: now.Add(time.Hour)},
|
||||
Message: "Repo maintenance failed but result is not retrieveable, err: no pod found for job job2",
|
||||
Message: "Repo maintenance failed but result is not retrievable, err: no pod found for job job2",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -384,7 +384,7 @@ func (urp *unifiedRepoProvider) BatchForget(ctx context.Context, snapshotIDs []s
|
||||
|
||||
err = bkRepo.Flush(ctx)
|
||||
if err != nil {
|
||||
return []error{errors.Wrap(err, "error to flush repo")}
|
||||
return append(errs, errors.Wrap(err, "error to flush repo"))
|
||||
}
|
||||
|
||||
log.Debug("Forget snapshot complete")
|
||||
|
||||
@@ -1062,6 +1062,41 @@ func TestBatchForget(t *testing.T) {
|
||||
},
|
||||
expectedErr: []string{"error to flush repo: fake-error-4"},
|
||||
},
|
||||
{
|
||||
name: "delete and flush fail",
|
||||
getter: new(credmock.SecretStore),
|
||||
credStoreReturn: "fake-password",
|
||||
funcTable: localFuncTable{
|
||||
getStorageVariables: func(*velerov1api.BackupStorageLocation, string, string, map[string]string, velerocredentials.CredentialGetter) (map[string]string, error) {
|
||||
return map[string]string{}, nil
|
||||
},
|
||||
getStorageCredentials: func(*velerov1api.BackupStorageLocation, velerocredentials.FileStore) (map[string]string, error) {
|
||||
return map[string]string{}, nil
|
||||
},
|
||||
},
|
||||
repoService: new(reposervicenmocks.BackupRepoService),
|
||||
backupRepo: new(reposervicenmocks.BackupRepo),
|
||||
retFuncOpen: []any{
|
||||
func(context.Context, udmrepo.RepoOptions) udmrepo.BackupRepo {
|
||||
return backupRepo
|
||||
},
|
||||
|
||||
func(context.Context, udmrepo.RepoOptions) error {
|
||||
return nil
|
||||
},
|
||||
},
|
||||
retFuncDelete: func(context.Context, udmrepo.ID) error {
|
||||
return errors.New("fake-delete-error")
|
||||
},
|
||||
retFuncFlush: func(context.Context) error {
|
||||
return errors.New("fake-flush-error")
|
||||
},
|
||||
snapshots: []string{"snapshot-1"},
|
||||
expectedErr: []string{
|
||||
"error to delete manifest snapshot-1: fake-delete-error",
|
||||
"error to flush repo: fake-flush-error",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
|
||||
@@ -73,8 +73,22 @@ type logThrottle struct {
|
||||
interval time.Duration
|
||||
}
|
||||
|
||||
type objectPrefetch struct {
|
||||
ctx context.Context
|
||||
cancel context.CancelFunc
|
||||
entries []object.IndirectObjectEntry
|
||||
curOffset int64
|
||||
cond *sync.Cond
|
||||
mu sync.Mutex
|
||||
nextEntry int
|
||||
budget int64
|
||||
}
|
||||
|
||||
type kopiaObjectReader struct {
|
||||
rawReader object.Reader
|
||||
rawRepo repo.Repository
|
||||
prefetch *objectPrefetch
|
||||
logger logrus.FieldLogger
|
||||
}
|
||||
|
||||
type kopiaObjectWriter struct {
|
||||
@@ -338,7 +352,7 @@ func (km *kopiaMaintenance) maintainProgress(uploaded int64) {
|
||||
}
|
||||
}
|
||||
|
||||
func (kr *kopiaRepository) OpenObject(ctx context.Context, id udmrepo.ID) (udmrepo.ObjectReader, error) {
|
||||
func (kr *kopiaRepository) OpenObject(ctx context.Context, id udmrepo.ID, opt udmrepo.ObjectReadOptions) (udmrepo.ObjectReader, error) {
|
||||
if kr.rawRepo == nil {
|
||||
return nil, errors.New("repo is closed or not open")
|
||||
}
|
||||
@@ -353,9 +367,42 @@ func (kr *kopiaRepository) OpenObject(ctx context.Context, id udmrepo.ID) (udmre
|
||||
return nil, errors.Wrap(err, "error to open object")
|
||||
}
|
||||
|
||||
return &kopiaObjectReader{
|
||||
var prefetch *objectPrefetch
|
||||
if opt.Prefetch {
|
||||
if e, err := kr.getFlattenedEntries(ctx, objID); err != nil {
|
||||
kr.logger.WithError(err).Warnf("Failed to load entries for object %v, skip prefetch", id)
|
||||
} else {
|
||||
pCtx, pCancel := context.WithCancel(ctx)
|
||||
prefetch = &objectPrefetch{
|
||||
ctx: pCtx,
|
||||
cancel: pCancel,
|
||||
budget: int64(opt.PrefetchBudgetMB) << 20,
|
||||
entries: e,
|
||||
}
|
||||
|
||||
prefetch.cond = sync.NewCond(&prefetch.mu)
|
||||
}
|
||||
}
|
||||
|
||||
rd := &kopiaObjectReader{
|
||||
rawReader: reader,
|
||||
}, nil
|
||||
rawRepo: kr.rawRepo,
|
||||
prefetch: prefetch,
|
||||
logger: kr.logger,
|
||||
}
|
||||
|
||||
if rd.prefetch != nil {
|
||||
go rd.prefetchProc()
|
||||
|
||||
go func() {
|
||||
<-rd.prefetch.ctx.Done()
|
||||
prefetch.mu.Lock()
|
||||
prefetch.cond.Broadcast()
|
||||
prefetch.mu.Unlock()
|
||||
}()
|
||||
}
|
||||
|
||||
return rd, nil
|
||||
}
|
||||
|
||||
func (kr *kopiaRepository) GetManifest(ctx context.Context, id udmrepo.ID, mani *udmrepo.RepoManifest) error {
|
||||
@@ -550,7 +597,7 @@ func (kr *kopiaRepository) WriteMetadata(ctx context.Context, meta *udmrepo.Meta
|
||||
}
|
||||
|
||||
func (kr *kopiaRepository) ReadMetadata(ctx context.Context, id udmrepo.ID) (*udmrepo.Metadata, error) {
|
||||
reader, err := kr.OpenObject(ctx, id)
|
||||
reader, err := kr.OpenObject(ctx, id, udmrepo.ObjectReadOptions{})
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "error to open metadata object %v", id)
|
||||
}
|
||||
@@ -792,7 +839,16 @@ func (kor *kopiaObjectReader) Read(p []byte) (int, error) {
|
||||
return 0, errors.New("object reader is closed or not open")
|
||||
}
|
||||
|
||||
return kor.rawReader.Read(p)
|
||||
n, err := kor.rawReader.Read(p)
|
||||
if n > 0 {
|
||||
if kor.prefetch != nil {
|
||||
kor.prefetch.mu.Lock()
|
||||
kor.prefetch.curOffset += int64(n)
|
||||
kor.prefetch.cond.Signal()
|
||||
kor.prefetch.mu.Unlock()
|
||||
}
|
||||
}
|
||||
return n, err
|
||||
}
|
||||
|
||||
func (kor *kopiaObjectReader) Seek(offset int64, whence int) (int64, error) {
|
||||
@@ -800,10 +856,83 @@ func (kor *kopiaObjectReader) Seek(offset int64, whence int) (int64, error) {
|
||||
return -1, errors.New("object reader is closed or not open")
|
||||
}
|
||||
|
||||
return kor.rawReader.Seek(offset, whence)
|
||||
off, err := kor.rawReader.Seek(offset, whence)
|
||||
if err == nil {
|
||||
if kor.prefetch != nil {
|
||||
kor.prefetch.mu.Lock()
|
||||
kor.prefetch.curOffset = off
|
||||
kor.prefetch.cond.Signal()
|
||||
kor.prefetch.mu.Unlock()
|
||||
}
|
||||
}
|
||||
|
||||
return off, err
|
||||
}
|
||||
|
||||
func (kor *kopiaObjectReader) prefetchProc() {
|
||||
prefetch := kor.prefetch
|
||||
if prefetch == nil {
|
||||
return
|
||||
}
|
||||
|
||||
for {
|
||||
prefetch.mu.Lock()
|
||||
|
||||
select {
|
||||
case <-prefetch.ctx.Done():
|
||||
prefetch.mu.Unlock()
|
||||
return
|
||||
default:
|
||||
}
|
||||
|
||||
curOffset := prefetch.curOffset
|
||||
|
||||
for prefetch.nextEntry < len(prefetch.entries) {
|
||||
entry := prefetch.entries[prefetch.nextEntry]
|
||||
if entry.Start+entry.Length <= curOffset {
|
||||
prefetch.nextEntry++
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if prefetch.nextEntry >= len(prefetch.entries) {
|
||||
prefetch.mu.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
var toFetch []object.ID
|
||||
for prefetch.nextEntry < len(prefetch.entries) {
|
||||
entry := prefetch.entries[prefetch.nextEntry]
|
||||
|
||||
if entry.Start > curOffset+prefetch.budget {
|
||||
break
|
||||
}
|
||||
|
||||
toFetch = append(toFetch, entry.Object)
|
||||
prefetch.nextEntry++
|
||||
}
|
||||
|
||||
if len(toFetch) == 0 {
|
||||
prefetch.cond.Wait()
|
||||
prefetch.mu.Unlock()
|
||||
continue
|
||||
}
|
||||
|
||||
prefetch.mu.Unlock()
|
||||
|
||||
_, err := kor.rawRepo.PrefetchObjects(prefetch.ctx, toFetch, "")
|
||||
if err != nil && err != context.Canceled {
|
||||
kor.logger.WithError(err).Warnf("Failed to prefetch contents for offset %v", curOffset)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (kor *kopiaObjectReader) Close() error {
|
||||
if kor.prefetch != nil && kor.prefetch.cancel != nil {
|
||||
kor.prefetch.cancel()
|
||||
}
|
||||
|
||||
if kor.rawReader == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -22,12 +22,14 @@ import (
|
||||
"encoding/json"
|
||||
"math"
|
||||
"os"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/kopia/kopia/fs"
|
||||
"github.com/kopia/kopia/repo"
|
||||
"github.com/kopia/kopia/repo/content"
|
||||
"github.com/kopia/kopia/repo/manifest"
|
||||
"github.com/kopia/kopia/repo/object"
|
||||
"github.com/kopia/kopia/snapshot"
|
||||
@@ -285,6 +287,7 @@ func TestOpenObject(t *testing.T) {
|
||||
name string
|
||||
rawRepo *repomocks.MockRepository
|
||||
objectID string
|
||||
opt udmrepo.ObjectReadOptions
|
||||
retErr error
|
||||
expectedErr string
|
||||
}{
|
||||
@@ -304,21 +307,38 @@ func TestOpenObject(t *testing.T) {
|
||||
retErr: errors.New("fake-open-error"),
|
||||
expectedErr: "error to open object: fake-open-error",
|
||||
},
|
||||
{
|
||||
name: "raw open success, without prefetch",
|
||||
rawRepo: repomocks.NewMockRepository(t),
|
||||
objectID: "D0123456789abcdef0123456789abcdef",
|
||||
},
|
||||
{
|
||||
name: "raw open success, with prefetch",
|
||||
rawRepo: repomocks.NewMockRepository(t),
|
||||
objectID: "D0123456789abcdef0123456789abcdef",
|
||||
opt: udmrepo.ObjectReadOptions{Prefetch: true, PrefetchBudgetMB: 10},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
kr := &kopiaRepository{}
|
||||
kr := &kopiaRepository{
|
||||
logger: velerotest.NewLogger(),
|
||||
}
|
||||
|
||||
if tc.rawRepo != nil {
|
||||
if tc.retErr != nil {
|
||||
tc.rawRepo.On("OpenObject", mock.Anything, mock.Anything).Return(nil, tc.retErr)
|
||||
if tc.name != "objectID is invalid" {
|
||||
if tc.retErr != nil {
|
||||
tc.rawRepo.On("OpenObject", mock.Anything, mock.Anything).Return(nil, tc.retErr)
|
||||
} else {
|
||||
tc.rawRepo.On("OpenObject", mock.Anything, mock.Anything).Return(nil, nil)
|
||||
}
|
||||
}
|
||||
|
||||
kr.rawRepo = tc.rawRepo
|
||||
}
|
||||
|
||||
_, err := kr.OpenObject(t.Context(), udmrepo.ID(tc.objectID))
|
||||
_, err := kr.OpenObject(t.Context(), udmrepo.ID(tc.objectID), tc.opt)
|
||||
|
||||
if tc.expectedErr == "" {
|
||||
assert.NoError(t, err)
|
||||
@@ -845,6 +865,7 @@ func TestReaderClose(t *testing.T) {
|
||||
name string
|
||||
rawObjReader *repomocks.Reader
|
||||
rawReaderRetErr error
|
||||
withPrefetch bool
|
||||
expectedErr string
|
||||
}{
|
||||
{
|
||||
@@ -860,6 +881,11 @@ func TestReaderClose(t *testing.T) {
|
||||
name: "succeed",
|
||||
rawObjReader: repomocks.NewReader(t),
|
||||
},
|
||||
{
|
||||
name: "succeed with prefetch",
|
||||
rawObjReader: repomocks.NewReader(t),
|
||||
withPrefetch: true,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
@@ -871,8 +897,20 @@ func TestReaderClose(t *testing.T) {
|
||||
kr.rawReader = tc.rawObjReader
|
||||
}
|
||||
|
||||
if tc.withPrefetch {
|
||||
ctx, cancel := context.WithCancel(t.Context())
|
||||
kr.prefetch = &objectPrefetch{
|
||||
ctx: ctx,
|
||||
cancel: cancel,
|
||||
}
|
||||
}
|
||||
|
||||
err := kr.Close()
|
||||
|
||||
if tc.withPrefetch {
|
||||
require.ErrorIs(t, kr.prefetch.ctx.Err(), context.Canceled)
|
||||
}
|
||||
|
||||
if tc.expectedErr == "" {
|
||||
assert.NoError(t, err)
|
||||
} else {
|
||||
@@ -1832,3 +1870,173 @@ func TestListSnapshot(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func mustParseID(s string) object.ID {
|
||||
id, _ := object.ParseID(s)
|
||||
return id
|
||||
}
|
||||
|
||||
func TestPrefetchProc(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
setupPrefetch func(ctx context.Context, cancel context.CancelFunc) *objectPrefetch
|
||||
mockRepo func(mockRepo *repomocks.MockRepository)
|
||||
runConcurrently bool
|
||||
trigger func(prefetch *objectPrefetch)
|
||||
}{
|
||||
{
|
||||
name: "nil prefetch",
|
||||
setupPrefetch: func(ctx context.Context, cancel context.CancelFunc) *objectPrefetch {
|
||||
return nil
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "context canceled",
|
||||
setupPrefetch: func(ctx context.Context, cancel context.CancelFunc) *objectPrefetch {
|
||||
cancel()
|
||||
p := &objectPrefetch{
|
||||
ctx: ctx,
|
||||
}
|
||||
p.cond = sync.NewCond(&p.mu)
|
||||
return p
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "fetch all entries and exit",
|
||||
setupPrefetch: func(ctx context.Context, cancel context.CancelFunc) *objectPrefetch {
|
||||
p := &objectPrefetch{
|
||||
ctx: ctx,
|
||||
entries: []object.IndirectObjectEntry{
|
||||
{Start: 0, Length: 100, Object: mustParseID("D0123456789abcdef0123456789abcdef")},
|
||||
{Start: 100, Length: 100, Object: mustParseID("D0123456789abcdef0123456789abcdeg")},
|
||||
},
|
||||
budget: 200,
|
||||
curOffset: 0,
|
||||
}
|
||||
p.cond = sync.NewCond(&p.mu)
|
||||
return p
|
||||
},
|
||||
mockRepo: func(mockRepo *repomocks.MockRepository) {
|
||||
mockRepo.On("PrefetchObjects", mock.Anything, []object.ID{mustParseID("D0123456789abcdef0123456789abcdef"), mustParseID("D0123456789abcdef0123456789abcdeg")}, "").Return(([]content.ID)(nil), nil).Once()
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "fetch partial, wait, and fetch rest",
|
||||
runConcurrently: true,
|
||||
setupPrefetch: func(ctx context.Context, cancel context.CancelFunc) *objectPrefetch {
|
||||
p := &objectPrefetch{
|
||||
ctx: ctx,
|
||||
entries: []object.IndirectObjectEntry{
|
||||
{Start: 0, Length: 100, Object: mustParseID("D0123456789abcdef0123456789abcdef")},
|
||||
{Start: 100, Length: 100, Object: mustParseID("D0123456789abcdef0123456789abcdeg")},
|
||||
},
|
||||
budget: 50,
|
||||
curOffset: 0,
|
||||
}
|
||||
p.cond = sync.NewCond(&p.mu)
|
||||
return p
|
||||
},
|
||||
mockRepo: func(mockRepo *repomocks.MockRepository) {
|
||||
mockRepo.On("PrefetchObjects", mock.Anything, []object.ID{mustParseID("D0123456789abcdef0123456789abcdef")}, "").Return(([]content.ID)(nil), nil).Once()
|
||||
mockRepo.On("PrefetchObjects", mock.Anything, []object.ID{mustParseID("D0123456789abcdef0123456789abcdeg")}, "").Return(([]content.ID)(nil), nil).Once()
|
||||
},
|
||||
trigger: func(prefetch *objectPrefetch) {
|
||||
// Wait a bit for the first fetch and wait to happen
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
prefetch.mu.Lock()
|
||||
prefetch.curOffset = 100
|
||||
prefetch.cond.Signal()
|
||||
prefetch.mu.Unlock()
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "cancel while waiting on cond",
|
||||
runConcurrently: true,
|
||||
setupPrefetch: func(ctx context.Context, cancel context.CancelFunc) *objectPrefetch {
|
||||
p := &objectPrefetch{
|
||||
ctx: ctx,
|
||||
cancel: cancel,
|
||||
entries: []object.IndirectObjectEntry{
|
||||
{Start: 0, Length: 100, Object: mustParseID("D0123456789abcdef0123456789abcdef")},
|
||||
{Start: 100, Length: 100, Object: mustParseID("D0123456789abcdef0123456789abcdeg")},
|
||||
},
|
||||
budget: 50,
|
||||
curOffset: 0,
|
||||
}
|
||||
p.cond = sync.NewCond(&p.mu)
|
||||
// Simulate the watcher goroutine spawned in OpenObject
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
p.mu.Lock()
|
||||
p.cond.Broadcast()
|
||||
p.mu.Unlock()
|
||||
}()
|
||||
return p
|
||||
},
|
||||
mockRepo: func(mockRepo *repomocks.MockRepository) {
|
||||
mockRepo.On("PrefetchObjects", mock.Anything, []object.ID{mustParseID("D0123456789abcdef0123456789abcdef")}, "").Return(([]content.ID)(nil), nil).Once()
|
||||
},
|
||||
trigger: func(prefetch *objectPrefetch) {
|
||||
// Wait a bit for the first fetch and wait to happen
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
prefetch.cancel() // This triggers the watcher, broadcasts, and exits prefetchProc
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "prefetch error should not panic and continue",
|
||||
setupPrefetch: func(ctx context.Context, cancel context.CancelFunc) *objectPrefetch {
|
||||
p := &objectPrefetch{
|
||||
ctx: ctx,
|
||||
entries: []object.IndirectObjectEntry{
|
||||
{Start: 0, Length: 100, Object: mustParseID("D0123456789abcdef0123456789abcdef")},
|
||||
},
|
||||
budget: 200,
|
||||
curOffset: 0,
|
||||
}
|
||||
p.cond = sync.NewCond(&p.mu)
|
||||
return p
|
||||
},
|
||||
mockRepo: func(mockRepo *repomocks.MockRepository) {
|
||||
mockRepo.On("PrefetchObjects", mock.Anything, []object.ID{mustParseID("D0123456789abcdef0123456789abcdef")}, "").Return(([]content.ID)(nil), errors.New("fake-error")).Once()
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(t.Context())
|
||||
defer cancel()
|
||||
|
||||
mockRepo := repomocks.NewMockRepository(t)
|
||||
if tc.mockRepo != nil {
|
||||
tc.mockRepo(mockRepo)
|
||||
}
|
||||
|
||||
kor := &kopiaObjectReader{
|
||||
rawRepo: mockRepo,
|
||||
logger: velerotest.NewLogger(),
|
||||
prefetch: tc.setupPrefetch(ctx, cancel),
|
||||
}
|
||||
|
||||
if tc.runConcurrently {
|
||||
done := make(chan struct{})
|
||||
go func() {
|
||||
kor.prefetchProc()
|
||||
close(done)
|
||||
}()
|
||||
if tc.trigger != nil {
|
||||
tc.trigger(kor.prefetch)
|
||||
}
|
||||
select {
|
||||
case <-done:
|
||||
case <-time.After(2 * time.Second):
|
||||
t.Fatal("prefetchProc did not finish in time")
|
||||
}
|
||||
} else {
|
||||
kor.prefetchProc()
|
||||
}
|
||||
|
||||
mockRepo.AssertExpectations(t)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,8 +699,8 @@ func (_c *BackupRepo_NewObjectWriter_Call) RunAndReturn(run func(ctx context.Con
|
||||
}
|
||||
|
||||
// OpenObject provides a mock function for the type BackupRepo
|
||||
func (_mock *BackupRepo) OpenObject(ctx context.Context, id udmrepo.ID) (udmrepo.ObjectReader, error) {
|
||||
ret := _mock.Called(ctx, id)
|
||||
func (_mock *BackupRepo) OpenObject(ctx context.Context, id udmrepo.ID, opt udmrepo.ObjectReadOptions) (udmrepo.ObjectReader, error) {
|
||||
ret := _mock.Called(ctx, id, opt)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for OpenObject")
|
||||
@@ -708,18 +708,18 @@ func (_mock *BackupRepo) OpenObject(ctx context.Context, id udmrepo.ID) (udmrepo
|
||||
|
||||
var r0 udmrepo.ObjectReader
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, udmrepo.ID) (udmrepo.ObjectReader, error)); ok {
|
||||
return returnFunc(ctx, id)
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, udmrepo.ID, udmrepo.ObjectReadOptions) (udmrepo.ObjectReader, error)); ok {
|
||||
return returnFunc(ctx, id, opt)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, udmrepo.ID) udmrepo.ObjectReader); ok {
|
||||
r0 = returnFunc(ctx, id)
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, udmrepo.ID, udmrepo.ObjectReadOptions) udmrepo.ObjectReader); ok {
|
||||
r0 = returnFunc(ctx, id, opt)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(udmrepo.ObjectReader)
|
||||
}
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(context.Context, udmrepo.ID) error); ok {
|
||||
r1 = returnFunc(ctx, id)
|
||||
if returnFunc, ok := ret.Get(1).(func(context.Context, udmrepo.ID, udmrepo.ObjectReadOptions) error); ok {
|
||||
r1 = returnFunc(ctx, id, opt)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -734,11 +734,12 @@ type BackupRepo_OpenObject_Call struct {
|
||||
// OpenObject is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - id udmrepo.ID
|
||||
func (_e *BackupRepo_Expecter) OpenObject(ctx interface{}, id interface{}) *BackupRepo_OpenObject_Call {
|
||||
return &BackupRepo_OpenObject_Call{Call: _e.mock.On("OpenObject", ctx, id)}
|
||||
// - opt udmrepo.ObjectReadOptions
|
||||
func (_e *BackupRepo_Expecter) OpenObject(ctx interface{}, id interface{}, opt interface{}) *BackupRepo_OpenObject_Call {
|
||||
return &BackupRepo_OpenObject_Call{Call: _e.mock.On("OpenObject", ctx, id, opt)}
|
||||
}
|
||||
|
||||
func (_c *BackupRepo_OpenObject_Call) Run(run func(ctx context.Context, id udmrepo.ID)) *BackupRepo_OpenObject_Call {
|
||||
func (_c *BackupRepo_OpenObject_Call) Run(run func(ctx context.Context, id udmrepo.ID, opt udmrepo.ObjectReadOptions)) *BackupRepo_OpenObject_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
@@ -748,9 +749,14 @@ func (_c *BackupRepo_OpenObject_Call) Run(run func(ctx context.Context, id udmre
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(udmrepo.ID)
|
||||
}
|
||||
var arg2 udmrepo.ObjectReadOptions
|
||||
if args[2] != nil {
|
||||
arg2 = args[2].(udmrepo.ObjectReadOptions)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
@@ -761,7 +767,7 @@ func (_c *BackupRepo_OpenObject_Call) Return(objectReader udmrepo.ObjectReader,
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *BackupRepo_OpenObject_Call) RunAndReturn(run func(ctx context.Context, id udmrepo.ID) (udmrepo.ObjectReader, error)) *BackupRepo_OpenObject_Call {
|
||||
func (_c *BackupRepo_OpenObject_Call) RunAndReturn(run func(ctx context.Context, id udmrepo.ID, opt udmrepo.ObjectReadOptions) (udmrepo.ObjectReader, error)) *BackupRepo_OpenObject_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
@@ -72,6 +72,11 @@ type ObjectWriteOptions struct {
|
||||
ParentObject ID // The object in the previous snapshot, for incremental backup
|
||||
}
|
||||
|
||||
type ObjectReadOptions struct {
|
||||
Prefetch bool
|
||||
PrefetchBudgetMB int
|
||||
}
|
||||
|
||||
type AdvancedFeatureInfo struct {
|
||||
MultiPartBackup bool // if set to true, it means the repo supports multiple-part backup
|
||||
}
|
||||
@@ -136,7 +141,7 @@ type BackupRepoService interface {
|
||||
type BackupRepo interface {
|
||||
// OpenObject opens an existing object for read.
|
||||
// id: the object's unified identifier.
|
||||
OpenObject(ctx context.Context, id ID) (ObjectReader, error)
|
||||
OpenObject(ctx context.Context, id ID, opt ObjectReadOptions) (ObjectReader, error)
|
||||
|
||||
// GetManifest gets a manifest data from the backup repository.
|
||||
GetManifest(ctx context.Context, id ID, mani *RepoManifest) error
|
||||
|
||||
@@ -82,6 +82,9 @@ func (d *DataUploadRetrieveAction) Execute(input *velero.RestoreItemActionExecut
|
||||
NodeOS: dataUpload.Status.NodeOS,
|
||||
FSType: dataUpload.Spec.SourceFSType,
|
||||
}
|
||||
if dataUpload.Spec.CSISnapshot != nil {
|
||||
dataUploadResult.SnapshotClass = dataUpload.Spec.CSISnapshot.SnapshotClass
|
||||
}
|
||||
|
||||
jsonBytes, err := json.Marshal(dataUploadResult)
|
||||
if err != nil {
|
||||
|
||||
@@ -66,6 +66,29 @@ func TestDataUploadRetrieveActionExectue(t *testing.T) {
|
||||
},
|
||||
expectedDataUploadResult: builder.ForConfigMap("velero", "").ObjectMeta(builder.WithGenerateName("testDU-"), builder.WithLabels(velerov1.PVCNamespaceNameLabel, "testNamespace.testPVC", velerov1.RestoreUIDLabel, "testingUID", velerov1.ResourceUsageLabel, string(velerov1.VeleroResourceUsageDataUploadResult))).Data("testingUID", `{"backupStorageLocation":"testLocation","snapshotID":"fake-id","sourceNamespace":"testNamespace","snapshotSize":1000}`).Result(),
|
||||
},
|
||||
{
|
||||
name: "DataUploadRetrieve Action test with optional fields",
|
||||
dataUpload: func() *velerov2alpha1.DataUpload {
|
||||
du := builder.ForDataUpload("velero", "testDU").
|
||||
SourceNamespace("testNamespace").
|
||||
SourcePVC("testPVC").
|
||||
SnapshotID("fake-id").
|
||||
TotalBytes(1000).
|
||||
DataMover("velero").
|
||||
NodeOS("linux").
|
||||
CSISnapshot(&velerov2alpha1.CSISnapshotSpec{SnapshotClass: "testClass"}).
|
||||
Result()
|
||||
du.Status.DataMoverResult = &map[string]string{"key": "value"}
|
||||
du.Spec.SourceFSType = "ext4"
|
||||
return du
|
||||
}(),
|
||||
restore: builder.ForRestore("velero", "testRestore").ObjectMeta(builder.WithUID("testingUID")).Backup("testBackup").Result(),
|
||||
runtimeScheme: scheme,
|
||||
veleroObjs: []runtime.Object{
|
||||
builder.ForBackup("velero", "testBackup").StorageLocation("testLocation").Result(),
|
||||
},
|
||||
expectedDataUploadResult: builder.ForConfigMap("velero", "").ObjectMeta(builder.WithGenerateName("testDU-"), builder.WithLabels(velerov1.PVCNamespaceNameLabel, "testNamespace.testPVC", velerov1.RestoreUIDLabel, "testingUID", velerov1.ResourceUsageLabel, string(velerov1.VeleroResourceUsageDataUploadResult))).Data("testingUID", `{"backupStorageLocation":"testLocation","datamover":"velero","snapshotID":"fake-id","sourceNamespace":"testNamespace","dataMoverResult":{"key":"value"},"nodeOS":"linux","snapshotSize":1000,"fsType":"ext4","snapshotClass":"testClass"}`).Result(),
|
||||
},
|
||||
{
|
||||
name: "Long source namespace and PVC name should also work",
|
||||
dataUpload: builder.ForDataUpload("velero", "testDU").SourceNamespace("migre209d0da-49c7-45ba-8d5a-3e59fd591ec1").SourcePVC("kibishii-data-kibishii-deployment-0").Result(),
|
||||
|
||||
@@ -198,6 +198,25 @@ func (a *PodVolumeRestoreAction) Execute(input *velero.RestoreItemActionExecuteI
|
||||
securityContext = *pod.Spec.Containers[0].SecurityContext.DeepCopy()
|
||||
securityContextSet = true
|
||||
}
|
||||
// if no configmap or container-level securityContext is set, fall back to the pod-level
|
||||
// spec.securityContext runAsUser/runAsGroup: the workload's own identity is the one that
|
||||
// wrote the restored files, so it's the one that can read them back
|
||||
if !securityContextSet && pod.Spec.SecurityContext != nil &&
|
||||
(pod.Spec.SecurityContext.RunAsUser != nil || pod.Spec.SecurityContext.RunAsGroup != nil) {
|
||||
securityContext = defaultSecurityCtx()
|
||||
if pod.Spec.SecurityContext.RunAsUser != nil {
|
||||
securityContext.RunAsUser = pod.Spec.SecurityContext.RunAsUser
|
||||
// defaultSecurityCtx() hardcodes RunAsNonRoot: true, which contradicts a pod-level
|
||||
// RunAsUser of 0 (root); defer to the pod's own RunAsNonRoot setting in that case
|
||||
if *pod.Spec.SecurityContext.RunAsUser == 0 {
|
||||
securityContext.RunAsNonRoot = pod.Spec.SecurityContext.RunAsNonRoot
|
||||
}
|
||||
}
|
||||
if pod.Spec.SecurityContext.RunAsGroup != nil {
|
||||
securityContext.RunAsGroup = pod.Spec.SecurityContext.RunAsGroup
|
||||
}
|
||||
securityContextSet = true
|
||||
}
|
||||
if !securityContextSet {
|
||||
securityContext = defaultSecurityCtx()
|
||||
}
|
||||
|
||||
@@ -156,6 +156,155 @@ func TestPodVolumeRestoreActionExecute(t *testing.T) {
|
||||
|
||||
defaultRestoreHelperImage := "velero/velero:v1.0"
|
||||
|
||||
podLevelUID := int64(999)
|
||||
podLevelGID := int64(999)
|
||||
podLevelSecurityContext := corev1api.SecurityContext{
|
||||
AllowPrivilegeEscalation: boolptr.False(),
|
||||
Capabilities: &corev1api.Capabilities{
|
||||
Drop: []corev1api.Capability{"ALL"},
|
||||
},
|
||||
SeccompProfile: &corev1api.SeccompProfile{
|
||||
Type: corev1api.SeccompProfileTypeRuntimeDefault,
|
||||
},
|
||||
RunAsUser: &podLevelUID,
|
||||
RunAsGroup: &podLevelGID,
|
||||
RunAsNonRoot: boolptr.True(),
|
||||
}
|
||||
|
||||
podWithPodLevelSecurityContext := builder.ForPod("ns-1", "my-pod").
|
||||
ObjectMeta(builder.WithAnnotations("snapshot.velero.io/myvol", "")).
|
||||
Volumes(
|
||||
builder.ForVolume("myvol").PersistentVolumeClaimSource("pvc-1").Result(),
|
||||
).
|
||||
Result()
|
||||
podWithPodLevelSecurityContext.Spec.SecurityContext = &corev1api.PodSecurityContext{RunAsUser: &podLevelUID, RunAsGroup: &podLevelGID}
|
||||
|
||||
wantPodWithPodLevelSecurityContext := builder.ForPod("ns-1", "my-pod").
|
||||
ObjectMeta(builder.WithAnnotations("snapshot.velero.io/myvol", "")).
|
||||
Volumes(
|
||||
builder.ForVolume("myvol").PersistentVolumeClaimSource("pvc-1").Result(),
|
||||
).
|
||||
InitContainers(
|
||||
newRestoreInitContainerBuilder(defaultRestoreHelperImage, "").
|
||||
Resources(&resourceReqs).
|
||||
SecurityContext(&podLevelSecurityContext).
|
||||
VolumeMounts(builder.ForVolumeMount("myvol", "/restores/myvol").Result()).
|
||||
Command([]string{"/velero-restore-helper"}).Result()).
|
||||
Result()
|
||||
wantPodWithPodLevelSecurityContext.Spec.SecurityContext = &corev1api.PodSecurityContext{RunAsUser: &podLevelUID, RunAsGroup: &podLevelGID}
|
||||
|
||||
podLevelRootUID := int64(0)
|
||||
podLevelRootSecurityContext := corev1api.SecurityContext{
|
||||
AllowPrivilegeEscalation: boolptr.False(),
|
||||
Capabilities: &corev1api.Capabilities{
|
||||
Drop: []corev1api.Capability{"ALL"},
|
||||
},
|
||||
SeccompProfile: &corev1api.SeccompProfile{
|
||||
Type: corev1api.SeccompProfileTypeRuntimeDefault,
|
||||
},
|
||||
RunAsUser: &podLevelRootUID,
|
||||
}
|
||||
|
||||
podWithPodLevelRootSecurityContext := builder.ForPod("ns-1", "my-pod").
|
||||
ObjectMeta(builder.WithAnnotations("snapshot.velero.io/myvol", "")).
|
||||
Volumes(
|
||||
builder.ForVolume("myvol").PersistentVolumeClaimSource("pvc-1").Result(),
|
||||
).
|
||||
Result()
|
||||
podWithPodLevelRootSecurityContext.Spec.SecurityContext = &corev1api.PodSecurityContext{RunAsUser: &podLevelRootUID}
|
||||
|
||||
wantPodWithPodLevelRootSecurityContext := builder.ForPod("ns-1", "my-pod").
|
||||
ObjectMeta(builder.WithAnnotations("snapshot.velero.io/myvol", "")).
|
||||
Volumes(
|
||||
builder.ForVolume("myvol").PersistentVolumeClaimSource("pvc-1").Result(),
|
||||
).
|
||||
InitContainers(
|
||||
newRestoreInitContainerBuilder(defaultRestoreHelperImage, "").
|
||||
Resources(&resourceReqs).
|
||||
SecurityContext(&podLevelRootSecurityContext).
|
||||
VolumeMounts(builder.ForVolumeMount("myvol", "/restores/myvol").Result()).
|
||||
Command([]string{"/velero-restore-helper"}).Result()).
|
||||
Result()
|
||||
wantPodWithPodLevelRootSecurityContext.Spec.SecurityContext = &corev1api.PodSecurityContext{RunAsUser: &podLevelRootUID}
|
||||
|
||||
podLevelGroupOnlyGID := int64(777)
|
||||
podLevelGroupOnlySecurityContext := corev1api.SecurityContext{
|
||||
AllowPrivilegeEscalation: boolptr.False(),
|
||||
Capabilities: &corev1api.Capabilities{
|
||||
Drop: []corev1api.Capability{"ALL"},
|
||||
},
|
||||
SeccompProfile: &corev1api.SeccompProfile{
|
||||
Type: corev1api.SeccompProfileTypeRuntimeDefault,
|
||||
},
|
||||
RunAsUser: &id,
|
||||
RunAsGroup: &podLevelGroupOnlyGID,
|
||||
RunAsNonRoot: boolptr.True(),
|
||||
}
|
||||
|
||||
podWithPodLevelGroupOnlySecurityContext := builder.ForPod("ns-1", "my-pod").
|
||||
ObjectMeta(builder.WithAnnotations("snapshot.velero.io/myvol", "")).
|
||||
Volumes(
|
||||
builder.ForVolume("myvol").PersistentVolumeClaimSource("pvc-1").Result(),
|
||||
).
|
||||
Result()
|
||||
podWithPodLevelGroupOnlySecurityContext.Spec.SecurityContext = &corev1api.PodSecurityContext{RunAsGroup: &podLevelGroupOnlyGID}
|
||||
|
||||
wantPodWithPodLevelGroupOnlySecurityContext := builder.ForPod("ns-1", "my-pod").
|
||||
ObjectMeta(builder.WithAnnotations("snapshot.velero.io/myvol", "")).
|
||||
Volumes(
|
||||
builder.ForVolume("myvol").PersistentVolumeClaimSource("pvc-1").Result(),
|
||||
).
|
||||
InitContainers(
|
||||
newRestoreInitContainerBuilder(defaultRestoreHelperImage, "").
|
||||
Resources(&resourceReqs).
|
||||
SecurityContext(&podLevelGroupOnlySecurityContext).
|
||||
VolumeMounts(builder.ForVolumeMount("myvol", "/restores/myvol").Result()).
|
||||
Command([]string{"/velero-restore-helper"}).Result()).
|
||||
Result()
|
||||
wantPodWithPodLevelGroupOnlySecurityContext.Spec.SecurityContext = &corev1api.PodSecurityContext{RunAsGroup: &podLevelGroupOnlyGID}
|
||||
|
||||
bothLevelsPodUID := int64(500)
|
||||
bothLevelsContainerUID := int64(999)
|
||||
bothLevelsContainerSecurityContext := corev1api.SecurityContext{
|
||||
AllowPrivilegeEscalation: boolptr.False(),
|
||||
Capabilities: &corev1api.Capabilities{
|
||||
Drop: []corev1api.Capability{"ALL"},
|
||||
},
|
||||
SeccompProfile: &corev1api.SeccompProfile{
|
||||
Type: corev1api.SeccompProfileTypeRuntimeDefault,
|
||||
},
|
||||
RunAsUser: &bothLevelsContainerUID,
|
||||
RunAsNonRoot: boolptr.True(),
|
||||
}
|
||||
|
||||
podWithBothLevelsSecurityContext := builder.ForPod("ns-1", "my-pod").
|
||||
ObjectMeta(builder.WithAnnotations("snapshot.velero.io/myvol", "")).
|
||||
Volumes(
|
||||
builder.ForVolume("myvol").PersistentVolumeClaimSource("pvc-1").Result(),
|
||||
).
|
||||
Containers(
|
||||
builder.ForContainer("app-container", "app-image").
|
||||
SecurityContext(&bothLevelsContainerSecurityContext).Result()).
|
||||
Result()
|
||||
podWithBothLevelsSecurityContext.Spec.SecurityContext = &corev1api.PodSecurityContext{RunAsUser: &bothLevelsPodUID}
|
||||
|
||||
wantPodWithBothLevelsSecurityContext := builder.ForPod("ns-1", "my-pod").
|
||||
ObjectMeta(builder.WithAnnotations("snapshot.velero.io/myvol", "")).
|
||||
Volumes(
|
||||
builder.ForVolume("myvol").PersistentVolumeClaimSource("pvc-1").Result(),
|
||||
).
|
||||
Containers(
|
||||
builder.ForContainer("app-container", "app-image").
|
||||
SecurityContext(&bothLevelsContainerSecurityContext).Result()).
|
||||
InitContainers(
|
||||
newRestoreInitContainerBuilder(defaultRestoreHelperImage, "").
|
||||
Resources(&resourceReqs).
|
||||
SecurityContext(&bothLevelsContainerSecurityContext).
|
||||
VolumeMounts(builder.ForVolumeMount("myvol", "/restores/myvol").Result()).
|
||||
Command([]string{"/velero-restore-helper"}).Result()).
|
||||
Result()
|
||||
wantPodWithBothLevelsSecurityContext.Spec.SecurityContext = &corev1api.PodSecurityContext{RunAsUser: &bothLevelsPodUID}
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
pod *corev1api.Pod
|
||||
@@ -350,6 +499,62 @@ func TestPodVolumeRestoreActionExecute(t *testing.T) {
|
||||
VolumeMounts(builder.ForVolumeMount("myvol", "/restores/myvol").Result()).
|
||||
Command([]string{"/velero-restore-helper"}).Result()).Result(),
|
||||
},
|
||||
{
|
||||
name: "Restoring pod with pod-level securityContext (no container-level SecurityContext) uses pod-level runAsUser/runAsGroup for the restore initContainer",
|
||||
pod: podWithPodLevelSecurityContext,
|
||||
podVolumeBackups: []runtime.Object{
|
||||
builder.ForPodVolumeBackup(veleroNs, "pvb-1").
|
||||
PodName("my-pod").
|
||||
PodNamespace("ns-1").
|
||||
Volume("myvol").
|
||||
ObjectMeta(builder.WithLabels(velerov1api.BackupNameLabel, backupName)).
|
||||
SnapshotID("foo").
|
||||
Result(),
|
||||
},
|
||||
want: wantPodWithPodLevelSecurityContext,
|
||||
},
|
||||
{
|
||||
name: "Restoring pod with pod-level securityContext.runAsUser=0 does not force RunAsNonRoot on the restore initContainer",
|
||||
pod: podWithPodLevelRootSecurityContext,
|
||||
podVolumeBackups: []runtime.Object{
|
||||
builder.ForPodVolumeBackup(veleroNs, "pvb-1").
|
||||
PodName("my-pod").
|
||||
PodNamespace("ns-1").
|
||||
Volume("myvol").
|
||||
ObjectMeta(builder.WithLabels(velerov1api.BackupNameLabel, backupName)).
|
||||
SnapshotID("foo").
|
||||
Result(),
|
||||
},
|
||||
want: wantPodWithPodLevelRootSecurityContext,
|
||||
},
|
||||
{
|
||||
name: "Restoring pod with pod-level securityContext.runAsGroup only (no runAsUser) still applies the group to the restore initContainer",
|
||||
pod: podWithPodLevelGroupOnlySecurityContext,
|
||||
podVolumeBackups: []runtime.Object{
|
||||
builder.ForPodVolumeBackup(veleroNs, "pvb-1").
|
||||
PodName("my-pod").
|
||||
PodNamespace("ns-1").
|
||||
Volume("myvol").
|
||||
ObjectMeta(builder.WithLabels(velerov1api.BackupNameLabel, backupName)).
|
||||
SnapshotID("foo").
|
||||
Result(),
|
||||
},
|
||||
want: wantPodWithPodLevelGroupOnlySecurityContext,
|
||||
},
|
||||
{
|
||||
name: "Restoring pod with both container-level and pod-level SecurityContext set uses the container-level SecurityContext for the restore initContainer (container-level takes priority)",
|
||||
pod: podWithBothLevelsSecurityContext,
|
||||
podVolumeBackups: []runtime.Object{
|
||||
builder.ForPodVolumeBackup(veleroNs, "pvb-1").
|
||||
PodName("my-pod").
|
||||
PodNamespace("ns-1").
|
||||
Volume("myvol").
|
||||
ObjectMeta(builder.WithLabels(velerov1api.BackupNameLabel, backupName)).
|
||||
SnapshotID("foo").
|
||||
Result(),
|
||||
},
|
||||
want: wantPodWithBothLevelsSecurityContext,
|
||||
},
|
||||
{
|
||||
name: "pod volume backups in a different namespace are ignored when looking for matches due to namespace scoping",
|
||||
pod: builder.ForPod("ns-1", "my-pod").
|
||||
|
||||
+40
-14
@@ -1011,11 +1011,13 @@ func (ctx *restoreContext) processSelectedResource(
|
||||
if namespace != "" && !existingNamespaces.Has(targetNS) {
|
||||
logger := ctx.log.WithField("namespace", namespace)
|
||||
|
||||
ns := getNamespace(
|
||||
logger,
|
||||
archive.GetItemFilePath(ctx.restoreDir, "namespaces", "", namespace),
|
||||
targetNS,
|
||||
)
|
||||
nsPath, err := archive.GetItemFilePath(ctx.restoreDir, "namespaces", "", namespace)
|
||||
if err != nil {
|
||||
errs.AddVeleroError(err)
|
||||
continue
|
||||
}
|
||||
|
||||
ns := getNamespace(logger, nsPath, targetNS)
|
||||
_, nsCreated, err := kube.EnsureNamespaceExistsAndIsReady(
|
||||
ns,
|
||||
ctx.namespaceClient,
|
||||
@@ -1440,7 +1442,13 @@ func (ctx *restoreContext) restoreItem(obj *unstructured.Unstructured, groupReso
|
||||
// If the namespace scoped resource should be restored, ensure that the
|
||||
// namespace into which the resource is being restored into exists.
|
||||
// This is the *remapped* namespace that we are ensuring exists.
|
||||
nsToEnsure := getNamespace(restoreLogger, archive.GetItemFilePath(ctx.restoreDir, "namespaces", "", obj.GetNamespace()), namespace)
|
||||
nsPath, err := archive.GetItemFilePath(ctx.restoreDir, "namespaces", "", obj.GetNamespace())
|
||||
if err != nil {
|
||||
errs.AddVeleroError(err)
|
||||
return warnings, errs, itemExists
|
||||
}
|
||||
|
||||
nsToEnsure := getNamespace(restoreLogger, nsPath, namespace)
|
||||
_, nsCreated, err := kube.EnsureNamespaceExistsAndIsReady(nsToEnsure, ctx.namespaceClient, ctx.resourceTerminatingTimeout, ctx.resourceDeletionStatusTracker)
|
||||
if err != nil {
|
||||
errs.AddVeleroError(err)
|
||||
@@ -1693,7 +1701,17 @@ func (ctx *restoreContext) restoreItem(obj *unstructured.Unstructured, groupReso
|
||||
|
||||
var filteredAdditionalItems []velero.ResourceIdentifier
|
||||
for _, additionalItem := range executeOutput.AdditionalItems {
|
||||
itemPath := archive.GetItemFilePath(ctx.restoreDir, additionalItem.GroupResource.String(), additionalItem.Namespace, additionalItem.Name)
|
||||
itemPath, err := archive.GetItemFilePath(ctx.restoreDir, additionalItem.GroupResource.String(), additionalItem.Namespace, additionalItem.Name)
|
||||
if err != nil {
|
||||
restoreLogger.WithError(err).WithFields(logrus.Fields{
|
||||
"additionalResource": additionalItem.GroupResource.String(),
|
||||
"additionalResourceNamespace": additionalItem.Namespace,
|
||||
"additionalResourceName": additionalItem.Name,
|
||||
}).Warn("unable to restore additional item")
|
||||
warnings.Add(additionalItem.Namespace, err)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
if _, err := ctx.fileSystem.Stat(itemPath); err != nil {
|
||||
restoreLogger.WithError(err).WithFields(logrus.Fields{
|
||||
@@ -1936,6 +1954,8 @@ func (ctx *restoreContext) restoreItem(obj *unstructured.Unstructured, groupReso
|
||||
e := errors.Errorf("could not restore, %s %q already exists. Warning: the in-cluster version is different than the backed-up version",
|
||||
obj.GetKind(), obj.GetName())
|
||||
warnings.Add(namespace, e)
|
||||
itemStatus.action = ItemRestoreResultSkipped
|
||||
ctx.restoredItems[itemKey] = itemStatus
|
||||
// existingResourcePolicy is set as update, attempt patch on the resource and add warning if it fails
|
||||
} else if resourcePolicy == velerov1api.PolicyTypeUpdate {
|
||||
// processing update as existingResourcePolicy
|
||||
@@ -1951,6 +1971,8 @@ func (ctx *restoreContext) restoreItem(obj *unstructured.Unstructured, groupReso
|
||||
// Preserved Velero behavior when existingResourcePolicy is not specified by the user
|
||||
e := errors.Errorf("could not restore, %s:%s already exists. Warning: the in-cluster version is different than the backed-up version",
|
||||
obj.GetKind(), obj.GetName())
|
||||
itemStatus.action = ItemRestoreResultSkipped
|
||||
ctx.restoredItems[itemKey] = itemStatus
|
||||
warnings.Add(namespace, e)
|
||||
}
|
||||
}
|
||||
@@ -2671,9 +2693,9 @@ func (ctx *restoreContext) getSelectedRestoreableItems(resource string, original
|
||||
|
||||
// Peek-and-map logic for unresolvable kinds
|
||||
if rf == nil && len(items) > 0 {
|
||||
peekPath := archive.GetItemFilePath(ctx.restoreDir, resourceForPath, originalNamespace, items[0])
|
||||
// Ignore unmarshal errors during peek; the main restore loop will catch and report them
|
||||
if obj, err := archive.Unmarshal(ctx.fileSystem, peekPath); err == nil {
|
||||
peekPath, pathErr := archive.GetItemFilePath(ctx.restoreDir, resourceForPath, originalNamespace, items[0])
|
||||
// Ignore path and unmarshal errors during peek; the main restore loop will catch and report them
|
||||
if obj, err := archive.Unmarshal(ctx.fileSystem, peekPath); pathErr == nil && err == nil {
|
||||
actualKind := obj.GroupVersionKind().Kind
|
||||
for _, filter := range nsFilter.resourceFilterMap {
|
||||
for _, k := range filter.originalKinds {
|
||||
@@ -2714,9 +2736,9 @@ func (ctx *restoreContext) getSelectedRestoreableItems(resource string, original
|
||||
// Note: Unlike the namespaced path, this fallback is always reachable
|
||||
// because the main restore loop does not have a fast-path skip for
|
||||
// unlisted cluster-scoped resources.
|
||||
peekPath := archive.GetItemFilePath(ctx.restoreDir, resourceForPath, originalNamespace, items[0])
|
||||
// Ignore unmarshal errors during peek; the main restore loop will catch and report them
|
||||
if obj, err := archive.Unmarshal(ctx.fileSystem, peekPath); err == nil {
|
||||
peekPath, pathErr := archive.GetItemFilePath(ctx.restoreDir, resourceForPath, originalNamespace, items[0])
|
||||
// Ignore path and unmarshal errors during peek; the main restore loop will catch and report them
|
||||
if obj, err := archive.Unmarshal(ctx.fileSystem, peekPath); pathErr == nil && err == nil {
|
||||
actualKind := obj.GroupVersionKind().Kind
|
||||
for _, filter := range ctx.clusterScopedFilterMap {
|
||||
for _, k := range filter.originalKinds {
|
||||
@@ -2742,7 +2764,11 @@ func (ctx *restoreContext) getSelectedRestoreableItems(resource string, original
|
||||
}
|
||||
|
||||
for _, item := range items {
|
||||
itemPath := archive.GetItemFilePath(ctx.restoreDir, resourceForPath, originalNamespace, item)
|
||||
itemPath, err := archive.GetItemFilePath(ctx.restoreDir, resourceForPath, originalNamespace, item)
|
||||
if err != nil {
|
||||
errs.Add(targetNamespace, err)
|
||||
continue
|
||||
}
|
||||
|
||||
obj, err := archive.Unmarshal(ctx.fileSystem, itemPath)
|
||||
if err != nil {
|
||||
|
||||
@@ -1086,6 +1086,7 @@ func TestRestoreItems(t *testing.T) {
|
||||
apiResources []*test.APIResource
|
||||
tarball io.Reader
|
||||
want []*test.APIResource
|
||||
wantWarnings Result
|
||||
expectedRestoreItems map[itemKey]restoredItemStatus
|
||||
disableInformer bool
|
||||
}{
|
||||
@@ -1328,6 +1329,52 @@ func TestRestoreItems(t *testing.T) {
|
||||
test.Pods(builder.ForPod("ns-1", "sa-1").ObjectMeta(builder.WithLabels("velero.io/backup-name", "foo", "velero.io/restore-name", "bar")).Result()),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "mark item as skipped when pod exists in cluster and is different from backed up one, existing resource policy is none",
|
||||
restore: defaultRestore().ExistingResourcePolicy("none").Result(),
|
||||
backup: defaultBackup().Result(),
|
||||
tarball: test.NewTarWriter(t).
|
||||
AddItems("pods", builder.ForPod("ns-1", "pod-1").ObjectMeta(builder.WithLabels("app", "backed-up")).Result()).
|
||||
Done(),
|
||||
apiResources: []*test.APIResource{
|
||||
test.Pods(builder.ForPod("ns-1", "pod-1").ObjectMeta(builder.WithLabels("app", "in-cluster")).Result()),
|
||||
},
|
||||
want: []*test.APIResource{
|
||||
test.Pods(builder.ForPod("ns-1", "pod-1").ObjectMeta(builder.WithLabels("app", "in-cluster")).Result()),
|
||||
},
|
||||
wantWarnings: Result{
|
||||
Namespaces: map[string][]string{
|
||||
"ns-1": {"could not restore, Pod \"pod-1\" already exists. Warning: the in-cluster version is different than the backed-up version"},
|
||||
},
|
||||
},
|
||||
expectedRestoreItems: map[itemKey]restoredItemStatus{
|
||||
{resource: "v1/Namespace", namespace: "", name: "ns-1"}: {action: "created", itemExists: true, createdName: "ns-1"},
|
||||
{resource: "v1/Pod", namespace: "ns-1", name: "pod-1"}: {action: "skipped", itemExists: true},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "mark item as skipped when pod exists in cluster and is different from backed up one, existing resource policy is not specified",
|
||||
restore: defaultRestore().Result(),
|
||||
backup: defaultBackup().Result(),
|
||||
tarball: test.NewTarWriter(t).
|
||||
AddItems("pods", builder.ForPod("ns-1", "pod-1").ObjectMeta(builder.WithLabels("app", "backed-up")).Result()).
|
||||
Done(),
|
||||
apiResources: []*test.APIResource{
|
||||
test.Pods(builder.ForPod("ns-1", "pod-1").ObjectMeta(builder.WithLabels("app", "in-cluster")).Result()),
|
||||
},
|
||||
want: []*test.APIResource{
|
||||
test.Pods(builder.ForPod("ns-1", "pod-1").ObjectMeta(builder.WithLabels("app", "in-cluster")).Result()),
|
||||
},
|
||||
wantWarnings: Result{
|
||||
Namespaces: map[string][]string{
|
||||
"ns-1": {"could not restore, Pod:pod-1 already exists. Warning: the in-cluster version is different than the backed-up version"},
|
||||
},
|
||||
},
|
||||
expectedRestoreItems: map[itemKey]restoredItemStatus{
|
||||
{resource: "v1/Namespace", namespace: "", name: "ns-1"}: {action: "created", itemExists: true, createdName: "ns-1"},
|
||||
{resource: "v1/Pod", namespace: "ns-1", name: "pod-1"}: {action: "skipped", itemExists: true},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "service account secrets and image pull secrets are restored when service account already exists in cluster",
|
||||
restore: defaultRestore().Result(),
|
||||
@@ -1437,7 +1484,12 @@ func TestRestoreItems(t *testing.T) {
|
||||
nil, // volume snapshotter getter
|
||||
)
|
||||
|
||||
assertEmptyResults(t, warnings, errs)
|
||||
if tc.wantWarnings.IsEmpty() {
|
||||
assertEmptyResults(t, warnings)
|
||||
} else {
|
||||
assertWantErrsOrWarnings(t, tc.wantWarnings, warnings)
|
||||
}
|
||||
assertEmptyResults(t, errs)
|
||||
assertRestoredItems(t, h, tc.want)
|
||||
if len(tc.expectedRestoreItems) > 0 {
|
||||
assert.Equal(t, tc.expectedRestoreItems, data.RestoredItems)
|
||||
|
||||
@@ -235,12 +235,12 @@ func Restore(ctx context.Context, blkUp Uploader, rep udmrepo.BackupRepo, snapsh
|
||||
return 0, errors.Wrapf(err, "error reset pos of block device %s", dest)
|
||||
}
|
||||
|
||||
size, err := blkUp.Restore(snapshot, destInfo{dev: destDev, path: destPath, size: destSize}, bitmap.Iterator(), uploaderCfg)
|
||||
_, totalSize, err := blkUp.Restore(snapshot, destInfo{dev: destDev, path: destPath, size: destSize}, bitmap.Iterator(), uploaderCfg)
|
||||
if err != nil {
|
||||
return 0, errors.Wrapf(err, "error restoring to block dev %s", destPath)
|
||||
}
|
||||
|
||||
return size, nil
|
||||
return totalSize, nil
|
||||
}
|
||||
|
||||
func findPreviousSnapshot(ctx context.Context, rep udmrepo.BackupRepo, path string, snapshotTags map[string]string, noLaterThan *time.Time, log logrus.FieldLogger) (udmrepo.Snapshot, error) {
|
||||
|
||||
@@ -46,9 +46,9 @@ func (m *mockUploader) Backup(src sourceInfo, parent udmrepo.ID, iter cbttypes.I
|
||||
return args.Get(0).(udmrepo.Snapshot), args.Get(1).(int64), args.Error(2)
|
||||
}
|
||||
|
||||
func (m *mockUploader) Restore(snap udmrepo.Snapshot, dest destInfo, iter cbttypes.Iterator, cfg map[string]string) (int64, error) {
|
||||
func (m *mockUploader) Restore(snap udmrepo.Snapshot, dest destInfo, iter cbttypes.Iterator, cfg map[string]string) (int64, int64, error) {
|
||||
args := m.Called(snap, dest, iter, cfg)
|
||||
return args.Get(0).(int64), args.Error(1)
|
||||
return args.Get(0).(int64), args.Get(1).(int64), args.Error(2)
|
||||
}
|
||||
|
||||
func testLog() logrus.FieldLogger {
|
||||
@@ -574,7 +574,7 @@ func TestRestore(t *testing.T) {
|
||||
repo.On("GetSnapshot", mock.Anything, udmrepo.ID("snap-001")).
|
||||
Return(storedSnap, nil)
|
||||
blkup.On("Restore", mock.Anything, mock.Anything, mock.Anything, mock.Anything).
|
||||
Return(int64(0), errors.New("restore I/O error"))
|
||||
Return(int64(0), int64(0), errors.New("restore I/O error"))
|
||||
},
|
||||
setupOpenDev: func(t *testing.T) *os.File {
|
||||
t.Helper()
|
||||
@@ -588,7 +588,7 @@ func TestRestore(t *testing.T) {
|
||||
repo.On("GetSnapshot", mock.Anything, udmrepo.ID("snap-001")).
|
||||
Return(storedSnap, nil)
|
||||
blkup.On("Restore", mock.Anything, mock.Anything, mock.Anything, mock.Anything).
|
||||
Return(int64(4096), nil)
|
||||
Return(int64(4096), int64(4096), nil)
|
||||
},
|
||||
setupOpenDev: func(t *testing.T) *os.File {
|
||||
t.Helper()
|
||||
|
||||
@@ -59,7 +59,7 @@ type destInfo struct {
|
||||
|
||||
type Uploader interface {
|
||||
Backup(sourceInfo, udmrepo.ID, cbt.Iterator, map[string]string) (udmrepo.Snapshot, int64, error)
|
||||
Restore(udmrepo.Snapshot, destInfo, cbt.Iterator, map[string]string) (int64, error)
|
||||
Restore(udmrepo.Snapshot, destInfo, cbt.Iterator, map[string]string) (int64, int64, error)
|
||||
}
|
||||
|
||||
type blockUploader struct {
|
||||
@@ -148,18 +148,18 @@ func (blkup *blockUploader) Backup(source sourceInfo, parentObject udmrepo.ID, b
|
||||
}, backupSize, nil
|
||||
}
|
||||
|
||||
func (blkup *blockUploader) Restore(snapshot udmrepo.Snapshot, dest destInfo, bitmap cbt.Iterator, configs map[string]string) (int64, error) {
|
||||
func (blkup *blockUploader) Restore(snapshot udmrepo.Snapshot, dest destInfo, bitmap cbt.Iterator, configs map[string]string) (int64, int64, error) {
|
||||
if bitmap == nil {
|
||||
return 0, errors.New("bitmap is not available")
|
||||
return 0, 0, errors.New("bitmap is not available")
|
||||
}
|
||||
|
||||
meta, err := blkup.repoWriter.ReadMetadata(blkup.ctx, snapshot.RootObject.ID)
|
||||
if err != nil {
|
||||
return 0, errors.Wrapf(err, "error reading snapshot metadata for %s", snapshot.Description)
|
||||
return 0, 0, errors.Wrapf(err, "error reading snapshot metadata for %s", snapshot.Description)
|
||||
}
|
||||
|
||||
if len(meta.SubObjects) != 1 {
|
||||
return 0, errors.Errorf("unexpected number of bdev object (%d) for snapshot %s", len(meta.SubObjects), snapshot.Description)
|
||||
return 0, 0, errors.Errorf("unexpected number of bdev object (%d) for snapshot %s", len(meta.SubObjects), snapshot.Description)
|
||||
}
|
||||
|
||||
sourceSize, err := getSourceSize(snapshot)
|
||||
@@ -169,25 +169,28 @@ func (blkup *blockUploader) Restore(snapshot udmrepo.Snapshot, dest destInfo, bi
|
||||
}
|
||||
|
||||
if sourceSize > meta.SubObjects[0].Size {
|
||||
return 0, errors.Wrapf(err, "unexpected size (%v vs. %v) for bdev object %s", meta.SubObjects[0].Size, sourceSize, meta.SubObjects[0].Name)
|
||||
return 0, 0, errors.Errorf("unexpected size (%v vs. %v) for bdev object %s", meta.SubObjects[0].Size, sourceSize, meta.SubObjects[0].Name)
|
||||
}
|
||||
|
||||
if sourceSize > dest.size {
|
||||
return 0, errors.Wrapf(err, "dest dev(%s) size is too small (%v vs. %v)", dest.path, dest.size, sourceSize)
|
||||
return 0, 0, errors.Errorf("dest dev(%s) size is too small (%v vs. %v)", dest.path, dest.size, sourceSize)
|
||||
}
|
||||
|
||||
reader, err := blkup.repoWriter.OpenObject(blkup.ctx, meta.SubObjects[0].ID)
|
||||
reader, err := blkup.repoWriter.OpenObject(blkup.ctx, meta.SubObjects[0].ID, udmrepo.ObjectReadOptions{
|
||||
Prefetch: true,
|
||||
PrefetchBudgetMB: 256,
|
||||
})
|
||||
if err != nil {
|
||||
return 0, errors.Wrapf(err, "error opening bdev object %v", meta.SubObjects[0].Name)
|
||||
return 0, 0, errors.Wrapf(err, "error opening bdev object %v", meta.SubObjects[0].Name)
|
||||
}
|
||||
defer reader.Close()
|
||||
|
||||
size, err := blkup.restoreData(reader, dest.dev, bitmap, sourceSize, dest.path)
|
||||
if err != nil {
|
||||
return 0, errors.Wrapf(err, "error restoring bdev object %s to volume %s", meta.SubObjects[0].Name, dest.path)
|
||||
return 0, 0, errors.Wrapf(err, "error restoring bdev object %s to volume %s", meta.SubObjects[0].Name, dest.path)
|
||||
}
|
||||
|
||||
return size, nil
|
||||
return size, sourceSize, nil
|
||||
}
|
||||
|
||||
func (blkup *blockUploader) backupObject(dev *os.File, dest udmrepo.ObjectWriter, bitmap cbt.Iterator, totalLength int64) (udmrepo.ID, int64, int64, error) {
|
||||
@@ -441,6 +444,8 @@ func (blkup *blockUploader) restoreData(reader io.ReadSeeker, dest *os.File, bit
|
||||
return written, errors.Wrap(writeErr, "error writing data")
|
||||
}
|
||||
|
||||
blkup.progress.UpdateProgress(&uploader.Progress{BytesDone: totalLength, TotalBytes: totalLength})
|
||||
|
||||
return written, nil
|
||||
}
|
||||
|
||||
@@ -576,7 +581,7 @@ func restoreWriteProc(ctx context.Context, dest *os.File, resultChan chan readRe
|
||||
|
||||
result.resetBuffer(list)
|
||||
|
||||
progress.UpdateProgress(&uploader.Progress{BytesDone: written, TotalBytes: totalLength})
|
||||
progress.UpdateProgress(&uploader.Progress{BytesDone: result.offset + length, TotalBytes: totalLength})
|
||||
}
|
||||
|
||||
result.resetBuffer(list)
|
||||
@@ -616,7 +621,7 @@ func flushZeroBlocks(dest *os.File, start int64, length int64, zeroBlock []byte,
|
||||
}
|
||||
|
||||
if writeSize != n {
|
||||
return errors.Wrapf(err, "short write zero buffer at %v, length %v", start+written, writeSize)
|
||||
return errors.Errorf("short write zero buffer at %v, length %v", start+written, writeSize)
|
||||
}
|
||||
|
||||
written += int64(writeSize)
|
||||
|
||||
@@ -623,7 +623,7 @@ func TestBlockUploaderRestore(t *testing.T) {
|
||||
repoWriter.On("ReadMetadata", mock.Anything, udmrepo.ID("root-id")).Return(nil, errors.New("meta not found"))
|
||||
|
||||
iterMock := cbtmocks.NewIterator(t)
|
||||
_, err := blkup.Restore(udmrepo.Snapshot{RootObject: udmrepo.ObjectMetadata{ID: "root-id"}}, destInfo{}, iterMock, nil)
|
||||
_, _, err := blkup.Restore(udmrepo.Snapshot{RootObject: udmrepo.ObjectMetadata{ID: "root-id"}}, destInfo{}, iterMock, nil)
|
||||
require.Error(t, err)
|
||||
assert.Contains(t, err.Error(), "meta not found")
|
||||
})
|
||||
@@ -663,7 +663,7 @@ func TestBlockUploaderRestore(t *testing.T) {
|
||||
objReader.On("Read", mock.Anything).Return(0, io.EOF)
|
||||
objReader.On("Close").Return(nil)
|
||||
|
||||
repoWriter.On("OpenObject", mock.Anything, udmrepo.ID("data-id")).Return(objReader, nil)
|
||||
repoWriter.On("OpenObject", mock.Anything, udmrepo.ID("data-id"), mock.Anything).Return(objReader, nil)
|
||||
|
||||
snap := udmrepo.Snapshot{
|
||||
Description: "test snapshot",
|
||||
@@ -685,8 +685,56 @@ func TestBlockUploaderRestore(t *testing.T) {
|
||||
iterMock.On("Next").Return(uint64(0), false)
|
||||
iterMock.On("BlockSize").Return(uint(1048576))
|
||||
|
||||
written, err := blkup.Restore(snap, dest, iterMock, nil)
|
||||
written, _, err := blkup.Restore(snap, dest, iterMock, nil)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, int64(1048576), written)
|
||||
})
|
||||
|
||||
t.Run("source size tag larger than object size", func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
repoWriter := udmrepomocks.NewBackupRepo(t)
|
||||
blkup := NewUploader(ctx, repoWriter, nil, logrus.New())
|
||||
|
||||
meta := &udmrepo.Metadata{
|
||||
SubObjects: []udmrepo.ObjectMetadata{
|
||||
{ID: "data-id", Name: "bdev", Size: 1048576},
|
||||
},
|
||||
}
|
||||
repoWriter.On("ReadMetadata", mock.Anything, udmrepo.ID("root-id")).Return(meta, nil)
|
||||
|
||||
snap := udmrepo.Snapshot{
|
||||
RootObject: udmrepo.ObjectMetadata{ID: "root-id"},
|
||||
Tags: map[string]string{bdevSourceSizeTag: "2097152"},
|
||||
}
|
||||
dest := destInfo{size: 4194304, path: "/dev/target"}
|
||||
iterMock := cbtmocks.NewIterator(t)
|
||||
|
||||
_, _, err := blkup.Restore(snap, dest, iterMock, nil)
|
||||
require.Error(t, err)
|
||||
assert.Contains(t, err.Error(), "unexpected size (1048576 vs. 2097152) for bdev object bdev")
|
||||
})
|
||||
|
||||
t.Run("destination smaller than source size", func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
repoWriter := udmrepomocks.NewBackupRepo(t)
|
||||
blkup := NewUploader(ctx, repoWriter, nil, logrus.New())
|
||||
|
||||
meta := &udmrepo.Metadata{
|
||||
SubObjects: []udmrepo.ObjectMetadata{
|
||||
{ID: "data-id", Name: "bdev", Size: 1048576},
|
||||
},
|
||||
}
|
||||
repoWriter.On("ReadMetadata", mock.Anything, udmrepo.ID("root-id")).Return(meta, nil)
|
||||
|
||||
snap := udmrepo.Snapshot{
|
||||
RootObject: udmrepo.ObjectMetadata{ID: "root-id"},
|
||||
Tags: map[string]string{bdevSourceSizeTag: "1048576"},
|
||||
}
|
||||
dest := destInfo{size: 512, path: "/dev/small"}
|
||||
iterMock := cbtmocks.NewIterator(t)
|
||||
|
||||
_, _, err := blkup.Restore(snap, dest, iterMock, nil)
|
||||
require.Error(t, err)
|
||||
assert.Contains(t, err.Error(), "dest dev(/dev/small) size is too small")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewShimRepo(repo udmrepo.BackupRepo) repo.RepositoryWriter {
|
||||
|
||||
// OpenObject open specific object
|
||||
func (sr *shimRepository) OpenObject(ctx context.Context, id object.ID) (object.Reader, error) {
|
||||
reader, err := sr.udmRepo.OpenObject(ctx, udmrepo.ID(id.String()))
|
||||
reader, err := sr.udmRepo.OpenObject(ctx, udmrepo.ID(id.String()), udmrepo.ObjectReadOptions{})
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to open object with id %v", id)
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ func TestOpenObject(t *testing.T) {
|
||||
name: "Success",
|
||||
backupRepo: func() *mocks.BackupRepo {
|
||||
backupRepo := &mocks.BackupRepo{}
|
||||
backupRepo.On("OpenObject", mock.Anything, mock.Anything).Return(&shimObjectReader{}, nil)
|
||||
backupRepo.On("OpenObject", mock.Anything, mock.Anything, mock.Anything).Return(&shimObjectReader{}, nil)
|
||||
return backupRepo
|
||||
}(),
|
||||
},
|
||||
@@ -89,7 +89,7 @@ func TestOpenObject(t *testing.T) {
|
||||
name: "Open object error",
|
||||
backupRepo: func() *mocks.BackupRepo {
|
||||
backupRepo := &mocks.BackupRepo{}
|
||||
backupRepo.On("OpenObject", mock.Anything, mock.Anything).Return(&shimObjectReader{}, errors.New("Error open object"))
|
||||
backupRepo.On("OpenObject", mock.Anything, mock.Anything, mock.Anything).Return(&shimObjectReader{}, errors.New("Error open object"))
|
||||
return backupRepo
|
||||
}(),
|
||||
isOpenObjectError: true,
|
||||
@@ -98,7 +98,7 @@ func TestOpenObject(t *testing.T) {
|
||||
name: "Get nil reader",
|
||||
backupRepo: func() *mocks.BackupRepo {
|
||||
backupRepo := &mocks.BackupRepo{}
|
||||
backupRepo.On("OpenObject", mock.Anything, mock.Anything).Return(nil, nil)
|
||||
backupRepo.On("OpenObject", mock.Anything, mock.Anything, mock.Anything).Return(nil, nil)
|
||||
return backupRepo
|
||||
}(),
|
||||
isReaderNil: true,
|
||||
|
||||
@@ -28,4 +28,5 @@ type VolumeHelper interface {
|
||||
ShouldPerformCustomAction(obj runtime.Unstructured, groupResource schema.GroupResource, matchParams map[string]any) (bool, error)
|
||||
GetActionParameters(obj runtime.Unstructured, groupResource schema.GroupResource) (bool, string, map[string]any, error)
|
||||
GetSnapshotClass(obj runtime.Unstructured, groupResource schema.GroupResource) (string, error)
|
||||
GetDataMoverFromActionParameters(obj runtime.Unstructured, groupResource schema.GroupResource) string
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user