Commit Graph

19 Commits (203a103fc442994904212420abff186fd5630ce3)

Author SHA1 Message Date
Carlisia Thompson 5eb64eb84b
Add Tilt configs (#3119)
* Adding Tilt configs

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

* Fix spelling

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

* Reuse sample BSL yaml file

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

* Minor fix and more documentation

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

* Reuse our build.sh script

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

* Finish tweaking Tilt build

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

* Improvements

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

* This will make a better startup config

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

* Code review + improvements

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

* Improvements

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

* Reset go.sum

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

* Address code reviews

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

* Improve Tilt code

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

* Address code reviews

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

* Fix links

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

* Add CSI image to example deployment

Signed-off-by: Carlisia <carlisia@vmware.com>
2020-12-08 13:42:03 -05:00
David L. Smith-Uchida aa47309700
Add an E2E test framework to test Velero across cloud platforms (#3060)
* Basic end-to-end tests, generate data/backup/remove/restore/verify
Uses distributed data generator

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Moved backup/restore into velero_utils, started using a name for the restore

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* remove checked in binary and update test/e2e Makefile

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

* Ran make update

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Save

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

* Ran make update

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Basic end-to-end test, generate data/backup/remove/restore/verify
Uses distributed data generator

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Changed tests/e2e Makefile to just use go get to install ginkgo in the GOPATH/bin
Updated to ginkgo 1.14.2
Put cobra back to v0.0.7

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* Added CLOUD_PLATFORM env variable to Makefile, updated README, removed ginkgo from .gitignore

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>

* choose velero CLI binary based on local env

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

Co-authored-by: Ashish Amarnath <ashisham@vmware.com>
2020-11-24 14:12:52 -05:00
Hariharan df982c9fc9
Add warning to velero version cmd. Fixes #3017 (#3024)
Signed-off-by: Hariharan <cvhariharan@protonmail.com>
2020-10-23 17:33:13 -04:00
Nolan Brubaker 2fa96d0839
Fix 'subcommand required' error w/ cobra upgrade (#2947)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-09-17 14:08:26 -07:00
Ashish Amarnath cfc4651078
🏃‍♂️ add shortnames for CRDs (#2911)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
2020-09-10 12:28:17 -07:00
Carlisia Thompson be1cd03023
Refactor BSL related code (#2870)
* Refactor BSL related code

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

* Increase # of max concurrent reconciles

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

* Clean up for better, more precise interfaces

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

* Minor clean up - code reviews

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

* Address code review

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

* Add import and fix CI

Signed-off-by: Carlisia <carlisia@vmware.com>
2020-09-02 13:12:37 -04:00
Carlisia Campos c952932f1b
Migrate ServerStatusRequest controller and resource to kubebuilder (#2838)
* Convert ServerStatusRequest controller to controller-runtime

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

* Add select stm

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

* Fixed status patch bug

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

* Add mgr start

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

* Trying to sync

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

* Clean async now

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

* Clean up + move context out

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

* Bug: not closing the channel

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

* Clean up some tests

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

* Much better way to fetch an update using a backoff loop

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

* Even better way to retry: use apimachinery lib

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

* Refactor controller + add test

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

* partially fix unit tests

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

* Fix and add tests

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

* Add changelog

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

* Add ability to disable the controller + cleanups

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

* Fix bug w/ disabling controllers + fix test + clean up

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

* Move role.yaml to the correct folder

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

* Add sample serverstatusrequest.yaml

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

* Add requeue + better formatting

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

* Increase # of max concurrent reconciles

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

Co-authored-by: Ashish Amarnath <ashisham@vmware.com>
2020-09-01 14:15:23 -07:00
Jason Scarano 827d5d34f5
Improve and clarify cmd help documentation, flags, and examples (#2736)
* capitalize `backup create` cmd comments & examples

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* update copyright and capitilize flags and comments

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* update copyright and capitilize flags and comments

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* update copyright and capitilize flags and comments

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* update backuplocation, restic, & restore cmd doc

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* fix local typo

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* update copyrights & capitalize pflag/help strings

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* update copyright in utils dir

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* Revert "update copyright in utils dir"

This reverts commit d116efe3a3.

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* revert copyright changes

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* restore missing file

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* revert copyright changes

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

* add cacert flag back

Signed-off-by: Jason Scarano <scaranoj@vmware.com>

Co-authored-by: Carlisia Campos <carlisia@vmware.com>
2020-08-12 18:13:44 -04: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
Carlisia Campos 4048c020a8
Convert manifests + BSL api client to kubebuilder (#2561)
* kubebuilder init - minimalist version

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

* Add back main.go, apparently kb needs it

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

* Tweak makefile to accomodate kubebuilder expectations

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

* Port BSL to kubebuilder api client

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

* s/cache/client bc client fetches from cache
And other naming improvements

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

* So, .GetAPIReader is how we bypass the cache
In this case, the cache hasn't started yet

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

* Oh that's what this code was for... adding back

We still need to embed the CRDs as binary data in the Velero binary to
access the generated CRDs at runtime.

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

* Tie in CRD/code generation w/ existing scripts

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

* Mostly result of running update-fmt, updated file formatting

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

* Just a copyright fix

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

* All the test fixes

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

* Add changelog + some cleanup

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

* Update backup manifest

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

* Remove unneeded auto-generated files

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

* Keep everything in the same (existing) package

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

* Fix/clean scripts, generated code, and calls

Deleting the entire `generated` directory and running `make update`
works. Modifying an api and running `make verify` works as expected.

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

* Clean up schema and client calls + code reviews

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

* Move all code gen to inside builder container

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

* Address code review

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

* Fix imports/aliases

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

* More code reviews

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

* Add waitforcachesync

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

* Have manager register ALL controllers

This will allow for proper cache management.

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

* Status subresource is now enabled; cleanup

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

* More code reviews

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

* Clean up

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

* Manager registers ALL controllers for restic too

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

* More code reviews

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

* Add deprecation warning/todo

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

* Add documentation

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

* Add helpful comments

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

* Address code review

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

* More idiomatic Runnable

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

* Clean up imports

Signed-off-by: Carlisia <carlisia@vmware.com>
2020-06-24 12:55:18 -04:00
Steve Kriss a5346c1a87
azure: support aad-pod-identity auth when using restic (#2602)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-06-08 11:17:43 -07:00
Nolan Brubaker 8c11afa30a Update dependencies to latest versio
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-04-20 13:49:18 -04:00
Nolan Brubaker 6827a41cf7 Add dependency to external-snapshotter v2.0.1
All changes to go.mod/go.sum besides the external-snapshotter repo are a
result of its transitive dependencies.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-04-20 13:49:18 -04:00
Nolan Brubaker c71318bf19 Address more review feedback
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-04-20 13:49:17 -04:00
Nolan Brubaker 232e1d8927 Add clients for CSI snapshots
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-04-20 13:49:17 -04:00
Steve Kriss 72524ffd18
bump k8s deps to v0.17.4 (#2407)
* bump k8s deps to v0.17.4

Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-04-08 09:57:02 -07:00
Steve Kriss af9e11e23a fix Azure dependency
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-02 10:55:06 -07:00
Steve Kriss f18ac40364 go mod init + go mod tidy
Signed-off-by: Steve Kriss <krisss@vmware.com>
2020-03-02 10:55:06 -07:00