From 352141cc49fb2e3982ccccdcf73b4792452d2793 Mon Sep 17 00:00:00 2001 From: Vishal Anarse Date: Tue, 18 Jul 2023 21:27:43 +0530 Subject: [PATCH] Add fields related to public_ip_node_pool Signed-off-by: Vishal Anarse --- kubernetes.go | 33 ++++++++++++++++++--------------- region.go | 17 +++++++++-------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/kubernetes.go b/kubernetes.go index 95a5c38..aa99fb0 100644 --- a/kubernetes.go +++ b/kubernetes.go @@ -34,13 +34,14 @@ type KubernetesInstance struct { // KubernetesPool represents a single pool within a Kubernetes cluster type KubernetesPool struct { - ID string `json:"id"` - Count int `json:"count,omitempty"` - Size string `json:"size,omitempty"` - InstanceNames []string `json:"instance_names,omitempty"` - Instances []KubernetesInstance `json:"instances,omitempty"` - Labels map[string]string `json:"labels,omitempty"` - Taints []corev1.Taint `json:"taints,omitempty"` + ID string `json:"id"` + Count int `json:"count,omitempty"` + Size string `json:"size,omitempty"` + InstanceNames []string `json:"instance_names,omitempty"` + Instances []KubernetesInstance `json:"instances,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Taints []corev1.Taint `json:"taints,omitempty"` + PublicIPNodePool bool `json:"public_ip_node_pool,omitempty"` } // KubernetesInstalledApplication is an application within our marketplace available for @@ -110,11 +111,12 @@ type KubernetesCluster struct { // RequiredPools returns the required pools for a given Kubernetes cluster type RequiredPools struct { - ID string `json:"id"` - Size string `json:"size"` - Count int `json:"count"` - Labels map[string]string `json:"labels,omitempty"` - Taints []corev1.Taint `json:"taints,omitempty"` + ID string `json:"id"` + Size string `json:"size"` + Count int `json:"count"` + Labels map[string]string `json:"labels,omitempty"` + Taints []corev1.Taint `json:"taints,omitempty"` + PublicIPNodePool bool `json:"public_ip_node_pool,omitempty"` } // PaginatedKubernetesClusters is a Kubernetes k3s cluster @@ -145,9 +147,10 @@ type KubernetesClusterConfig struct { // KubernetesClusterPoolConfig is used to create a new cluster pool type KubernetesClusterPoolConfig struct { - ID string `json:"id,omitempty"` - Count int `json:"count,omitempty"` - Size string `json:"size,omitempty"` + ID string `json:"id,omitempty"` + Count int `json:"count,omitempty"` + Size string `json:"size,omitempty"` + PublicIPNodePool bool `json:"public_ip_node_pool,omitempty"` } // KubernetesPlanConfiguration is a value within a configuration for diff --git a/region.go b/region.go index 9e8037b..fe37f7f 100644 --- a/region.go +++ b/region.go @@ -22,14 +22,15 @@ type Region struct { // Feature represent a all feature inside a region type Feature struct { - Iaas bool `json:"iaas"` - Kubernetes bool `json:"kubernetes"` - ObjectStore bool `json:"object_store"` - LoadBalancer bool `json:"loadbalancer"` - DBaaS bool `json:"dbaas"` - Volume bool `json:"volume"` - PaaS bool `json:"paas"` - KFaaS bool `json:"kfaas"` + Iaas bool `json:"iaas"` + Kubernetes bool `json:"kubernetes"` + ObjectStore bool `json:"object_store"` + LoadBalancer bool `json:"loadbalancer"` + DBaaS bool `json:"dbaas"` + Volume bool `json:"volume"` + PaaS bool `json:"paas"` + KFaaS bool `json:"kfaas"` + PublicIPNodePools bool `json:"public_ip_node_pools"` } // ListRegions returns all load balancers owned by the calling API account