Skip to content

Commit

Permalink
CON-11904 Ensure taints are correctly returned via node template endp…
Browse files Browse the repository at this point in the history
…oint (#795)
  • Loading branch information
dylanrhysscott authored Feb 25, 2025
1 parent e0a4005 commit 8a2012e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ type KubernetesNodePoolTemplateResponse struct {
// KubernetesNodePool represents the node pool template data for a given pool.
type KubernetesNodePoolTemplate struct {
Labels map[string]string `json:"labels,omitempty"`
Taints []string `json:"taints,omitempty"`
Capacity *KubernetesNodePoolResources `json:"capacity,omitempty"`
Allocatable *KubernetesNodePoolResources `json:"allocatable,omitempty"`
}
Expand Down
2 changes: 2 additions & 0 deletions kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,7 @@ func TestKubernetesClusters_GetNodePoolTemplate(t *testing.T) {
Name: "pool-a",
Slug: "s-1vcpu-2gb",
Template: &KubernetesNodePoolTemplate{
Taints: []string{"some-key=some-value:NoSchedule"},
Labels: map[string]string{
"some-label": "some-value",
},
Expand All @@ -1360,6 +1361,7 @@ func TestKubernetesClusters_GetNodePoolTemplate(t *testing.T) {
"labels": {
"some-label": "some-value"
},
"taints": ["some-key=some-value:NoSchedule"],
"capacity": {
"cpu": 1,
"memory": "2048Mi",
Expand Down

0 comments on commit 8a2012e

Please sign in to comment.