Merge pull request #7775 from simon3z/cloud-provider-id
api: add the ProviderID attribute to NodeSpec
This commit is contained in:
@@ -995,6 +995,7 @@ func convert_api_NodeSpec_To_v1_NodeSpec(in *api.NodeSpec, out *NodeSpec, s conv
|
||||
}
|
||||
out.PodCIDR = in.PodCIDR
|
||||
out.ExternalID = in.ExternalID
|
||||
out.ProviderID = in.ProviderID
|
||||
out.Unschedulable = in.Unschedulable
|
||||
return nil
|
||||
}
|
||||
@@ -3269,6 +3270,7 @@ func convert_v1_NodeSpec_To_api_NodeSpec(in *NodeSpec, out *api.NodeSpec, s conv
|
||||
}
|
||||
out.PodCIDR = in.PodCIDR
|
||||
out.ExternalID = in.ExternalID
|
||||
out.ProviderID = in.ProviderID
|
||||
out.Unschedulable = in.Unschedulable
|
||||
return nil
|
||||
}
|
||||
|
@@ -852,6 +852,7 @@ func deepCopy_v1_NodeList(in NodeList, out *NodeList, c *conversion.Cloner) erro
|
||||
func deepCopy_v1_NodeSpec(in NodeSpec, out *NodeSpec, c *conversion.Cloner) error {
|
||||
out.PodCIDR = in.PodCIDR
|
||||
out.ExternalID = in.ExternalID
|
||||
out.ProviderID = in.ProviderID
|
||||
out.Unschedulable = in.Unschedulable
|
||||
return nil
|
||||
}
|
||||
|
@@ -397,6 +397,9 @@ func TestSetDefaultNodeExternalID(t *testing.T) {
|
||||
if n2.Spec.ExternalID != name {
|
||||
t.Errorf("Expected default External ID: %s, got: %s", name, n2.Spec.ExternalID)
|
||||
}
|
||||
if n2.Spec.ProviderID != "" {
|
||||
t.Errorf("Expected empty default Cloud Provider ID, got: %s", n2.Spec.ProviderID)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetDefaultObjectFieldSelectorAPIVersion(t *testing.T) {
|
||||
|
@@ -1229,7 +1229,9 @@ type NodeSpec struct {
|
||||
// PodCIDR represents the pod IP range assigned to the node
|
||||
PodCIDR string `json:"podCIDR,omitempty" description:"pod IP range assigned to the node"`
|
||||
// External ID of the node assigned by some machine database (e.g. a cloud provider)
|
||||
ExternalID string `json:"externalID,omitempty" description:"external ID assigned to the node by some machine database (e.g. a cloud provider). Defaults to node name when empty."`
|
||||
ExternalID string `json:"externalID,omitempty" description:"deprecated. External ID assigned to the node by some machine database (e.g. a cloud provider). Defaults to node name when empty."`
|
||||
// ID of the node assigned by the cloud provider
|
||||
ProviderID string `json:"providerID,omitempty" description:"ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>"`
|
||||
// Unschedulable controls node schedulability of new pods. By default node is schedulable.
|
||||
Unschedulable bool `json:"unschedulable,omitempty" description:"disable pod scheduling on the node"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user