Skip to content

Commit

Permalink
Fix updateConf handler for UsageNodeSelector (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
fridim authored Nov 5, 2024
1 parent 485d673 commit c65b7e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmd/sandbox-api/ocp_shared_cluster_configuration_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ func (h *BaseHandler) UpdateOcpSharedClusterConfigurationHandler(w http.Response
ocpSharedClusterConfiguration.LimitRange = input.LimitRange
}

if input.UsageNodeSelector != nil {
ocpSharedClusterConfiguration.UsageNodeSelector = *input.UsageNodeSelector
}

if err := ocpSharedClusterConfiguration.Save(); err != nil {
w.WriteHeader(http.StatusInternalServerError)
render.Render(w, r, &v1.Error{
Expand Down
2 changes: 1 addition & 1 deletion internal/api/v1/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ type UpdateOcpSharedConfigurationRequest struct {
AdditionalVars map[string]any `json:"additional_vars,omitempty"`
MaxMemoryUsagePercentage *float64 `json:"max_memory_usage_percentage,omitempty"`
MaxCpuUsagePercentage *float64 `json:"max_cpu_usage_percentage,omitempty"`
UsageSelector *string `json:"usage_node_selector,omitempty"`
UsageNodeSelector *string `json:"usage_node_selector,omitempty"`
LimitRange *v1.LimitRange `json:"limit_range,omitempty"`
}

Expand Down

0 comments on commit c65b7e0

Please sign in to comment.