Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebase: upstream/release-1.14 #322

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
892fa79
Fix the problems found by codespell
reasonerjt May 24, 2024
7d22548
Merge pull request #7824 from reasonerjt/fix-codespell-1.14
reasonerjt May 24, 2024
74966d0
Pin the version of Golang and base image
reasonerjt May 23, 2024
9164bc9
Merge pull request #7821 from reasonerjt/pin-image-1.14
reasonerjt May 24, 2024
1f1ccab
Fix issue in "git status" in goreleaser.sh
reasonerjt May 27, 2024
952f713
Merge pull request #7830 from reasonerjt/fix-git-release-issue-1.14
reasonerjt May 27, 2024
54d5dab
avoid unnecessary repo connect for maintenance
Lyndon-Li May 30, 2024
ce16acb
Merge pull request #7847 from Lyndon-Li/release-1.14
reasonerjt May 31, 2024
f6367ca
Use PVC to track the CSI snapshot in restore
reasonerjt Jun 3, 2024
2136679
Merge pull request #7852 from reasonerjt/fix-7849-1.14
reasonerjt Jun 4, 2024
f61c8b9
Add checks for csisnapshot for vol_info population
reasonerjt Jun 12, 2024
a650059
Update release note of 1.14
reasonerjt Jun 12, 2024
bf778c7
Merge pull request #7875 from reasonerjt/fix-restore-crash-1.14
blackpiglet Jun 12, 2024
d20bd16
Skip parallel files upload and download test for Restic case.
blackpiglet Jun 5, 2024
08fea6e
Merge branch 'release-1.14' into update-release-note-1.14
blackpiglet Jun 12, 2024
0d36572
Merge pull request #7876 from reasonerjt/update-release-note-1.14
blackpiglet Jun 12, 2024
200f16e
Merge branch 'release-1.14' into update_e2e_for_1_14
blackpiglet Jun 12, 2024
2fc6300
Merge pull request #7860 from blackpiglet/update_e2e_for_1_14
Lyndon-Li Jun 13, 2024
96af045
Ping golang/distroless image to latest version (#6679)
allenxu404 Aug 18, 2023
10694d2
skip subresource in resource discovery (#6688)
reasonerjt Aug 23, 2023
84e46d9
fix issue 6753
Lyndon-Li Sep 5, 2023
7f7db26
Update restore controller logic for restore deletion (#6761)
ywk253100 Sep 6, 2023
0b329a1
Fix #6752: add namespace exclude check.
Sep 5, 2023
995b309
add csi snapshot data movement doc
Lyndon-Li Sep 8, 2023
a213f6f
Modify changelogs for v1.12
allenxu404 Sep 19, 2023
89cac60
issue 6786:always delete VSC regardless of the deletion policy
Lyndon-Li Sep 13, 2023
d3a0c9f
issue: move plugin depdending podvolume functions to util pkg
Lyndon-Li Sep 26, 2023
c8238a2
issue 6880: set ParallelUploadAboveSize as MaxInt64
Lyndon-Li Sep 28, 2023
0fd2786
changelog
kaovilai Aug 28, 2023
f60dfb1
Add support for block volumes (#6680) (#6897)
dzaninovic Sep 29, 2023
040b8fb
Replace the base image with paketobuildpacks image
ywk253100 Sep 27, 2023
1f8e759
issue 6734: spread backup pod evenly
Lyndon-Li Oct 10, 2023
520a7f4
Add doc links for new features to release note
allenxu404 Sep 28, 2023
a47c768
fix issue 6647
Lyndon-Li Aug 28, 2023
cbd5420
Perf improvements for existing resource restore
sseago Aug 21, 2023
b2d3ca8
issue #6807: Retry failed create when using generateName
sseago Sep 13, 2023
7bd6a93
Import auth provider plugins
0x113 Oct 12, 2023
97cf82e
Add v1.12.1 changelog
allenxu404 Oct 20, 2023
b66d511
Make Windows build skip BlockMode code.
Oct 20, 2023
e8ce4b7
udmrepo use region specified in BSL when s3URL is empty
Lyndon-Li Oct 20, 2023
1261fb4
Change v1.12.1 changelog
allenxu404 Oct 20, 2023
735a9dd
Dockerfile.ubi/travis local files
dymurray Jun 29, 2020
4d42251
Add BZ + Publish automation to repo (#82)
rayfordj Jan 28, 2021
c8d408d
remove dependabot config from fork
sseago Nov 4, 2022
f49fe91
Create Makefile.prow
kaovilai Apr 5, 2023
3386d93
set HOME in velero image for kopia, update controller-gen for CI (#280)
sseago Jul 25, 2023
2e57500
build velero-helper binary for datamover pod
sseago Aug 16, 2023
1742602
restore: Use warning when Create IsAlreadyExist and Get error
kaovilai Oct 23, 2023
c1f1ec7
kopia/repository/config/aws.go: Set session.Options profile from config
kaovilai Oct 20, 2023
b0380f2
use ubi9-latest to build
sseago May 23, 2024
85f6868
OADP-4225: add tzdata to Dockerfile.ubi
sseago Jun 5, 2024
04757eb
fix: CI (#316)
mateusoliveira43 Jun 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/dependabot.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/bz-pr-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This is a basic workflow to help you get started with Actions

name: BZ PR Creation

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request_target:
branches:
- "*"
types:
- opened
- edited
- reopened
- synchronize

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
bz-on-pr-create:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: docker://quay.io/konveyor/pr-bz-github-action
name: update bugzilla with posted pr
with:
org_repo: ${{ github.repository }}
pr_number: ${{ github.event.pull_request.number }}
bz_product: "Migration Toolkit for Containers"
title: ${{ github.event.pull_request.title }}
github_token: ${{ secrets.GITHUB_TOKEN }}
bugzilla_token: ${{ secrets.BUGZILLA_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/crds-verify-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.22.2'
id: go
# Look for a CLI that's made for this PR
- name: Fetch built CLI
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e-test-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.22.2'
id: go
# Look for a CLI that's made for this PR
- name: Fetch built CLI
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.22.2'
id: go
- name: Check out the code
uses: actions/checkout@v4
Expand Down Expand Up @@ -142,4 +142,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: DebugBundle
path: /home/runner/work/velero/velero/test/e2e/debug-bundle*
path: /home/runner/work/velero/velero/test/e2e/debug-bundle*
2 changes: 1 addition & 1 deletion .github/workflows/pr-ci-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.22.2'
id: go
- name: Check out the code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
# ignore the config/.../crd.go file as it's generated binary data that is edited elswhere.
skip: .git,*.png,*.jpg,*.woff,*.ttf,*.gif,*.ico,./config/crd/v1beta1/crds/crds.go,./config/crd/v1/crds/crds.go,./config/crd/v2alpha1/crds/crds.go,./go.sum,./LICENSE
ignore_words_list: iam,aks,ist,bridget,ue,shouldnot,atleast
ignore_words_list: iam,aks,ist,bridget,ue,shouldnot,atleast,notin,sme
check_filenames: true
check_hidden: true

Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/pr-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This is a basic workflow to help you get started with Actions

name: BZ Merge

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request_target:
branches:
- "*"
types:
- closed


# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in pnamearallel
jobs:
# This workflow contains a single job called "build"
bz-on-pr-merge:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: docker://quay.io/konveyor/pr-merge-github-action
name: update bugzilla to modified
with:
bugzilla_token: ${{ secrets.BUGZILLA_TOKEN }}
org_repo: ${{ github.repository }}
pr_number: ${{ github.event.pull_request.number }}
bz_product: "Migration Toolkit for Containers"
title: ${{ github.event.pull_request.title }}
github_token: ${{ secrets.GITHUB_TOKEN }}
branch_to_release: "release-1.4.4:1.4.4,release-1.4.3:1.4.3,konveyor-1.5.2:1.4.0,release-1.4.5:1.4.5,release-1.5.0:1.5.0,konveyor-dev:1.5.z"
base_branch: ${{ github.base_ref }}
61 changes: 61 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Publish Images

on:
push:
branches:
- konveyor-dev
- 'release-*.*.*'
- 'sprint-*'
tags:
- 'release-*.*.*'
workflow_dispatch:

env:
REGISTRY: quay.io
IMAGE_NAME: konveyor/velero
HELPER_IMAGE_NAME: konveyor/velero-restore-helper
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Build container image
run: docker build . --file Dockerfile.ubi --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.extract_branch.outputs.branch }}

- name: Build helper image
run: docker build . --file Dockerfile-velero-restore-helper.ubi --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.extract_branch.outputs.branch }}

- name: Log into registry
run: echo "${{ secrets.QUAY_PUBLISH_TOKEN }}" | docker login quay.io -u ${{ secrets.QUAY_PUBLISH_ROBOT }} --password-stdin

- name: Push container image
run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.extract_branch.outputs.branch }}

- name: Push helper image
run: docker push ${{ env.REGISTRY }}/${{ env.HELPER_IMAGE_NAME }}:${{ steps.extract_branch.outputs.branch }}

- name: Retag container image
run: docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.extract_branch.outputs.branch }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
if: ${{ github.ref == 'refs/heads/konveyor-dev' }}

- name: Retag helper image
run: docker tag ${{ env.REGISTRY }}/${{ env.HELPER_IMAGE_NAME }}:${{ steps.extract_branch.outputs.branch }} ${{ env.REGISTRY }}/${{ env.HELPER_IMAGE_NAME }}:latest
if: ${{ github.ref == 'refs/heads/konveyor-dev' }}

- name: push retagged container image
run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
if: ${{ github.ref == 'refs/heads/konveyor-dev' }}

- name: push retagged helper image
run: docker push ${{ env.REGISTRY }}/${{ env.HELPER_IMAGE_NAME }}:latest
if: ${{ github.ref == 'refs/heads/konveyor-dev' }}
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.22.2'
id: go

- uses: actions/checkout@v4
Expand Down
78 changes: 78 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
os: linux
services: docker
dist: focal
language: go
go: stable

env:
global:
- IMAGE1: quay.io/konveyor/velero
- IMAGE2: quay.io/konveyor/velero-restore-helper
- DEFAULT_BRANCH: konveyor-dev
- DOCKERFILE1: Dockerfile.ubi
- DOCKERFILE2: Dockerfile-velero-restore-helper.ubi
- DOCKER_CLI_EXPERIMENTAL: enabled
- GOPROXY: https://goproxy.io,direct

before_install:
- |
if [ "${TRAVIS_BRANCH}" == "${DEFAULT_BRANCH}" ]; then
export TAG=latest
else
export TAG="${TRAVIS_BRANCH}"
fi

# Builds routinely fail due to download failures inside alternate arch docker containers
# Here we are downloading outside the docker container and copying the deps in
# Also use -v for downloads/builds to stop no output failures from lxd env buffering.
before_script:
- go mod vendor -v
- git clone https://github.com/konveyor/restic -b ${TRAVIS_BRANCH}
- pushd restic; go mod vendor -v; popd
- sed -i 's|-mod=mod|-mod=vendor|g' ${DOCKERFILE1}
- sed -i 's|-mod=mod|-mod=vendor|g' ${DOCKERFILE2}
- sed -i 's|go build|go build -v|g' ${DOCKERFILE1}
- sed -i 's|go build|go build -v|g' ${DOCKERFILE2}
- sed -i 's|^RUN mkdir -p \$APP_ROOT/src/github.com/restic \\$|COPY --chown=1001 restic/ $APP_ROOT/src/github.com/restic/restic|g' ${DOCKERFILE1}
- sed -i 's|&& cd \$APP_ROOT/src/github.com/restic \\$||g' ${DOCKERFILE1}
- sed -i 's|&& git clone https://github.com/konveyor/restic -b .*$||g' ${DOCKERFILE1}

script:
- docker build -t ${IMAGE1}:${TAG}-${TRAVIS_ARCH} -f ${DOCKERFILE1} .
- docker build -t ${IMAGE2}:${TAG}-${TRAVIS_ARCH} -f ${DOCKERFILE2} .
- if [ -n "${QUAY_ROBOT}" ]; then docker login quay.io -u "${QUAY_ROBOT}" -p ${QUAY_TOKEN}; fi
- if [ -n "${QUAY_ROBOT}" ]; then docker push ${IMAGE1}:${TAG}-${TRAVIS_ARCH}; fi
- if [ -n "${QUAY_ROBOT}" ]; then docker push ${IMAGE2}:${TAG}-${TRAVIS_ARCH}; fi

jobs:
include:
- stage: build images
arch: ppc64le
- arch: s390x
- arch: arm64-graviton2
virt: vm
group: edge
- arch: amd64
- stage: push manifest
language: shell
arch: amd64
before_script: []
script:
- |
if [ -n "${QUAY_ROBOT}" ]; then
docker login quay.io -u "${QUAY_ROBOT}" -p ${QUAY_TOKEN}
docker manifest create \
${IMAGE1}:${TAG} \
${IMAGE1}:${TAG}-amd64 \
${IMAGE1}:${TAG}-ppc64le \
${IMAGE1}:${TAG}-s390x \
${IMAGE1}:${TAG}-aarch64
docker manifest create \
${IMAGE2}:${TAG} \
${IMAGE2}:${TAG}-amd64 \
${IMAGE2}:${TAG}-ppc64le \
${IMAGE2}:${TAG}-s390x \
${IMAGE2}:${TAG}-aarch64
docker manifest push ${IMAGE1}:${TAG}
docker manifest push ${IMAGE2}:${TAG}
fi
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
We as members, contributors, and leaders pledge to make participation in the Velero project and our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

# Velero binary build section
FROM --platform=$BUILDPLATFORM golang:1.22-bookworm as velero-builder
FROM --platform=$BUILDPLATFORM golang:1.22.2-bookworm as velero-builder

ARG GOPROXY
ARG BIN
Expand Down Expand Up @@ -47,7 +47,7 @@ RUN mkdir -p /output/usr/bin && \
go clean -modcache -cache

# Restic binary build section
FROM --platform=$BUILDPLATFORM golang:1.22-bookworm as restic-builder
FROM --platform=$BUILDPLATFORM golang:1.22.2-bookworm as restic-builder

ARG BIN
ARG TARGETOS
Expand All @@ -70,7 +70,7 @@ RUN mkdir -p /output/usr/bin && \
go clean -modcache -cache

# Velero image packing section
FROM paketobuildpacks/run-jammy-tiny:latest
FROM paketobuildpacks/run-jammy-tiny:0.2.38

LABEL maintainer="Xun Jiang <[email protected]>"

Expand Down
14 changes: 14 additions & 0 deletions Dockerfile-velero-restore-helper.ubi
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM quay.io/konveyor/builder:latest AS builder
ENV GOPATH=$APP_ROOT
COPY . $APP_ROOT/src/github.com/vmware-tanzu/velero
WORKDIR $APP_ROOT/src/github.com/vmware-tanzu/velero
RUN CGO_ENABLED=0 GOOS=linux go build -a -mod=mod -ldflags '-extldflags "-static"' -o $APP_ROOT/src/velero-restore-helper github.com/vmware-tanzu/velero/cmd/velero-restore-helper

FROM registry.access.redhat.com/ubi8-minimal
RUN microdnf -y update && microdnf clean all

COPY --from=builder /opt/app-root/src/velero-restore-helper velero-restore-helper

USER 65534:65534

ENTRYPOINT [ "/velero-restore-helper" ]
29 changes: 29 additions & 0 deletions Dockerfile.ubi
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# TODO! Find a real ubi8 image for golang 1.16
FROM quay.io/konveyor/builder:ubi9-latest AS builder
ENV GOPATH=$APP_ROOT
COPY . /go/src/github.com/vmware-tanzu/velero
WORKDIR /go/src/github.com/vmware-tanzu/velero
RUN CGO_ENABLED=0 GOOS=linux go build -a -mod=mod -ldflags '-extldflags "-static" -X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=konveyor-dev' -o /go/src/velero github.com/vmware-tanzu/velero/cmd/velero
RUN CGO_ENABLED=0 GOOS=linux go build -a -mod=mod -ldflags '-extldflags "-static"' -o /go/src/velero-helper github.com/vmware-tanzu/velero/cmd/velero-helper

FROM quay.io/konveyor/builder:ubi9-latest AS restic-builder
ENV GOPATH=$APP_ROOT
RUN mkdir -p $APP_ROOT/src/github.com/restic \
&& cd $APP_ROOT/src/github.com/restic \
&& git clone https://github.com/konveyor/restic -b konveyor-dev
WORKDIR $APP_ROOT/src/github.com/restic/restic
RUN CGO_ENABLED=0 GOOS=linux go build -a -mod=mod -ldflags '-extldflags "-static"' -o $APP_ROOT/src/restic github.com/restic/restic/cmd/restic

FROM registry.access.redhat.com/ubi9-minimal
RUN microdnf -y update && microdnf -y install nmap-ncat && microdnf -y reinstall tzdata && microdnf clean all
COPY --from=builder /go/src/velero velero
COPY --from=builder /go/src/velero-helper velero-helper
COPY --from=restic-builder /opt/app-root/src/restic /usr/bin/restic

RUN mkdir -p /home/velero
RUN chmod -R 777 /home/velero

USER 65534:65534
ENV HOME=/home/velero

ENTRYPOINT ["/velero"]
Loading