forked from openshift/machine-api-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openshift#67 from enxebre/crds
Migrate to CRDs - WIP
- Loading branch information
Showing
8,204 changed files
with
389,964 additions
and
1,686,303 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
0001-use-Update-instead-of-Status.Update-as-CustomResourc.patch
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,35 @@ | ||
From 16531c16bfa5030bb5f85d75f20353eeff46ba25 Mon Sep 17 00:00:00 2001 | ||
From: Enxebre <alberto.garcial@hotmail.com> | ||
Date: Fri, 19 Oct 2018 09:51:27 +0200 | ||
Subject: [PATCH] use Update() instead of Status.Update() as | ||
CustomResourceSubresources might not be enable | ||
|
||
--- | ||
vendor/sigs.k8s.io/cluster-api/pkg/controller/node/node.go | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/node/node.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/node/node.go | ||
index cb16730b..f1a4bff3 100644 | ||
--- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/node/node.go | ||
+++ b/vendor/sigs.k8s.io/cluster-api/pkg/controller/node/node.go | ||
@@ -75,7 +75,7 @@ func (c *ReconcileNode) link(node *corev1.Node) error { | ||
t := metav1.Now() | ||
machine.Status.LastUpdated = &t | ||
machine.Status.NodeRef = objectRef(node) | ||
- if err = c.Client.Status().Update(context.Background(), machine); err != nil { | ||
+ if err = c.Client.Update(context.Background(), machine); err != nil { | ||
glog.Errorf("Error updating machine to link to node: %v\n", err) | ||
} else { | ||
glog.Infof("Successfully linked machine %s to node %s\n", | ||
@@ -121,7 +121,7 @@ func (c *ReconcileNode) unlink(node *corev1.Node) error { | ||
t := metav1.Now() | ||
machine.Status.LastUpdated = &t | ||
machine.Status.NodeRef = nil | ||
- if err = c.Client.Status().Update(context.Background(), machine); err != nil { | ||
+ if err = c.Client.Update(context.Background(), machine); err != nil { | ||
glog.Errorf("Error updating machine %s to unlink node %s: %v\n", | ||
machine.ObjectMeta.Name, node.ObjectMeta.Name, err) | ||
} else { | ||
-- | ||
2.15.2 (Apple Git-101.1) | ||
|
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
Oops, something went wrong.