Commit Graph

32 Commits (71fd7cc5a7d8f461bf14b52c16573cfe8cdf2097)

Author SHA1 Message Date
Ashish Amarnath d4bbd7b817
🐛 Patch generated yaml for restore CRD as a hacky workaround (#2814)
* 🐛 Patch generated yaml for restore CRD as a hacky workaround

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>

* changelog

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-08-12 18:43:29 -04:00
Rob Reus db139cf07c
Refactor image builds to use buildx for multi arch image building (#2754)
* Refactor image builds to use buildx for multi arch image building

Signed-off-by: Rob Reus <rob@devrobs.nl>

* Adding image build sanity checks to Makefile

Signed-off-by: Rob Reus <rob@devrobs.nl>

* Making locally building of docker images possible

Signed-off-by: Rob Reus <rob@devrobs.nl>

* Adding docs on building container images using buildx

Signed-off-by: Rob Reus <rob@devrobs.nl>

* Adding changelog and implementing feedback from PR

Signed-off-by: Rob Reus <rob@devrobs.nl>

* Making GOPROXY used in the build containers configurable

Signed-off-by: Rob Reus <rob@devrobs.nl>
2020-08-04 11:40:05 -07:00
Andrew Lavery a368370bef
k8s 1.18 import (#2651)
* k8s 1.18 import wip

backup, cmd, controller, generated, restic, restore, serverstatusrequest, test and util

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* go mod tidy

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* add changelog file

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* go fmt

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* update code-generator and controller-gen in CI

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* checkout proper code-generator version, regen

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* fix remaining calls

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* regenerate CRDs with ./hack/update-generated-crd-code.sh

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* use existing context in restic and server

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* fix test cases by resetting resource version

also use main library go context, not golang.org/x/net/context, in pkg/restore/restore.go

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* clarify changelog message

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* use github.com/kubernetes-csi/external-snapshotter/v2@v2.2.0-rc1

Signed-off-by: Andrew Lavery <laverya@umich.edu>

* run 'go mod tidy' to remove old external-snapshotter version

Signed-off-by: Andrew Lavery <laverya@umich.edu>
2020-07-16 12:21:37 -04:00
Carlisia Campos dbd0aa4915
Add a BSL controller to handle validation + update BSL status phase (#2674)
* Add BSL controller

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add changelog

Signed-off-by: Carlisia <carlisia@vmware.com>

* Make update

Signed-off-by: Carlisia <carlisia@vmware.com>

* Update docs

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add kubebuilder dependency

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add export

Signed-off-by: Carlisia <carlisia@vmware.com>

* add kubebuilder binaries into velero builder image

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>

* Reset velero dockerfile

Signed-off-by: Carlisia <carlisia@vmware.com>

* Consolidate all logic

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add copyright header

Signed-off-by: Carlisia <carlisia@vmware.com>

* Clean up + add "last validated" column

Signed-off-by: Carlisia <carlisia@vmware.com>

* Better tests

Signed-off-by: Carlisia <carlisia@vmware.com>

* Add more tests

Signed-off-by: Carlisia <carlisia@vmware.com>

* Better logging

Signed-off-by: Carlisia <carlisia@vmware.com>

* Format

Signed-off-by: Carlisia <carlisia@vmware.com>

* Code reviews

Signed-off-by: Carlisia <carlisia@vmware.com>

* Address code review

Signed-off-by: Carlisia <carlisia@vmware.com>

* Remove redundant logic

Signed-off-by: Carlisia <carlisia@vmware.com>

Co-authored-by: Ashish Amarnath <ashisham@vmware.com>
2020-07-14 17:47:00 -04:00
Tony Batard b968813058
Add linter (#2615)
* Add linter to Makefile and build image

* Also make it part of verify step

Signed-off-by: Tony Batard <tbatard@pivotal.io>

* clean up of Makefile and permissions for .go/golangci-lint

Signed-off-by: Duffie Cooley <cooleyd@vmware.com>

* changed verify-lint.sh to lint.sh to avoid breaking ci

Signed-off-by: mtritabaugh <mtritabaugh@vmware.com>

* Add changelog

Signed-off-by: Tony Batard <tbatard@pivotal.io>

* Add LINTERS option to run only specific linters

* e.g. make lint LINTERS=unused,deadcode

Signed-off-by: Tony Batard <tbatard@pivotal.io>

* adding timeout to golangci-lint, and checking cache

Signed-off-by: Matyas Danter <mdanter@vmware.com>

* Fixed some formatting and added comments

Signed-off-by: Matyas Danter <mdanter@vmware.com>

* modifying lint script to use golangci.yaml

Signed-off-by: Matyas Danter <mdanter@vmware.com>

* update to move default linters to Makefile

Signed-off-by: mtritabaugh <mtritabaugh@vmware.com>

* Adding documentation for lint make targets.

Signed-off-by: Matyas Danter <mdanter@vmware.com>

* Update Copyright with current year

Signed-off-by: Tony Batard <tbatard@pivotal.io>

* initial git workflow commit

Signed-off-by: mtritabaugh <mtritabaugh@vmware.com>

* Added lint-all target and implemented -n as default

* Added a local-lint-all and lint-all target that will show lint errors
for all of the codebase
* changed the default of lint and local-lint to only show new lint
errors

Signed-off-by: Duffie Cooley <cooleyd@vmware.com>

* updated docs to reflect new target

Signed-off-by: mtritabaugh <mtritabaugh@vmware.com>

Co-authored-by: Duffie Cooley <cooleyd@vmware.com>
Co-authored-by: mtritabaugh <mtritabaugh@vmware.com>
Co-authored-by: Matyas Danter <mdanter@vmware.com>
2020-06-30 12:51:10 -04:00
Steve Kriss 9d7bd59957 update to go 1.14
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-02 10:55:08 -07:00
Steve Kriss 34e1f1e152 set GO111MODULE=on for build container
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-02 10:55:08 -07:00
Steve Kriss 21e382abe4 bump builder image to go 1.13, updates for modules
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-02 10:55:08 -07:00
JenTing Hsiao b19097f825 Pruning unknown fields (#2187)
* Pruning unknown fields

In CRD apiversion v1beta1, default preserveUnknownFields=true.

In CRD apiversion v1, the preserveUnknownFields can only be false.
Otherwise, the k8s validation bumps out error message for the
invalid preserveUnknownFields value.

Deploy Velero on k8s 1.16+ with CRD apiversion v1beta1, the
k8s cluster converts apiversion from v1beta1 to v1 automatically.

Fully backup and restore the cluster, restore bumps out error message
due to the preserveUnknownFields=true is not allowed on k8s 1.16+.

Since the CRD structural schema had been defined, enable the preserveUnknownFields
to false to solves the restore bumps out error message on k8s 1.16+.

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>

* Add changelog

Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2020-01-28 14:04:28 -05:00
Steve Kriss 04d8b47d3e update to k8s 1.17 deps and fix breaks (#2180)
* update to k8s 1.17 deps

Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-01-10 08:55:58 -08:00
Steve Kriss e1bdc417ca
run goreleaser.sh in container (#2049)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-11-06 12:55:47 -07:00
Nolan Brubaker c5d0110429 Add GOPROXY for go module operations
Without a GOPROXY, go modules are fetched from their respective hosts,
which increases the likelihood that any given host might be unavailable
and break builds.

Fixes #2036

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-11-04 13:58:06 -05:00
Adnan Abdulhussein f2eb072694 fix controller-gen version in builder image (#1984)
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-10-21 13:49:32 -07:00
Nolan Brubaker 01b0b05762 Use layers in the builder Dockerfile (#1907)
Using layers can simplify iteration on the builder image itself, and
shorten build times when only one command is changed

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-09-25 18:03:13 -07:00
Adnan Abdulhussein 5e22f9c1c8 Generate CRDs with structural schema (#1885)
* generating CRDs with controller-tools and embedding in binary

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-09-23 10:25:48 -06:00
Steve Kriss 8582238ad2 move plugin proto updating into make update (#1887)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-09-18 14:03:40 -07:00
Adnan Abdulhussein 7ea065a94f Upgrade kubernetes dependencies to 1.15.3 (#1808)
* bump kubernetes dependency to 1.15.3

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-08-27 13:58:15 -07:00
Steve Kriss 13b6cbb4db update to kubernetes 1.14 deps
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-20 13:25:36 -06:00
Steve Kriss c49e1ff0cc change base images to ubuntu:bionic
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-15 12:56:20 -07:00
Steve Kriss 49cb4cd5c3 switch to debian:stretch-slim base images and go 1.12.x
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:07:23 -06:00
Steve Kriss a111eed2af update license headers to Velero contributors (#1302)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-20 12:32:48 -07:00
Steve Kriss 61eab7dca3 update generated code using 1.12 generator
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 15:33:05 -07:00
Gábor Lipták daf1a75515 Bring Go current in Travis
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2018-11-21 08:31:14 -05:00
Nolan Brubaker b5a2ccd510 Silence git detached HEAD advice in build container
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-10-24 22:57:50 -04:00
Andy Goldstein 573ce7d0e7 Update formatting script
- Pin to a specific revision of goimports
- Use -local flag with goimports to keep ark imports separated
- Correct shellcheck errors

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-10-23 13:01:07 -04:00
Nolan Brubaker 80bc3ded14 Bump alpine image for security fix
This change includes the fix at
6484ed9849

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-09-18 12:18:05 -04:00
Mike Arpaia 3efe677007
Update Ark library code to work with Kubernetes 1.11
Signed-off-by: Mike Arpaia <mike@arpaia.co>
2018-07-16 20:46:20 -06:00
Steve Kriss 2889db72ac update to go 1.10 & alpine 3.7
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-24 13:12:54 -07:00
Andy Goldstein c8989231eb
Merge pull request #417 from skriss/upgrade-k8s-deps
Upgrade apimachinery, client-go, api, kubernetes dependencies
2018-04-24 14:53:11 -04:00
Matt Moyer deae0e6ae1 Switch to upstream Go build images.
These internal `gcr.io/heptio-images/golang` images are deprecated. It looks like `git` and `bash` are the only things the Ark build needed that aren't in the upstream `golang:1.9-alpine3.6` image.

Signed-off-by: Matt Moyer <moyer@heptio.com>
2018-04-24 09:53:23 -05:00
Steve Kriss c7b52bf1fe upgrade build image to v1.10 dependencies
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-20 12:59:22 -07:00
Andy Goldstein 1455d67152 Use a custom builder image
Use a custom builder image to do all of Ark's builds. This image now
contains k8s.io/code-generator for code generation.

Enable docker in travis to use the builder image.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-04 16:44:16 -04:00