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

Fork Sync: Update from parent repository #47

Open
wants to merge 49 commits into
base: release-1.9
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
bd646b1
Bump up golang version to 1.18.8
qiuming-best Nov 7, 2022
4a57c6d
Merge pull request #5558 from qiuming-best/release-1.9
reasonerjt Nov 7, 2022
d1ead7a
Fix controller problematic log output
qiuming-best Nov 9, 2022
48856f2
Merge pull request #5570 from qiuming-best/controller-log-fix
blackpiglet Nov 9, 2022
58f64e6
Add compile restic binary for CVE fix
qiuming-best Nov 8, 2022
2fa4a01
Merge pull request #5564 from qiuming-best/restic-build
blackpiglet Nov 9, 2022
20af506
Fix restic cross platform compile
qiuming-best Nov 9, 2022
9a617fe
Merge pull request #5577 from qiuming-best/release-1.9
Lyndon-Li Nov 9, 2022
c992315
Restore ClusterBootstrap before Cluster
ywk253100 Nov 22, 2022
026f986
Merge pull request #5615 from ywk253100/221122_order
reasonerjt Nov 22, 2022
bf03552
remove old versions from kind CI (#5627)
Lyndon-Li Nov 24, 2022
58560d4
Fix CVE for trivy scan
qiuming-best Nov 29, 2022
81fbb85
Merge pull request #5642 from qiuming-best/release-1.9
qiuming-best Nov 29, 2022
a140d71
Rollback compile restic
qiuming-best Nov 29, 2022
ddfc962
Merge pull request #5643 from qiuming-best/release-1.9
Lyndon-Li Nov 29, 2022
f642b9b
Add Restic builder in Dockerfile.
Dec 13, 2022
26be5cc
Merge pull request #5685 from blackpiglet/add_resitc_builder
Lyndon-Li Dec 15, 2022
0659dc9
Add changelogs for v1.9.5
qiuming-best Dec 19, 2022
1a0f640
Merge pull request #5706 from qiuming-best/release-1.9
reasonerjt Dec 19, 2022
3633bb4
Add GOARM for restic compile failure
qiuming-best Dec 19, 2022
2b5281f
Merge pull request #5707 from qiuming-best/release-1.9
qiuming-best Dec 19, 2022
03599b0
Fix Dockerfile issue.
Jan 12, 2023
4a17d7e
Merge pull request #5761 from blackpiglet/fix_dockerfile_issue
Lyndon-Li Jan 13, 2023
dd64d95
Remove container-builder-env section.
Jan 16, 2023
4b58507
Add GOARM in Restic builder. Add PR container build action.
Jan 16, 2023
dd66088
Merge pull request #5777 from blackpiglet/release-1.9
reasonerjt Jan 18, 2023
0f063c4
Restore finalizer and managedFields (#5808)
ywk253100 Feb 6, 2023
fce15cf
Use updated PVB/PVR for patching Failed Phase during startup
kaovilai Feb 3, 2023
07c7692
move UpdatePVXStatusToFailed to controller pkg
kaovilai Feb 7, 2023
0b8ed72
Merge pull request #5829 from kaovilai/pvb-pvr-should-fail-during-sta…
Lyndon-Li Feb 8, 2023
fadda99
Revert "Restore finalizer and managedFields (#5808)" (#5846)
ywk253100 Feb 9, 2023
9b569a9
Fix E2E CI cass filter regular expression issue
danfengliu Feb 7, 2023
730a6f7
Merge pull request #5837 from danfengliu/fix-e2e-ci-case-label
danfengliu Feb 13, 2023
cfdc51f
Bump up Golang version and fix CVEs.
Feb 20, 2023
2f97356
Merge pull request #5884 from blackpiglet/release-1.9
danfengliu Feb 21, 2023
145a91f
Add labels for created namespace during velero installation to adopt …
Feb 17, 2023
c457dea
Merge pull request #5887 from blackpiglet/release-1.9
Lyndon-Li Feb 21, 2023
8bf302e
Generate changelogs for v1.9.6
qiuming-best Feb 21, 2023
2ff46f9
Merge pull request #5892 from qiuming-best/release-1.9
Lyndon-Li Feb 22, 2023
ad876ed
E2E test can read VC credential secret from namespace either kube-sys…
Mar 26, 2023
87be70f
Merge pull request #6059 from blackpiglet/release-1.9
qiuming-best Mar 31, 2023
c7f939d
Bump Golang version to v1.19.8.
Apr 14, 2023
dd02df5
Merge pull request #6148 from blackpiglet/bump_golang_v1.9
blackpiglet Apr 14, 2023
c05a3e5
Generate changelogs for v1.9.7
qiuming-best Apr 14, 2023
9ace4ec
Merge pull request #6149 from qiuming-best/v1.9.7
qiuming-best Apr 14, 2023
4d97aa4
Make the E2E testing pods obey the restricted pod security standard. …
blackpiglet May 31, 2023
4ae06a5
Add PSA audit and warn labels.
Sep 6, 2023
cb68383
Merge branch 'release-1.9' into psa_audit_warn_v1.9
reasonerjt Sep 12, 2023
4f5a61b
Merge pull request #6775 from blackpiglet/psa_audit_warn_v1.9
qiuming-best Sep 12, 2023
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
5 changes: 1 addition & 4 deletions .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@v2
with:
go-version: 1.17
go-version: 1.19.8
id: go
# Look for a CLI that's made for this PR
- name: Fetch built CLI
Expand Down Expand Up @@ -57,9 +57,6 @@ jobs:
matrix:
# Latest k8s versions. There's no series-based tag, nor is there a latest tag.
k8s:
- 1.16.15
- 1.17.17
- 1.18.15
- 1.19.7
- 1.20.2
- 1.21.1
Expand Down
13 changes: 4 additions & 9 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@v2
with:
go-version: 1.17
go-version: 1.19.8
id: go
# Look for a CLI that's made for this PR
- name: Fetch built CLI
Expand Down Expand Up @@ -60,11 +60,6 @@ jobs:
strategy:
matrix:
k8s:
# doesn't cover 1.15 as 1.15 doesn't support "apiextensions.k8s.io/v1" that is needed for the case
#- 1.15.12
- 1.16.15
- 1.17.17
- 1.18.20
- 1.19.16
- 1.20.15
- 1.21.12
Expand All @@ -76,7 +71,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.19.8
id: go
- name: Check out the code
uses: actions/checkout@v2
Expand Down Expand Up @@ -122,12 +117,12 @@ jobs:
CREDS_FILE=/tmp/credential BSL_BUCKET=bucket \
ADDITIONAL_OBJECT_STORE_PROVIDER=aws ADDITIONAL_BSL_CONFIG=region=minio,s3ForcePathStyle="true",s3Url=http://$(hostname -i):9000 \
ADDITIONAL_CREDS_FILE=/tmp/credential ADDITIONAL_BSL_BUCKET=additional-bucket \
GINKGO_FOCUS='Basic\].+\[ClusterResource' VELERO_IMAGE=velero:pr-test \
GINKGO_FOCUS='Basic\]\[ClusterResource' VELERO_IMAGE=velero:pr-test \
make -C test/e2e run
timeout-minutes: 30
- name: Upload debug bundle
if: ${{ failure() }}
uses: actions/upload-artifact@v2
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 @@ -8,7 +8,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.19.8
id: go
- name: Check out the code
uses: actions/checkout@v2
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/pr-containers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: build Velero containers on Dockerfile change

on:
pull_request:
branches:
- 'main'
- 'release-**'
paths:
- 'Dockerfile'

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest

# Although this action also calls docker-push.sh, it is not triggered
# by push, so BRANCH and TAG are empty by default. docker-push.sh will
# only build Velero image without pushing.
- name: Make Velero container without pushing to registry.
if: github.repository == 'vmware-tanzu/velero'
run: |
./hack/docker-push.sh
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@v2
with:
go-version: 1.17
go-version: 1.19.8
id: go

- name: Check out code into the Go module directory
Expand Down
48 changes: 34 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,70 @@
# 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.
FROM --platform=$BUILDPLATFORM golang:1.17.13 as builder-env

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

ARG GOPROXY
ARG BIN
ARG PKG
ARG VERSION
ARG REGISTRY
ARG GIT_SHA
ARG GIT_TREE_STATE
ARG REGISTRY
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT

ENV CGO_ENABLED=0 \
GO111MODULE=on \
GOPROXY=${GOPROXY} \
GOOS=${TARGETOS} \
GOARCH=${TARGETARCH} \
GOARM=${TARGETVARIANT} \
LDFLAGS="-X ${PKG}/pkg/buildinfo.Version=${VERSION} -X ${PKG}/pkg/buildinfo.GitSHA=${GIT_SHA} -X ${PKG}/pkg/buildinfo.GitTreeState=${GIT_TREE_STATE} -X ${PKG}/pkg/buildinfo.ImageRegistry=${REGISTRY}"

WORKDIR /go/src/github.com/vmware-tanzu/velero

COPY . /go/src/github.com/vmware-tanzu/velero

RUN apt-get update && apt-get install -y bzip2
RUN mkdir -p /output/usr/bin && \
export GOARM=$( echo "${GOARM}" | cut -c2-) && \
go build -o /output/${BIN} \
-ldflags "${LDFLAGS}" ${PKG}/cmd/${BIN}

FROM --platform=$BUILDPLATFORM builder-env as builder
# Restic binary build section
FROM --platform=$BUILDPLATFORM golang:1.19.8-bullseye as restic-builder

ARG BIN
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
ARG PKG
ARG BIN
ARG RESTIC_VERSION

ENV GOOS=${TARGETOS} \
env CGO_ENABLED=0 \
GO111MODULE=on \
GOPROXY=${GOPROXY} \
GOOS=${TARGETOS} \
GOARCH=${TARGETARCH} \
GOARM=${TARGETVARIANT}

COPY . /go/src/github.com/vmware-tanzu/velero

# Not sure why v1.10 and main branch works without adding executable permission.
# Only v1.9 has the problem.
RUN mkdir -p /output/usr/bin && \
bash ./hack/download-restic.sh && \
export GOARM=$( echo "${GOARM}" | cut -c2-) && \
go build -o /output/${BIN} \
-ldflags "${LDFLAGS}" ${PKG}/cmd/${BIN}
export GOARM=$(echo "${GOARM}" | cut -c2-) && \
chmod +x /go/src/github.com/vmware-tanzu/velero/hack/build-restic.sh && \
/go/src/github.com/vmware-tanzu/velero/hack/build-restic.sh

FROM gcr.io/distroless/base-debian11@sha256:99133cb0878bb1f84d1753957c6fd4b84f006f2798535de22ebf7ba170bbf434
# Velero image packing section
FROM gcr.io/distroless/base-nossl-debian11@sha256:9523ef8cf054e23a81e722d231c6f604ab43a03c5b174b5c8386c78c0b6473d0

LABEL maintainer="Nolan Brubaker <[email protected]>"

COPY --from=builder /output /
COPY --from=velero-builder /output /

USER nonroot:nonroot
COPY --from=restic-builder /output /

USER nonroot:nonroot
19 changes: 3 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ see: https://velero.io/docs/main/build-from-source/#making-images-and-updating-v
endef

# The version of restic binary to be downloaded
RESTIC_VERSION ?= 0.13.1
RESTIC_VERSION ?= 0.14.0

CLI_PLATFORMS ?= linux-amd64 linux-arm linux-arm64 darwin-amd64 darwin-arm64 windows-amd64 linux-ppc64le
BUILDX_PLATFORMS ?= $(subst -,/,$(ARCH))
Expand Down Expand Up @@ -120,7 +120,7 @@ build-%:

all-build: $(addprefix build-, $(CLI_PLATFORMS))

all-containers: container-builder-env
all-containers:
@$(MAKE) --no-print-directory container
@$(MAKE) --no-print-directory container BIN=velero-restic-restore-helper

Expand Down Expand Up @@ -177,20 +177,6 @@ shell: build-dirs build-env
$(BUILDER_IMAGE) \
/bin/sh $(CMD)

container-builder-env:
ifneq ($(BUILDX_ENABLED), true)
$(error $(BUILDX_ERROR))
endif
@docker buildx build \
--target=builder-env \
--build-arg=GOPROXY=$(GOPROXY) \
--build-arg=PKG=$(PKG) \
--build-arg=VERSION=$(VERSION) \
--build-arg=GIT_SHA=$(GIT_SHA) \
--build-arg=GIT_TREE_STATE=$(GIT_TREE_STATE) \
--build-arg=REGISTRY=$(REGISTRY) \
-f $(VELERO_DOCKERFILE) .

container:
ifneq ($(BUILDX_ENABLED), true)
$(error $(BUILDX_ERROR))
Expand All @@ -199,6 +185,7 @@ endif
--output=type=$(BUILDX_OUTPUT_TYPE) \
--platform $(BUILDX_PLATFORMS) \
$(addprefix -t , $(IMAGE_TAGS)) \
--build-arg=GOPROXY=$(GOPROXY) \
--build-arg=PKG=$(PKG) \
--build-arg=BIN=$(BIN) \
--build-arg=VERSION=$(VERSION) \
Expand Down
2 changes: 1 addition & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ git_sha = str(local("git rev-parse HEAD", quiet = True, echo_off = True)).strip(

tilt_helper_dockerfile_header = """
# Tilt image
FROM golang:1.17 as tilt-helper
FROM golang:1.19.8 as tilt-helper

# Support live reloading with Tilt
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/restart.sh && \
Expand Down
2 changes: 1 addition & 1 deletion changelogs/CHANGELOG-0.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
* Skip completed jobs and pods when restoring (#463, @nrb)
* Set namespace correctly when syncing backups from object storage (#472, @skriss)
* When building on macOS, bind-mount volumes with delegated config (#478, @skriss)
* Add replica sets and daemonsets to cohabitating resources so they're not backed up twice (#482 #485, @skriss)
* Add replica sets and daemonsets to cohabiting resources so they're not backed up twice (#482 #485, @skriss)
* Shut down the Ark server gracefully on SIGINT/SIGTERM (#483, @skriss)
* Only back up resources that support GET and DELETE in addition to LIST and CREATE (#486, @nrb)
* Show a better error message when trying to get an incomplete restore's logs (#496, @nrb)
Expand Down
2 changes: 1 addition & 1 deletion changelogs/CHANGELOG-1.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Also added DownloadTargetKindBackupItemSnapshots for retrieving the signed URL t
* Fix CVE-2020-29652 and CVE-2020-26160 (#4274, @ywk253100)
* Refine tag-release.sh to align with change in release process (#4185, @reasonerjt)
* Fix plugins incompatible issue in upgrade test (#4141, @danfengliu)
* Verify group before treating resource as cohabitating (#4126, @sseago)
* Verify group before treating resource as cohabiting (#4126, @sseago)
* Added ItemSnapshotter plugin definition and plugin framework - addresses #3533.
Part of the Upload Progress enhancement (#3533) (#4077, @dsmithuchida)
* Add upgrade test in E2E test (#4058, @danfengliu)
Expand Down
82 changes: 81 additions & 1 deletion changelogs/CHANGELOG-1.9.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
## v1.9.7
### 2023-04-14

### Download
https://github.com/vmware-tanzu/velero/releases/tag/v1.9.7

### Container Image
`velero/velero:v1.9.7`

### Documentation
https://velero.io/docs/v1.9/

### Upgrading
https://velero.io/docs/v1.9/upgrade-to-1.9/

### All changes
* Bump Golang version to v1.19.8 (#6148, @blackpiglet)

## v1.9.6
### 2023-02-21

### Download
https://github.com/vmware-tanzu/velero/releases/tag/v1.9.6

### Container Image
`velero/velero:v1.9.6`

### Documentation
https://velero.io/docs/v1.9/

### Upgrading
https://velero.io/docs/v1.9/upgrade-to-1.9/

### All changes
* Bump up Golang version and fix CVEs. (#5884, @blackpiglet)
* Add labels for velero installed namespace to support PSA. (#5887, @blackpiglet)
* Fix Dockerfile issue. (#5761, @blackpiglet)
* Add PR container build action, which will not push image. Add GOARM parameter. (#5777, @blackpiglet)
* Correct PVB/PVR Failed Phase patching during startup (#5829, @kaovilai)

## v1.9.5
### 2022-12-19

### Download
https://github.com/vmware-tanzu/velero/releases/tag/v1.9.5

### Container Image
`velero/velero:v1.9.5`

### Documentation
https://velero.io/docs/v1.9/

### Upgrading
https://velero.io/docs/v1.9/upgrade-to-1.9/

### All changes
* Add Restic builder in Dockerfile, and keep the used built Golang image version in accordance with upstream Restic. (#5685, @blackpiglet)

## v1.9.4
### 2022-11-30

### Download
https://github.com/vmware-tanzu/velero/releases/tag/v1.9.4

### Container Image
`velero/velero:v1.9.4`

### Documentation
https://velero.io/docs/v1.9/

### Upgrading
https://velero.io/docs/v1.9/upgrade-to-1.9/

### All changes
* Fix CVE for trivy scan (#5642, @qiuming-best)
* Remove old kubernetes versions from kind CI (#5627, @Lyndon-Li))
* Restore ClusterBootstrap before Cluster (#5617, @ywk253100)

## v1.9.3
### 2022-11-03

Expand All @@ -14,7 +92,9 @@ https://velero.io/docs/v1.9/
https://velero.io/docs/v1.9/upgrade-to-1.9/

### All changes

* Fix controller problematic log output (#5570, @qiuming-best)
* Add compile restic binary for CVE fix (#5564, @qiuming-best)
* Bump up golang version to 1.18.8 (#5558, @qiuming-best)
* Enhance the restore priorities list to support specifying the low prioritized resources that need to be restored in the last (#5529, @ywk253100)
* Fix v1.9.3 CSI VolumeSnapshot status duplicate issue. (#5518, @blackpiglet)
* Bump up the distroless image to the latest version (#5500, @ywk253100)
Expand Down
1 change: 1 addition & 0 deletions changelogs/unreleased/6775-blackpiglet
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add PSA audit and warn labels.
Loading