Skip to content

Commit

Permalink
Added new feature
Browse files Browse the repository at this point in the history
added master_ip to the kubernetes response,
to be able to use it in the cli and in the terraform provider

Signed-off-by: Alejandro JNM <alejandrojnm@gmail.com>
  • Loading branch information
alejandrojnm committed Jul 6, 2020
1 parent c49389a commit b74d322
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type KubernetesCluster struct {
KubeConfig string `json:"kubeconfig"`
KubernetesVersion string `json:"kubernetes_version"`
APIEndPoint string `json:"api_endpoint"`
MasterIP string `json:"master_ip"`
DNSEntry string `json:"dns_entry"`
UpgradeAvailableTo string `json:"upgrade_available_to"`
Tags []string `json:"tags"`
Expand Down
8 changes: 8 additions & 0 deletions kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func TestListKubernetesClusters(t *testing.T) {
"kubeconfig": "YAML_VERSION_OF_KUBECONFIG_HERE\n",
"kubernetes_version": "0.8.1",
"api_endpoint": "https://your.cluster.ip.address:6443",
"master_ip": "your.cluster.ip.address",
"dns_entry": "69a23478-a89e-41d2-97b1-6f4c341cee70.k8s.civo.com",
"tags": [],
"created_at": "2019-09-23T13:02:59.000+01:00",
Expand Down Expand Up @@ -80,6 +81,7 @@ func TestListKubernetesClusters(t *testing.T) {
KubeConfig: "YAML_VERSION_OF_KUBECONFIG_HERE\n",
KubernetesVersion: "0.8.1",
APIEndPoint: "https://your.cluster.ip.address:6443",
MasterIP: "your.cluster.ip.address",
DNSEntry: "69a23478-a89e-41d2-97b1-6f4c341cee70.k8s.civo.com",
CreatedAt: createAt,
Tags: []string{},
Expand Down Expand Up @@ -168,6 +170,7 @@ func TestNewKubernetesClusters(t *testing.T) {
"kubeconfig": "YAML_VERSION_OF_KUBECONFIG_HERE\n",
"kubernetes_version": "0.8.1",
"api_endpoint": "https://your.cluster.ip.address:6443",
"master_ip": "your.cluster.ip.address",
"dns_entry": "69a23478-a89e-41d2-97b1-6f4c341cee70.k8s.civo.com",
"tags": [],
"created_at": "2019-09-23T13:02:59.000+01:00",
Expand Down Expand Up @@ -233,6 +236,7 @@ func TestNewKubernetesClusters(t *testing.T) {
KubeConfig: "YAML_VERSION_OF_KUBECONFIG_HERE\n",
KubernetesVersion: "0.8.1",
APIEndPoint: "https://your.cluster.ip.address:6443",
MasterIP: "your.cluster.ip.address",
DNSEntry: "69a23478-a89e-41d2-97b1-6f4c341cee70.k8s.civo.com",
CreatedAt: createAt,
Tags: []string{},
Expand Down Expand Up @@ -280,6 +284,7 @@ func TestGetKubernetesClusters(t *testing.T) {
"kubeconfig": "YAML_VERSION_OF_KUBECONFIG_HERE\n",
"kubernetes_version": "0.8.1",
"api_endpoint": "https://your.cluster.ip.address:6443",
"master_ip": "your.cluster.ip.address",
"dns_entry": "69a23478-a89e-41d2-97b1-6f4c341cee70.k8s.civo.com",
"tags": [],
"created_at": "2019-09-23T13:02:59.000+01:00",
Expand Down Expand Up @@ -336,6 +341,7 @@ func TestGetKubernetesClusters(t *testing.T) {
KubeConfig: "YAML_VERSION_OF_KUBECONFIG_HERE\n",
KubernetesVersion: "0.8.1",
APIEndPoint: "https://your.cluster.ip.address:6443",
MasterIP: "your.cluster.ip.address",
DNSEntry: "69a23478-a89e-41d2-97b1-6f4c341cee70.k8s.civo.com",
CreatedAt: createAt,
Tags: []string{},
Expand Down Expand Up @@ -383,6 +389,7 @@ func TestUpdateKubernetesClusters(t *testing.T) {
"kubeconfig": "YAML_VERSION_OF_KUBECONFIG_HERE\n",
"kubernetes_version": "0.8.1",
"api_endpoint": "https://your.cluster.ip.address:6443",
"master_ip": "your.cluster.ip.address",
"dns_entry": "69a23478-a89e-41d2-97b1-6f4c341cee70.k8s.civo.com",
"tags": [],
"created_at": "2019-09-23T13:02:59.000+01:00",
Expand Down Expand Up @@ -444,6 +451,7 @@ func TestUpdateKubernetesClusters(t *testing.T) {
KubeConfig: "YAML_VERSION_OF_KUBECONFIG_HERE\n",
KubernetesVersion: "0.8.1",
APIEndPoint: "https://your.cluster.ip.address:6443",
MasterIP: "your.cluster.ip.address",
DNSEntry: "69a23478-a89e-41d2-97b1-6f4c341cee70.k8s.civo.com",
CreatedAt: createAt,
Tags: []string{},
Expand Down

0 comments on commit b74d322

Please sign in to comment.