Skip to content

Commit

Permalink
Extend MachineStatus to add ProviderID (kubernetes-sigs#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikaschoudhary16 authored and k8s-ci-robot committed Jan 30, 2019
1 parent 9d16c16 commit 3e0d971
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/apis/cluster/v1alpha1/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ type MachineSpec struct {
// as-is.
// +optional
ConfigSource *corev1.NodeConfigSource `json:"configSource,omitempty"`

// ProviderID is the identification ID of the machine provided by the provider.
// This field must match the provider ID as seen on the node object corresponding to this machine.
// This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler
// with cluster-api as provider. Clean-up login in the autoscaler compares machines v/s nodes to find out
// machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a
// generic out-of-tree provider for autoscaler, this field is required by autoscaler to be
// able to have a provider view of the list of machines. Another list of nodes is queries from the k8s apiserver
// and then comparison is done to find out unregistered machines and are marked for delete.
// This field will be set by the actuators and consumed by higher level entities like autoscaler who will
// be interfacing with cluster-api as generic provider.
// +optional
ProviderID *string `json:"providerID,omitempty"`
}

/// [MachineSpec]
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3e0d971

Please sign in to comment.