Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
4379f5b
Update velero/restic/registry to check owner types
kaovilai May 25, 2022
f9c920d
Check and report reconcile error before checking deployment ready
kaovilai May 25, 2022
e0a35df
NoDefaultBackupLocation expects BackupImages to be pointer.Bool(false)
kaovilai May 25, 2022
056fc54
DPA CR cannot have backup locations if noDefaultBackupLocation is set
kaovilai May 25, 2022
293c39c
check reconcile error via string
kaovilai May 25, 2022
e6b9e2c
go fmt
kaovilai May 25, 2022
1ee5899
Switch Dpa to dpa and add getters. Fix velero config cr option for no…
kaovilai May 25, 2022
332a502
go fmt one more time
kaovilai May 25, 2022
3f5de3f
switch velero deployment list to get.
kaovilai May 25, 2022
eed67c1
return condition message if there is a condition. extend timeout for …
kaovilai May 26, 2022
60268e3
avoid missing credentialMounts error setting snapshotLocations to empty
kaovilai May 26, 2022
96f0df4
remove outdated comment
kaovilai May 26, 2022
4320221
fix bsl prefix
kaovilai May 26, 2022
af210b6
add observedGeneration check
kaovilai May 26, 2022
8ec2e4e
set featureFlags when creating or updating for describe backup
kaovilai May 26, 2022
c56268b
fmt
kaovilai May 26, 2022
0c2c38e
GetDpa() pass copy instead of pointer to original.
kaovilai May 26, 2022
c17fdcb
AreVeleroDeploymentReplicasReady don't err on NotFound.
kaovilai May 26, 2022
249d24b
handle panic for describe functions when backup fails
kaovilai May 27, 2022
3b4cb55
wait for BSL to be available before starting backup
kaovilai May 27, 2022
dd15638
reconcile error wait to 2 minutes.
kaovilai May 27, 2022
efdb11e
switch ReconcileError() check from string to wait.ConditionFunc
kaovilai May 27, 2022
b6dffd9
switch eventually bslIsAvailable to wait.ConditionFunc
kaovilai May 27, 2022
7e536ce
print container failure logs to ginkgowriter before dpa deletion
kaovilai May 27, 2022
ec7c57e
set credentialsFile bsl config for NoDefaultBackupLocation
kaovilai May 27, 2022
084edec
createOrUpdate bsl
kaovilai May 27, 2022
e56f5ed
remove redundant lastObserve code. Will be adding spec checking later
kaovilai May 27, 2022
a70da91
remove unused var
kaovilai May 27, 2022
54ffc90
revert removed line
kaovilai May 27, 2022
78d4630
Don't set credentialsFile for external BSL. It has spec.Credentials a…
kaovilai May 27, 2022
9fc6c2f
clear credentialsFile from BSL
kaovilai May 27, 2022
491d33c
log bsl .spec.credential and config["credentialsFile"]
kaovilai May 27, 2022
6ecda15
deepcopy velerobsl
kaovilai May 27, 2022
29ee2d0
remove duplicate ginkgo import
kaovilai May 27, 2022
a32289f
remove test code
kaovilai May 27, 2022
2714848
unfocus entry
kaovilai May 27, 2022
6e9d7f8
return a deepcopy dpa
kaovilai May 27, 2022
cc46a1b
bsl status check dump entire status
kaovilai May 27, 2022
057d457
force set credential field
kaovilai May 27, 2022
4c92451
remove redundant readFile
kaovilai May 27, 2022
8fa729f
remove redundant `credSecretRef` secret creation
kaovilai May 28, 2022
f5599a0
remove use of bsl.config["credentialsFile"] from e2e
kaovilai May 28, 2022
a4fb169
remove nodefaultbackuplocation cred overrides
kaovilai May 28, 2022
b4eaa2e
add bsl available wait
kaovilai May 28, 2022
52530c0
log unexected bsl diff
kaovilai May 28, 2022
c10ddbe
fix dpa spec checks to check updated dpa in cluster
kaovilai May 28, 2022
b0b93ab
remove GetSecretRef
kaovilai May 28, 2022
493a817
set credential in each dpaspec entry
kaovilai May 28, 2022
c02e024
mimic omit empty when comparing desired bsl config
kaovilai May 28, 2022
abfc7a7
if bl.velero is not nil
kaovilai May 28, 2022
566d28b
go fmt
kaovilai May 28, 2022
388c8c3
Build() gets dpa instance from deepcopy
kaovilai May 28, 2022
57f74e5
make nil items
kaovilai May 28, 2022
8a99465
refactor ginkgo init flags, set dpa name after loading.
kaovilai May 28, 2022
c14cc70
Declare dpaCR once.
kaovilai May 28, 2022
7556d8f
multi-cloud creds fix 🤞
kaovilai May 28, 2022
099ebbd
Bump registry readiness timeout to 5
kaovilai May 28, 2022
168d446
bump probe to 10s
kaovilai May 29, 2022
65d0689
go fmt
kaovilai May 29, 2022
a17200b
update multicloud docs
kaovilai May 29, 2022
1fb8384
Github Actions: go-test go version bump to 1.18
kaovilai May 28, 2022
8dfb78c
go-install-tool set `-mod=mod`
kaovilai May 31, 2022
bd458a4
rename import name of lib/init from `i` to `libinit`
kaovilai May 31, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: '^1.16.6' # The Go version to download (if necessary) and use.
go-version: '^1.18' # The Go version to download (if necessary) and use.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure that the downstream is ready for this change.

- run: go version
- run: make test submit-coverage
podman-build:
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,15 @@ build-deploy: ## Build current branch image and deploy controller to the k8s clu

CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/[email protected])
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/[email protected])

KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary.
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
$(call go-install-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])

ENVTEST = $(shell pwd)/bin/setup-envtest
envtest: ## Download envtest-setup locally if necessary.
$(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest)
$(call go-install-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest)

# Codecov OS String for use in download url
ifeq ($(OS),Windows_NT)
Expand All @@ -264,16 +264,16 @@ submit-coverage:
fi
rm -f codecov tmp.*

# go-get-tool will 'go get' any package $2 and install it to $1.
# go-install-tool will 'go install' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
define go-get-tool
define go-install-tool
@[ -f $(1) ] || { \
set -e ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
GOBIN=$(PROJECT_DIR)/bin go install -mod=mod $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef
Expand Down
8 changes: 4 additions & 4 deletions controllers/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ func (r *DPAReconciler) buildRegistryContainer(bsl *velerov1.BackupStorageLocati
Port: intstr.IntOrString{IntVal: 5000},
},
},
PeriodSeconds: 5,
TimeoutSeconds: 3,
PeriodSeconds: 10,
TimeoutSeconds: 10,
InitialDelaySeconds: 15,
},
ReadinessProbe: &corev1.Probe{
Expand All @@ -379,8 +379,8 @@ func (r *DPAReconciler) buildRegistryContainer(bsl *velerov1.BackupStorageLocati
Port: intstr.IntOrString{IntVal: 5000},
},
},
PeriodSeconds: 5,
TimeoutSeconds: 3,
PeriodSeconds: 10,
TimeoutSeconds: 10,
InitialDelaySeconds: 15,
},
},
Expand Down
16 changes: 8 additions & 8 deletions controllers/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,8 @@ func TestDPAReconciler_buildRegistryDeployment(t *testing.T) {
Port: intstr.IntOrString{IntVal: 5000},
},
},
PeriodSeconds: 5,
TimeoutSeconds: 3,
PeriodSeconds: 10,
TimeoutSeconds: 10,
InitialDelaySeconds: 15,
},
ReadinessProbe: &corev1.Probe{
Expand All @@ -627,8 +627,8 @@ func TestDPAReconciler_buildRegistryDeployment(t *testing.T) {
Port: intstr.IntOrString{IntVal: 5000},
},
},
PeriodSeconds: 5,
TimeoutSeconds: 3,
PeriodSeconds: 10,
TimeoutSeconds: 10,
InitialDelaySeconds: 15,
},
},
Expand Down Expand Up @@ -705,8 +705,8 @@ func TestDPAReconciler_buildRegistryContainer(t *testing.T) {
Port: intstr.IntOrString{IntVal: 5000},
},
},
PeriodSeconds: 5,
TimeoutSeconds: 3,
PeriodSeconds: 10,
TimeoutSeconds: 10,
InitialDelaySeconds: 15,
},
ReadinessProbe: &corev1.Probe{
Expand All @@ -716,8 +716,8 @@ func TestDPAReconciler_buildRegistryContainer(t *testing.T) {
Port: intstr.IntOrString{IntVal: 5000},
},
},
PeriodSeconds: 5,
TimeoutSeconds: 3,
PeriodSeconds: 10,
TimeoutSeconds: 10,
InitialDelaySeconds: 15,
},
}
Expand Down
12 changes: 4 additions & 8 deletions docs/developer/testing/ MULTI_CLOUD_TESTING_UPDATES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,23 @@ In ideal cases, both the credentials / profile for BSL and VSL would be the same

#### AWS Multi Profile Support

The CI Cloud credential is present at this location in OpenShift CI Cluster:
The CI Cloud credential for VSL is present at this location in OpenShift CI Cluster:
`/var/run/secrets/ci.openshift.io/cluster-profile/.awscred`

Our Cloud credential used for BSL is present at this location:
`/var/run/oadp-credentials/new-aws-credentials`

Here since they are two profiles, we are using the concept of credentialsFile in BSL config [ref] (https://github.com/vmware-tanzu/velero/issues/3428)

We are also mounting credentials [here](https://github.com/openshift/oadp-operator/blob/master/pkg/credentials/credentials.go#L37)
Here since they are two profiles, we are using BSL.Spec.Credential to set BSL credentials, and [default credential names](https://github.com/openshift/oadp-operator/blob/b64e96e4432d266fe5a7680aa5406e160cded824/pkg/credentials/credentials.go#L34) for VSL.

#### GCP

The CI Cloud credential is present at this location in OpenShift CI Cluster:
The CI Cloud credential for VSL is present at this location in OpenShift CI Cluster:
`/var/run/secrets/ci.openshift.io/cluster-profile/gce.json`

Our Cloud credential used for BSL is present at this location:
`/var/run/oadp-credentials/gcp-credentials`

Here since they are two different credentials and not profiles, we are using the concept of credentialsFile in BSL config [ref](https://github.com/vmware-tanzu/velero/issues/3430)

We are also mounting credentials [here](https://github.com/openshift/oadp-operator/blob/master/pkg/credentials/credentials.go#L47)
Here since they are two profiles, we are using BSL.Spec.Credential to set BSL credentials, and [default credential names](https://github.com/openshift/oadp-operator/blob/b64e96e4432d266fe5a7680aa5406e160cded824/pkg/credentials/credentials.go#L34) for VSL.

#### [Azure](https://github.com/vmware-tanzu/velero/issues/3429)

Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.16
require (
github.com/aws/aws-sdk-go v1.28.2
github.com/go-logr/logr v0.4.0
github.com/google/go-cmp v0.5.6
github.com/google/uuid v1.1.2
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0
github.com/onsi/ginkgo v1.16.4
Expand Down
Loading