From 080b3d0a8c7c1e86f9615094496b734ab994d0c1 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Fri, 16 Sep 2016 18:53:32 -0700 Subject: [PATCH] api: types: document NodeSpec ID fields Document MachineID as the preferred field from the discussion here: https://groups.google.com/d/msg/kubernetes-sig-node/_3mXXB1ohZs/EuYtCzHvBgAJ --- api/swagger-spec/v1.json | 4 ++-- docs/api-reference/v1/definitions.html | 6 +++--- pkg/api/types.go | 8 ++++++-- pkg/api/v1/generated.proto | 8 ++++++-- pkg/api/v1/types.go | 8 ++++++-- pkg/api/v1/types_swagger_doc_generated.go | 4 ++-- pkg/genericapiserver/openapi/zz_generated.openapi.go | 4 ++-- 7 files changed, 27 insertions(+), 15 deletions(-) diff --git a/api/swagger-spec/v1.json b/api/swagger-spec/v1.json index 45b9711c01b..8b37631a9ce 100644 --- a/api/swagger-spec/v1.json +++ b/api/swagger-spec/v1.json @@ -16952,11 +16952,11 @@ "properties": { "machineID": { "type": "string", - "description": "Machine ID reported by the node." + "description": "MachineID reported by the node. For unique machine identification in the cluster this field is prefered. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html" }, "systemUUID": { "type": "string", - "description": "System UUID reported by the node." + "description": "SystemUUID reported by the node. For unique machine identification MachineID is prefered. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html" }, "bootID": { "type": "string", diff --git a/docs/api-reference/v1/definitions.html b/docs/api-reference/v1/definitions.html index f3d21e41a9b..0ff2e33e4d4 100755 --- a/docs/api-reference/v1/definitions.html +++ b/docs/api-reference/v1/definitions.html @@ -8044,14 +8044,14 @@ The resulting set of endpoints can be viewed as:

machineID

-

Machine ID reported by the node.

+

MachineID reported by the node. For unique machine identification in the cluster this field is prefered. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html

true

string

systemUUID

-

System UUID reported by the node.

+

SystemUUID reported by the node. For unique machine identification MachineID is prefered. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html

true

string

@@ -8434,7 +8434,7 @@ The resulting set of endpoints can be viewed as:
diff --git a/pkg/api/types.go b/pkg/api/types.go index 881e313a1f5..8cff0e45591 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -2086,9 +2086,13 @@ type NodeDaemonEndpoints struct { // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. type NodeSystemInfo struct { - // Machine ID reported by the node. + // MachineID reported by the node. For unique machine identification + // in the cluster this field is prefered. Learn more from man(5) + // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html MachineID string `json:"machineID"` - // System UUID reported by the node. + // SystemUUID reported by the node. For unique machine identification + // MachineID is prefered. This field is specific to Red Hat hosts + // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html SystemUUID string `json:"systemUUID"` // Boot ID reported by the node. BootID string `json:"bootID"` diff --git a/pkg/api/v1/generated.proto b/pkg/api/v1/generated.proto index 9552a5d558d..94ce93a8d6e 100644 --- a/pkg/api/v1/generated.proto +++ b/pkg/api/v1/generated.proto @@ -1383,10 +1383,14 @@ message NodeStatus { // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. message NodeSystemInfo { - // Machine ID reported by the node. + // MachineID reported by the node. For unique machine identification + // in the cluster this field is prefered. Learn more from man(5) + // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html optional string machineID = 1; - // System UUID reported by the node. + // SystemUUID reported by the node. For unique machine identification + // MachineID is prefered. This field is specific to Red Hat hosts + // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html optional string systemUUID = 2; // Boot ID reported by the node. diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index 9a4b53b2fb2..7701d4d040b 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -2465,9 +2465,13 @@ type NodeDaemonEndpoints struct { // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. type NodeSystemInfo struct { - // Machine ID reported by the node. + // MachineID reported by the node. For unique machine identification + // in the cluster this field is prefered. Learn more from man(5) + // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html MachineID string `json:"machineID" protobuf:"bytes,1,opt,name=machineID"` - // System UUID reported by the node. + // SystemUUID reported by the node. For unique machine identification + // MachineID is prefered. This field is specific to Red Hat hosts + // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html SystemUUID string `json:"systemUUID" protobuf:"bytes,2,opt,name=systemUUID"` // Boot ID reported by the node. BootID string `json:"bootID" protobuf:"bytes,3,opt,name=bootID"` diff --git a/pkg/api/v1/types_swagger_doc_generated.go b/pkg/api/v1/types_swagger_doc_generated.go index a2552bdf3f5..3f0ac8f0238 100644 --- a/pkg/api/v1/types_swagger_doc_generated.go +++ b/pkg/api/v1/types_swagger_doc_generated.go @@ -927,8 +927,8 @@ func (NodeStatus) SwaggerDoc() map[string]string { var map_NodeSystemInfo = map[string]string{ "": "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", - "machineID": "Machine ID reported by the node.", - "systemUUID": "System UUID reported by the node.", + "machineID": "MachineID reported by the node. For unique machine identification in the cluster this field is prefered. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", + "systemUUID": "SystemUUID reported by the node. For unique machine identification MachineID is prefered. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html", "bootID": "Boot ID reported by the node.", "kernelVersion": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", "osImage": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", diff --git a/pkg/genericapiserver/openapi/zz_generated.openapi.go b/pkg/genericapiserver/openapi/zz_generated.openapi.go index 34261f13478..34eab49b140 100644 --- a/pkg/genericapiserver/openapi/zz_generated.openapi.go +++ b/pkg/genericapiserver/openapi/zz_generated.openapi.go @@ -9552,14 +9552,14 @@ func (_ openAPI) OpenAPIDefinitions() *common.OpenAPIDefinitions { Properties: map[string]spec.Schema{ "machineID": { SchemaProps: spec.SchemaProps{ - Description: "Machine ID reported by the node.", + Description: "MachineID reported by the node. For unique machine identification in the cluster this field is prefered. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", Type: []string{"string"}, Format: "", }, }, "systemUUID": { SchemaProps: spec.SchemaProps{ - Description: "System UUID reported by the node.", + Description: "SystemUUID reported by the node. For unique machine identification MachineID is prefered. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html", Type: []string{"string"}, Format: "", },