-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote Node/Object References #520
Comments
One suggestion is can't we continue to have the
Now whenever any controller wants to use this |
It's a good point. The generic controllers (e.g. MachineSet) do not currently have a way to do this though. |
/assign @davidewatson |
Have we decided on what we want to do here for v1alpha1? |
I think we should punt this from v1alpha1. We have the controllers we have for this release. The main consequence for this repo is that |
SGTM. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
/area api |
Regarding this issue, I'd propose to tackle this in v1alpha1 by creating a new, backward-compatible, controller that references a secret in a specific location.
Happy to start working on it if the above sounds good! |
@vincepri sgtm |
Problem
MachineStatus
contains an optionalNodeRef
field:cluster-api/pkg/apis/cluster/v1alpha1/machine_types.go
Line 90 in f314864
There are a couple of places where the ability to refer to the
Node
corresponding to aMachine
is extremely useful if not essential. Information inNode
objects can be used as surrogates for Exists and Ready conditions as well as general node health (cf. #483).For providers which distinguish between manager and managed clusters,
NodeRef
s will not be set (they are local to a cluster and optional in the spec). There is a related issue about creating a dynamic link between machines/nodes. This issue is asking for a similar link which will also work in the managed cluster case.Examples
MachineSet
controller usesNodeRef
s] to determine the ready replicas count for aMachineSet
which is in turn required for theMachineDeployment
controller." - @alvaroalemancluster-api/pkg/controller/machineset/status.go
Line 58 in f302034
NodeRef
onMachine
s to determine when a machine is ready. @chuckhacluster-api/clusterctl/clusterdeployer/clusterclient/clusterclient.go
Line 572 in f314864
upgrader
usesNodeRef
s to find the version of kubelet running on a node. This is used to determine if an upgrade is necessary. Some providers have tooling which also uses this information to determine when an upgrade is complete.cluster-api/tools/upgrader/util/upgrade.go
Line 62 in f302034
Possible Solution
Add a tuple (APIEndpoint, NodeName) for node objects. More generally (APIEndpoint, Namespace, ObjectName), or maybe (APIEndpoint, UUID), could be used for arbitrary remote object references.
When this has come up in the past @roberthbailey suggested that maybe we should look at the Cluster Registry to see if there is any infrastructure we can share. Looking at it briefly there is an
ObjectReference
type which might be useful:https://github.com/kubernetes/cluster-registry/blob/09c490c051fbd24452921a18b366371c221a71d8/pkg/apis/clusterregistry/v1alpha1/types.go#L114
This issue is to explore whether a single solution for these use cases makes sense.
The text was updated successfully, but these errors were encountered: