Skip to content

Instantly share code, notes, and snippets.

@thomaswhitcomb
Created February 28, 2020 21:07
Show Gist options
  • Save thomaswhitcomb/43f75bc2c7f4beb7b7343c43021d9086 to your computer and use it in GitHub Desktop.
Save thomaswhitcomb/43f75bc2c7f4beb7b7343c43021d9086 to your computer and use it in GitHub Desktop.
case "eks-cf":
err := r.ReconcileEKSCF(ig, finalizerName)
if err != nil {
log.Errorln(err)
}
currentState := ig.GetState()
if currentState == v1alpha.ReconcileErr {
log.Errorln("reconcile failed")
return ctrl.Result{}, nil
} else if currentState == v1alpha.ReconcileDeleted || currentState == v1alpha.ReconcileReady {
log.Infoln("reconcile completed")
return ctrl.Result{}, nil
} else {
log.Infoln("reconcile completed with requeue")
return ctrl.Result{RequeueAfter: 10 * time.Second}, nil
}
case "eks-fargate":
log.Info("eks-fargate provisioner running")
ig.SetState(v1alpha.ReconcileReady)
//err := r.ReconcileEKSFargate(ig, finalizerName)
//if err != nil {
// log.Errorln(err)
//}
log.Info(fmt.Sprintf("status: %v\n", ig.Status))
log.Info("eks-fargate provisioner all done")
return ctrl.Result{}, nil
default:
log.Errorln("provisioner not implemented")
return ctrl.Result{}, fmt.Errorf("provisioner '%v' not implemented", ig.Spec.Provisioner)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment