From c4469ba9fd46e80bce03161108b953ee27671185 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Mon, 15 Jan 2018 22:11:40 -0700 Subject: [PATCH] Create cluster reg token --- apis/management.cattle.io/v3/cluster_types.go | 4 ++++ apis/management.cattle.io/v3/machine_types.go | 1 + 2 files changed, 5 insertions(+) diff --git a/apis/management.cattle.io/v3/cluster_types.go b/apis/management.cattle.io/v3/cluster_types.go index 5f1fe240..4d532cfa 100644 --- a/apis/management.cattle.io/v3/cluster_types.go +++ b/apis/management.cattle.io/v3/cluster_types.go @@ -69,6 +69,7 @@ type ClusterStatus struct { AppliedSpec ClusterSpec `json:"appliedSpec,omitempty"` Requested v1.ResourceList `json:"requested,omitempty"` Limits v1.ResourceList `json:"limits,omitempty"` + ClusterName string `json:"clusterName,omitempty"` } type ClusterComponentStatus struct { @@ -148,6 +149,8 @@ type ClusterEvent struct { } type ClusterRegistrationToken struct { + types.Namespaced + metav1.TypeMeta `json:",inline"` // Standard object’s metadata. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata @@ -161,6 +164,7 @@ type ClusterRegistrationToken struct { } type ClusterRegistrationTokenSpec struct { + ClusterName string `json:"clusterName" norman:"type=reference[cluster]"` } type ClusterRegistrationTokenStatus struct { diff --git a/apis/management.cattle.io/v3/machine_types.go b/apis/management.cattle.io/v3/machine_types.go index e975a419..713a9070 100644 --- a/apis/management.cattle.io/v3/machine_types.go +++ b/apis/management.cattle.io/v3/machine_types.go @@ -71,6 +71,7 @@ type MachineStatus struct { MachineDriverConfig string `json:"machineDriverConfig,omitempty"` NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty"` NodeLabels map[string]string `json:"nodeLabels,omitempty"` + Token string `json:"token"` } var (