-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7096df8
commit d47cccc
Showing
5 changed files
with
104 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package migration | ||
|
||
import ( | ||
"context" | ||
|
||
schemasv1alpha3 "github.com/schemahero/schemahero/pkg/apis/schemas/v1alpha3" | ||
"github.com/schemahero/schemahero/pkg/logger" | ||
"go.uber.org/zap" | ||
corev1 "k8s.io/api/core/v1" | ||
"sigs.k8s.io/controller-runtime/pkg/reconcile" | ||
) | ||
|
||
func (r *ReconcileMigration) getInstance(request reconcile.Request) (*schemasv1alpha3.Migration, error) { | ||
v1alpha3instance := &schemasv1alpha3.Migration{} | ||
err := r.Get(context.Background(), request.NamespacedName, v1alpha3instance) | ||
if err != nil { | ||
return nil, err // don't wrap | ||
} | ||
|
||
return v1alpha3instance, nil | ||
} | ||
|
||
func (r *ReconcileMigration) reconcileInstance(instance *schemasv1alpha3.Migration) (reconcile.Result, error) { | ||
logger.Debug("reconciling migration", | ||
zap.String("kind", instance.Kind), | ||
zap.String("name", instance.Name), | ||
zap.String("tableName", instance.Spec.TableName)) | ||
|
||
return reconcile.Result{}, nil | ||
} | ||
|
||
func (r *ReconcileMigration) reconcilePod(pod *corev1.Pod) (reconcile.Result, error) { | ||
// podLabels := pod.GetObjectMeta().GetLabels() | ||
// role, ok := podLabels["schemahero-role"] | ||
// if !ok { | ||
// return reconcile.Result{}, nil | ||
// } | ||
|
||
return reconcile.Result{}, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters