Compare commits

...

2 Commits

Author SHA1 Message Date
b6c7add468 More logs 2021-06-20 21:01:45 +02:00
7a8df55542 Automate docker build and push 2021-06-20 21:00:22 +02:00
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
IMG ?= desmo999r/formolcontroller:0.2.0
IMG ?= desmo999r/formolcontroller:0.2.2
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
#CRD_OPTIONS ?= "crd:trivialVersions=true"
CRD_OPTIONS ?= "crd:trivialVersions=true,crdVersions=v1"
@ -67,6 +67,8 @@ docker-build: test
docker-push:
podman push ${IMG}
docker: docker-build docker-push
# find or download controller-gen
# download controller-gen if necessary
controller-gen:

View File

@ -313,12 +313,14 @@ func (r *RestoreSessionReconciler) Reconcile(ctx context.Context, req reconcile.
restoreSession.Status.Targets = append(restoreSession.Status.Targets, targetStatus)
switch target.Kind {
case formolv1alpha1.SidecarKind:
log.V(0).Info("Next task is a Sidecard restore", "target", target)
if err := createRestoreInitContainer(target, backupSession.Status.Targets[nextTarget].SnapshotId); err != nil {
log.V(0).Info("unable to create restore init container", "task", target)
targetStatus.SessionState = formolv1alpha1.Failure
return nil, err
}
case formolv1alpha1.JobKind:
log.V(0).Info("Next task is a Job restore", "target", target)
if err := createRestoreJob(target, backupSession.Status.Targets[nextTarget].SnapshotId); err != nil {
log.V(0).Info("unable to create restore job", "task", target)
targetStatus.SessionState = formolv1alpha1.Failure