From 9ffb8818c2ee258767fb9aa53dcc1e8fba046ab2 Mon Sep 17 00:00:00 2001 From: Vikas Choudhary Date: Sun, 28 Oct 2018 06:02:05 +0530 Subject: [PATCH] Extend MachineStatus to add ProviderID --- pkg/apis/cluster/v1alpha1/machine_types.go | 7 ++++++- pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pkg/apis/cluster/v1alpha1/machine_types.go b/pkg/apis/cluster/v1alpha1/machine_types.go index 55dda209b10c..f49ce8730eb3 100644 --- a/pkg/apis/cluster/v1alpha1/machine_types.go +++ b/pkg/apis/cluster/v1alpha1/machine_types.go @@ -79,6 +79,11 @@ 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. + // +optional + ProviderID *string `json:"providerID,omitempty"` } /// [MachineSpec] @@ -139,7 +144,7 @@ type MachineStatus struct { // serialized/deserialized from this field. // +optional ProviderStatus *runtime.RawExtension `json:"providerStatus,omitempty"` - + // Addresses is a list of addresses assigned to the machine. Queried from cloud provider, if available. // +optional Addresses []corev1.NodeAddress `json:"addresses,omitempty"` diff --git a/pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go index 9de6a26780e7..cd5c3b835c51 100644 --- a/pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go @@ -603,6 +603,11 @@ func (in *MachineSpec) DeepCopyInto(out *MachineSpec) { *out = new(v1.NodeConfigSource) (*in).DeepCopyInto(*out) } + if in.ProviderID != nil { + in, out := &in.ProviderID, &out.ProviderID + *out = new(string) + **out = **in + } return }