From bf40909ac13021b44ef5505942218d0e9da98624 Mon Sep 17 00:00:00 2001 From: Michael Riley Date: Mon, 30 Oct 2023 10:21:25 -0400 Subject: [PATCH] Add HA control planes support for VKE (#273) --- kubernetes.go | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/kubernetes.go b/kubernetes.go index 0dcb941..b8082bb 100644 --- a/kubernetes.go +++ b/kubernetes.go @@ -43,17 +43,18 @@ type KubernetesHandler struct { // Cluster represents a full VKE cluster type Cluster struct { - ID string `json:"id"` - Label string `json:"label"` - DateCreated string `json:"date_created"` - ClusterSubnet string `json:"cluster_subnet"` - ServiceSubnet string `json:"service_subnet"` - IP string `json:"ip"` - Endpoint string `json:"endpoint"` - Version string `json:"version"` - Region string `json:"region"` - Status string `json:"status"` - NodePools []NodePool `json:"node_pools"` + ID string `json:"id"` + Label string `json:"label"` + DateCreated string `json:"date_created"` + ClusterSubnet string `json:"cluster_subnet"` + ServiceSubnet string `json:"service_subnet"` + IP string `json:"ip"` + Endpoint string `json:"endpoint"` + Version string `json:"version"` + Region string `json:"region"` + Status string `json:"status"` + HAControlPlanes bool `json:"ha_controlplanes"` + NodePools []NodePool `json:"node_pools"` } // NodePool represents a pool of nodes that are grouped by their label and plan type @@ -87,10 +88,11 @@ type KubeConfig struct { // ClusterReq struct used to create a cluster type ClusterReq struct { - Label string `json:"label"` - Region string `json:"region"` - Version string `json:"version"` - NodePools []NodePoolReq `json:"node_pools"` + Label string `json:"label"` + Region string `json:"region"` + Version string `json:"version"` + HAControlPlanes bool `json:"ha_controlplanes,omitempty"` + NodePools []NodePoolReq `json:"node_pools"` } // ClusterReqUpdate struct used to update update a cluster