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
  • Loading branch information
dylanrhysscott committed Feb 19, 2025
1 parent 0dcda2a commit aff4d4a
Show file tree
Hide file tree
Showing 2 changed files with 15 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 []Taint `json:"taints,omitempty"`
Capacity *KubernetesNodePoolResources `json:"capacity,omitempty"`
Allocatable *KubernetesNodePoolResources `json:"allocatable,omitempty"`
}
Expand Down
14 changes: 14 additions & 0 deletions kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,13 @@ func TestKubernetesClusters_GetNodePoolTemplate(t *testing.T) {
Name: "pool-a",
Slug: "s-1vcpu-2gb",
Template: &KubernetesNodePoolTemplate{
Taints: []Taint{
{
Key: "some-key",
Value: "some-value",
Effect: "NoSchedule",
},
},
Labels: map[string]string{
"some-label": "some-value",
},
Expand All @@ -1360,6 +1367,13 @@ func TestKubernetesClusters_GetNodePoolTemplate(t *testing.T) {
"labels": {
"some-label": "some-value"
},
"taints": [
{
"key": "some-key",
"value": "some-value",
"effect": "NoSchedule"
}
],
"capacity": {
"cpu": 1,
"memory": "2048Mi",
Expand Down

0 comments on commit aff4d4a

Please sign in to comment.