Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
add some todo for runtime tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
pacoxu committed May 19, 2022
1 parent 54d84d5 commit 92b72d0
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions commands/kubeadm_upgrade_apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
operatorv1 "k8s.io/kubeadm/operator/api/v1alpha1"
)

// TODO this is a temporary hack to get the "kubeadm upgrade apply" to work
func runKubeadmUpgradeApply(spec *operatorv1.KubeadmUpgradeApplyCommandSpec, log logr.Logger) error {
return nil
}
1 change: 1 addition & 0 deletions commands/kubeadm_upgrade_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
operatorv1 "k8s.io/kubeadm/operator/api/v1alpha1"
)

// TODO this is a temporary hack to get the "kubeadm upgrade node" to work
func runKubeadmUpgradeNode(spec *operatorv1.KubeadmUpgradeNodeCommandSpec, log logr.Logger) error {
return nil
}
1 change: 1 addition & 0 deletions commands/kubectl_drain.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
operatorv1 "k8s.io/kubeadm/operator/api/v1alpha1"
)

// TODO this is a temporary hack to get the "kubectl drain" to work
func runKubectlDrain(spec *operatorv1.KubectlDrainCommandSpec, log logr.Logger) error {
return nil
}
1 change: 1 addition & 0 deletions commands/kubectl_uncordon.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
operatorv1 "k8s.io/kubeadm/operator/api/v1alpha1"
)

// TODO this is a temporary hack to get the "kubectl uncordon" to work
func runKubectlUncordon(spec *operatorv1.KubectlUncordonCommandSpec, log logr.Logger) error {
return nil
}
1 change: 1 addition & 0 deletions commands/upgrade_kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
operatorv1 "k8s.io/kubeadm/operator/api/v1alpha1"
)

// TODO this is a temporary hack to get the upgrading kubeadm to work
func runUpgradeKubeadm(spec *operatorv1.UpgradeKubeadmCommandSpec, log logr.Logger) error {
return nil
}
1 change: 1 addition & 0 deletions commands/upgrade_kubectlkubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
operatorv1 "k8s.io/kubeadm/operator/api/v1alpha1"
)

// TODO this is a temporary hack to get the kubectl & kubelet upgrade to work
func runUpgradeKubectlAndKubelet(spec *operatorv1.UpgradeKubeletAndKubeactlCommandSpec, log logr.Logger) error {
return nil
}
1 change: 1 addition & 0 deletions controllers/operation_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ func (r *OperationReconciler) reconcileDaemonSet(operation *operatorv1.Operation
return nil
}

// daemonset will be created only if the operation is in controlled mode.
if !daemonSetShouldBeRunning(operation) {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/runtimetask_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ func (r *RuntimeTaskReconciler) reconcileNormal(executionMode operatorv1.Operati
}

// Proceed with the current command execution

if executionMode == operatorv1.OperationExecutionModeDryRun {
// if dry running wait for an arbitrary delay so the user will get a better perception of the Task execution order
time.Sleep(3 * time.Second)
// TODO should we collect log for dry-run?
} else {
// else we should execute the CurrentCommand
log.WithValues("command", task.Status.CurrentCommand).Info("running command")
Expand Down

0 comments on commit 92b72d0

Please sign in to comment.