Skip to content

Commit

Permalink
fix in-place CRs status (#7487)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavmpandey08 authored Feb 5, 2024
1 parent 44abd79 commit 52ca0fc
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@ spec:
description: Upgraded is the number of machines that have been upgraded.
format: int64
type: integer
required:
- requireUpgrade
- upgraded
type: object
type: object
served: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@ spec:
that have been upgraded.
format: int64
type: integer
required:
- requireUpgrade
- upgraded
type: object
type: object
served: true
Expand Down
6 changes: 0 additions & 6 deletions config/manifest/eksa-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4615,9 +4615,6 @@ spec:
description: Upgraded is the number of machines that have been upgraded.
format: int64
type: integer
required:
- requireUpgrade
- upgraded
type: object
type: object
served: true
Expand Down Expand Up @@ -5158,9 +5155,6 @@ spec:
that have been upgraded.
format: int64
type: integer
required:
- requireUpgrade
- upgraded
type: object
type: object
served: true
Expand Down
5 changes: 4 additions & 1 deletion controllers/controlplaneupgrade_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ func (r *ControlPlaneUpgradeReconciler) updateStatus(ctx context.Context, log lo
nodesUpgradeRequired := len(cpUpgrade.Spec.MachinesRequireUpgrade)
for _, machineRef := range cpUpgrade.Spec.MachinesRequireUpgrade {
if err := r.client.Get(ctx, GetNamespacedNameType(nodeUpgraderName(machineRef.Name), constants.EksaSystemNamespace), nodeUpgrade); err != nil {
if apierrors.IsNotFound(err) {
continue
}
return fmt.Errorf("getting node upgrader for machine %s: %v", machineRef.Name, err)
}
if nodeUpgrade.Status.Completed {
Expand All @@ -233,7 +236,7 @@ func (r *ControlPlaneUpgradeReconciler) updateStatus(ctx context.Context, log lo
nodesUpgradeRequired--
}
}
log.Info("Control Plane Nodes ready", "total", cpUpgrade.Status.Upgraded, "need-upgrade", cpUpgrade.Status.RequireUpgrade)
log.Info("Control Plane Nodes ready", "upgraded", cpUpgrade.Status.Upgraded, "need-upgrade", cpUpgrade.Status.RequireUpgrade)
cpUpgrade.Status.Upgraded = int64(nodesUpgradeCompleted)
cpUpgrade.Status.RequireUpgrade = int64(nodesUpgradeRequired)
cpUpgrade.Status.Ready = nodesUpgradeRequired == 0
Expand Down
12 changes: 9 additions & 3 deletions controllers/controlplaneupgrade_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func TestCPUpgradeReconcileNodeNotUpgraded(t *testing.T) {
g.Expect(err).ToNot(HaveOccurred())
}

func TestCPUpgradeReconcileNodeUpgradeError(t *testing.T) {
func TestCPUpgradeReconcileNodeUpgradeEnsureStatusUpdated(t *testing.T) {
g := NewWithT(t)
ctx := context.Background()
testObjs := getObjectsForCPUpgradeTest()
Expand All @@ -134,8 +134,14 @@ func TestCPUpgradeReconcileNodeUpgradeError(t *testing.T) {
r := controllers.NewControlPlaneUpgradeReconciler(client)
req := cpUpgradeRequest(testObjs.cpUpgrade)
_, err := r.Reconcile(ctx, req)
g.Expect(err).To(HaveOccurred())
g.Expect(err).To(MatchError("getting node upgrader for machine machine02: nodeupgrades.anywhere.eks.amazonaws.com \"machine02-node-upgrader\" not found"))
g.Expect(err).ToNot(HaveOccurred())

cpu := &anywherev1.ControlPlaneUpgrade{}
err = client.Get(ctx, types.NamespacedName{Name: testObjs.cpUpgrade.Name, Namespace: constants.EksaSystemNamespace}, cpu)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(cpu.Status.RequireUpgrade).To(BeEquivalentTo(2))
g.Expect(cpu.Status.Upgraded).To(BeEquivalentTo(0))
g.Expect(cpu.Status.Ready).To(BeFalse())
}

func TestCPUpgradeReconcileNodeUpgraderCreate(t *testing.T) {
Expand Down
7 changes: 5 additions & 2 deletions controllers/machinedeploymentupgrade_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,18 @@ func (r *MachineDeploymentUpgradeReconciler) updateStatus(ctx context.Context, l
for _, machine := range mdUpgrade.Spec.MachinesRequireUpgrade {
nodeUpgrade, err := getNodeUpgrade(ctx, r.client, nodeUpgraderName(machine.Name))
if err != nil {
return err
if apierrors.IsNotFound(err) {
continue
}
return fmt.Errorf("getting node upgrader for machine %s: %v", machine.Name, err)
}
if nodeUpgrade.Status.Completed {
nodesUpgradeCompleted++
nodesUpgradeRequired--

}
}
log.Info("Worker nodes ready", "total", mdUpgrade.Status.Upgraded, "need-upgrade", mdUpgrade.Status.RequireUpgrade)
log.Info("Worker nodes ready", "upgraded", mdUpgrade.Status.Upgraded, "need-upgrade", mdUpgrade.Status.RequireUpgrade)
mdUpgrade.Status.Upgraded = int64(nodesUpgradeCompleted)
mdUpgrade.Status.RequireUpgrade = int64(nodesUpgradeRequired)
mdUpgrade.Status.Ready = nodesUpgradeRequired == 0
Expand Down
147 changes: 74 additions & 73 deletions controllers/machinedeploymentupgrade_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ func TestMDUpgradeReconcile(t *testing.T) {
g := NewWithT(t)
ctx := context.Background()

cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms := getObjectsForMDUpgradeTest()
nodeUpgrade.Name = fmt.Sprintf("%s-node-upgrader", machine.Name)
nodeUpgrade.Status = anywherev1.NodeUpgradeStatus{
Completed: true,
}
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms).Build()
cluster, machines, nodes, mdUpgrade, nodeUpgrades, md, ms := getObjectsForMDUpgradeTest()
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machines[0], machines[1], nodes[0], nodes[1], mdUpgrade, nodeUpgrades[0], nodeUpgrades[1], md, ms).Build()

r := controllers.NewMachineDeploymentUpgradeReconciler(client)
req := mdUpgradeRequest(mdUpgrade)
Expand All @@ -41,25 +37,31 @@ func TestMDUpgradeReconcile(t *testing.T) {
mdu := &anywherev1.MachineDeploymentUpgrade{}
err = client.Get(ctx, types.NamespacedName{Name: mdUpgrade.Name, Namespace: constants.EksaSystemNamespace}, mdu)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(mdu.Status.RequireUpgrade).To(BeEquivalentTo(0))
g.Expect(mdu.Status.Upgraded).To(BeEquivalentTo(2))
g.Expect(mdu.Status.Ready).To(BeTrue())
}

func TestMDUpgradeReconcileNodesNotReadyYet(t *testing.T) {
g := NewWithT(t)
ctx := context.Background()

cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms := getObjectsForMDUpgradeTest()
mdUpgrade.Status = anywherev1.MachineDeploymentUpgradeStatus{
Upgraded: 0,
RequireUpgrade: 1,
cluster, machines, nodes, mdUpgrade, nodeUpgrades, md, ms := getObjectsForMDUpgradeTest()
nodeUpgrades[1].Status = anywherev1.NodeUpgradeStatus{
Completed: false,
}
nodeUpgrade.Name = fmt.Sprintf("%s-node-upgrader", machine.Name)
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms).Build()
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machines[0], machines[1], nodes[0], nodes[1], mdUpgrade, nodeUpgrades[0], nodeUpgrades[1], md, ms).Build()

r := controllers.NewMachineDeploymentUpgradeReconciler(client)
req := mdUpgradeRequest(mdUpgrade)
_, err := r.Reconcile(ctx, req)
g.Expect(err).ToNot(HaveOccurred())

mdu := &anywherev1.MachineDeploymentUpgrade{}
err = client.Get(ctx, types.NamespacedName{Name: mdUpgrade.Name, Namespace: constants.EksaSystemNamespace}, mdu)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(mdu.Status.RequireUpgrade).To(BeEquivalentTo(1))
g.Expect(mdu.Status.Upgraded).To(BeEquivalentTo(1))
g.Expect(mdUpgrade.Status.Ready).To(BeFalse())
}

Expand All @@ -68,77 +70,70 @@ func TestMDUpgradeReconcileDelete(t *testing.T) {
now := metav1.Now()
ctx := context.Background()

cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms := getObjectsForMDUpgradeTest()
nodeUpgrade.Name = fmt.Sprintf("%s-node-upgrader", machine.Name)
nodeUpgrade.Status = anywherev1.NodeUpgradeStatus{
Completed: true,
}
cluster, machines, nodes, mdUpgrade, nodeUpgrades, md, ms := getObjectsForMDUpgradeTest()
mdUpgrade.DeletionTimestamp = &now
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms).Build()
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machines[0], machines[1], nodes[0], nodes[1], mdUpgrade, nodeUpgrades[0], nodeUpgrades[1], md, ms).Build()

r := controllers.NewMachineDeploymentUpgradeReconciler(client)
req := mdUpgradeRequest(mdUpgrade)
_, err := r.Reconcile(ctx, req)
g.Expect(err).ToNot(HaveOccurred())

n := &anywherev1.NodeUpgrade{}
err = client.Get(ctx, types.NamespacedName{Name: nodeUpgrade.Name, Namespace: constants.EksaSystemNamespace}, n)
err = client.Get(ctx, types.NamespacedName{Name: nodeUpgrades[0].Name, Namespace: constants.EksaSystemNamespace}, n)
g.Expect(err).To(MatchError("nodeupgrades.anywhere.eks.amazonaws.com \"machine01-node-upgrader\" not found"))

err = client.Get(ctx, types.NamespacedName{Name: nodeUpgrades[1].Name, Namespace: constants.EksaSystemNamespace}, n)
g.Expect(err).To(MatchError("nodeupgrades.anywhere.eks.amazonaws.com \"machine02-node-upgrader\" not found"))
}

func TestMDUpgradeReconcileDeleteNodeUgradeAlreadyDeleted(t *testing.T) {
func TestMDUpgradeReconcileDeleteNodeUpgradeAlreadyDeleted(t *testing.T) {
g := NewWithT(t)
now := metav1.Now()
ctx := context.Background()

cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms := getObjectsForMDUpgradeTest()
nodeUpgrade.Name = fmt.Sprintf("%s-node-upgrader", machine.Name)
nodeUpgrade.Status = anywherev1.NodeUpgradeStatus{
Completed: true,
}
cluster, machines, nodes, mdUpgrade, nodeUpgrades, md, ms := getObjectsForMDUpgradeTest()
mdUpgrade.DeletionTimestamp = &now
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms).Build()
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machines[0], machines[1], nodes[0], nodes[1], mdUpgrade, nodeUpgrades[0], nodeUpgrades[1], md, ms).Build()

r := controllers.NewMachineDeploymentUpgradeReconciler(client)
req := mdUpgradeRequest(mdUpgrade)
_, err := r.Reconcile(ctx, req)
g.Expect(err).ToNot(HaveOccurred())

n := &anywherev1.NodeUpgrade{}
err = client.Get(ctx, types.NamespacedName{Name: nodeUpgrade.Name, Namespace: constants.EksaSystemNamespace}, n)
err = client.Get(ctx, types.NamespacedName{Name: nodeUpgrades[0].Name, Namespace: constants.EksaSystemNamespace}, n)
g.Expect(err).To(MatchError("nodeupgrades.anywhere.eks.amazonaws.com \"machine01-node-upgrader\" not found"))

err = client.Get(ctx, types.NamespacedName{Name: nodeUpgrades[1].Name, Namespace: constants.EksaSystemNamespace}, n)
g.Expect(err).To(MatchError("nodeupgrades.anywhere.eks.amazonaws.com \"machine02-node-upgrader\" not found"))

_, err = r.Reconcile(ctx, req)
g.Expect(err).ToNot(HaveOccurred())
}

func TestMDUpgradeReconcileNodeUpgraderCreate(t *testing.T) {
g := NewWithT(t)
ctx := context.Background()
cluster, machine, node, mdUpgrade, _, md, ms := getObjectsForMDUpgradeTest()
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machine, node, mdUpgrade, md, ms).Build()
cluster, machines, nodes, mdUpgrade, _, md, ms := getObjectsForMDUpgradeTest()
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machines[0], machines[1], nodes[0], nodes[1], mdUpgrade, md, ms).Build()

r := controllers.NewMachineDeploymentUpgradeReconciler(client)
req := mdUpgradeRequest(mdUpgrade)
_, err := r.Reconcile(ctx, req)
g.Expect(err).ToNot(HaveOccurred())

n := &anywherev1.NodeUpgrade{}
nodeUpgradeName := fmt.Sprintf("%s-node-upgrader", machine.Name)
nodeUpgradeName := fmt.Sprintf("%s-node-upgrader", machines[0].Name)
err = client.Get(ctx, types.NamespacedName{Name: nodeUpgradeName, Namespace: constants.EksaSystemNamespace}, n)
g.Expect(err).ToNot(HaveOccurred())
}

func TestMDUpgradeObjectDoesNotExist(t *testing.T) {
g := NewWithT(t)
ctx := context.Background()

cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms := getObjectsForMDUpgradeTest()
nodeUpgrade.Name = fmt.Sprintf("%s-node-upgrade", machine.Name)
nodeUpgrade.Status = anywherev1.NodeUpgradeStatus{
Completed: true,
}
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machine, node, nodeUpgrade, md, ms).Build()
cluster, machines, nodes, mdUpgrade, nodeUpgrades, md, ms := getObjectsForMDUpgradeTest()
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machines[0], machines[1], nodes[0], nodes[1], nodeUpgrades[0], nodeUpgrades[1], md, ms).Build()

r := controllers.NewMachineDeploymentUpgradeReconciler(client)
req := mdUpgradeRequest(mdUpgrade)
Expand All @@ -150,13 +145,9 @@ func TestMDUpgradeReconcileUpdateMachineSet(t *testing.T) {
g := NewWithT(t)
ctx := context.Background()

cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms := getObjectsForMDUpgradeTest()
nodeUpgrade.Name = fmt.Sprintf("%s-node-upgrader", machine.Name)
nodeUpgrade.Status = anywherev1.NodeUpgradeStatus{
Completed: true,
}
cluster, machines, nodes, mdUpgrade, nodeUpgrades, md, ms := getObjectsForMDUpgradeTest()
mdUpgrade.Status.Ready = true
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms).Build()
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machines[0], machines[1], nodes[0], nodes[1], nodeUpgrades[0], nodeUpgrades[1], mdUpgrade, md, ms).Build()

r := controllers.NewMachineDeploymentUpgradeReconciler(client)
req := mdUpgradeRequest(mdUpgrade)
Expand All @@ -167,21 +158,17 @@ func TestMDUpgradeReconcileUpdateMachineSet(t *testing.T) {
err = client.Get(ctx, types.NamespacedName{Name: "my-md-ms", Namespace: constants.EksaSystemNamespace}, ms)
g.Expect(err).ToNot(HaveOccurred())
if !strings.Contains(*ms.Spec.Template.Spec.Version, k8s128) {
t.Fatalf("unexpected k8s version in capi machine: %s", *machine.Spec.Version)
t.Fatalf("unexpected k8s version in capi machine: %s", *machines[0].Spec.Version)
}
}

func TestMDUpgradeReconcileUpdateMachineSetError(t *testing.T) {
g := NewWithT(t)
ctx := context.Background()

cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms := getObjectsForMDUpgradeTest()
nodeUpgrade.Name = fmt.Sprintf("%s-node-upgrader", machine.Name)
nodeUpgrade.Status = anywherev1.NodeUpgradeStatus{
Completed: true,
}
cluster, machines, nodes, mdUpgrade, nodeUpgrades, md, ms := getObjectsForMDUpgradeTest()
ms.Annotations[clusterv1.RevisionAnnotation] = "0"
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms).Build()
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machines[0], machines[1], nodes[0], nodes[1], nodeUpgrades[0], nodeUpgrades[1], mdUpgrade, md, ms).Build()

r := controllers.NewMachineDeploymentUpgradeReconciler(client)
req := mdUpgradeRequest(mdUpgrade)
Expand All @@ -193,29 +180,39 @@ func TestMDObjectDoesNotExistError(t *testing.T) {
g := NewWithT(t)
ctx := context.Background()

cluster, machine, node, mdUpgrade, nodeUpgrade, _, ms := getObjectsForMDUpgradeTest()
nodeUpgrade.Name = fmt.Sprintf("%s-node-upgrade", machine.Name)
nodeUpgrade.Status = anywherev1.NodeUpgradeStatus{
Completed: true,
}
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machine, node, nodeUpgrade, mdUpgrade, ms).Build()
cluster, machines, nodes, mdUpgrade, nodeUpgrades, _, ms := getObjectsForMDUpgradeTest()
client := fake.NewClientBuilder().WithRuntimeObjects(cluster, machines[0], machines[1], nodes[0], nodes[1], nodeUpgrades[0], nodeUpgrades[1], mdUpgrade, ms).Build()

r := controllers.NewMachineDeploymentUpgradeReconciler(client)
req := mdUpgradeRequest(mdUpgrade)
_, err := r.Reconcile(ctx, req)
g.Expect(err).To(MatchError("getting MachineDeployment my-cluster-md: machinedeployments.cluster.x-k8s.io \"my-cluster-md\" not found"))
}

func getObjectsForMDUpgradeTest() (*clusterv1.Cluster, *clusterv1.Machine, *corev1.Node, *anywherev1.MachineDeploymentUpgrade, *anywherev1.NodeUpgrade, *clusterv1.MachineDeployment, *clusterv1.MachineSet) {
func getObjectsForMDUpgradeTest() (*clusterv1.Cluster, []*clusterv1.Machine, []*corev1.Node, *anywherev1.MachineDeploymentUpgrade, []*anywherev1.NodeUpgrade, *clusterv1.MachineDeployment, *clusterv1.MachineSet) {
cluster := generateCluster()
node := generateNode()
kubeadmConfig := generateKubeadmConfig()
machine := generateMachine(cluster, node, kubeadmConfig)
nodeUpgrade := generateNodeUpgrade(machine)
mdUpgrade := generateMDUpgrade(cluster, machine)
node1 := generateNode()
node2 := node1.DeepCopy()
node2.ObjectMeta.Name = "node02"
kubeadmConfig1 := generateKubeadmConfig()
kubeadmConfig2 := generateKubeadmConfig()
machine1 := generateMachine(cluster, node1, kubeadmConfig1)
machine2 := generateMachine(cluster, node2, kubeadmConfig2)
machine2.ObjectMeta.Name = "machine02"
nodeUpgrade1 := generateNodeUpgrade(machine1)
nodeUpgrade1.Status = anywherev1.NodeUpgradeStatus{
Completed: true,
}
nodeUpgrade1.Name = fmt.Sprintf("%s-node-upgrader", machine1.Name)
nodeUpgrade2 := generateNodeUpgrade(machine2)
nodeUpgrade2.Status = anywherev1.NodeUpgradeStatus{
Completed: true,
}
nodeUpgrade2.Name = fmt.Sprintf("%s-node-upgrader", machine2.Name)
mdUpgrade := generateMDUpgrade(cluster, machine1, machine2)
md := generateMachineDeployment(cluster)
ms := generateMachineset(cluster)
return cluster, machine, node, mdUpgrade, nodeUpgrade, md, ms
return cluster, []*clusterv1.Machine{machine1, machine2}, []*corev1.Node{node1, node2}, mdUpgrade, []*anywherev1.NodeUpgrade{nodeUpgrade1, nodeUpgrade2}, md, ms
}

func mdUpgradeRequest(mdUpgrade *anywherev1.MachineDeploymentUpgrade) reconcile.Request {
Expand All @@ -227,10 +224,20 @@ func mdUpgradeRequest(mdUpgrade *anywherev1.MachineDeploymentUpgrade) reconcile.
}
}

func generateMDUpgrade(cluster *clusterv1.Cluster, machine *clusterv1.Machine) *anywherev1.MachineDeploymentUpgrade {
func generateMDUpgrade(cluster *clusterv1.Cluster, machines ...*clusterv1.Machine) *anywherev1.MachineDeploymentUpgrade {
machineSpec := getMachineSpec(cluster)
machineSpecJSON, _ := json.Marshal(machineSpec)
machineSpecB64Encoded := base64.StdEncoding.EncodeToString(machineSpecJSON)
machinesRequireUpdate := []corev1.ObjectReference{}
for i := range machines {
machine := machines[i]
machinesRequireUpdate = append(machinesRequireUpdate, corev1.ObjectReference{
Kind: "Machine",
Name: machine.Name,
Namespace: machine.Namespace,
})
}

return &anywherev1.MachineDeploymentUpgrade{
ObjectMeta: metav1.ObjectMeta{
Name: "md-upgrade-request",
Expand All @@ -242,15 +249,9 @@ func generateMDUpgrade(cluster *clusterv1.Cluster, machine *clusterv1.Machine) *
Kind: "MachineDeployment",
Namespace: constants.EksaSystemNamespace,
},
MachinesRequireUpgrade: []corev1.ObjectReference{
{
Kind: "Machine",
Name: machine.Name,
Namespace: machine.Namespace,
},
},
KubernetesVersion: k8s128,
MachineSpecData: machineSpecB64Encoded,
MachinesRequireUpgrade: machinesRequireUpdate,
KubernetesVersion: k8s128,
MachineSpecData: machineSpecB64Encoded,
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/nodeupgrade_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (r *NodeUpgradeReconciler) reconcile(ctx context.Context, log logr.Logger,
log.Info("Upgrading node", "Node", node.Name)
upgraderPod := &corev1.Pod{}
if conditions.IsTrue(nodeUpgrade, anywherev1.UpgraderPodCreated) || upgraderPodExists(ctx, remoteClient, node.Name) {
log.Info("Upgrader pod already exists, skipping creation of the pod", "Pod", upgraderPod.Name)
log.Info("Upgrader pod already exists, skipping creation of the pod", "Pod", upgrader.PodName(node.Name))
return ctrl.Result{}, nil
}

Expand Down
Loading

0 comments on commit 52ca0fc

Please sign in to comment.