diff --git a/castai/sdk/api.gen.go b/castai/sdk/api.gen.go index 5aa0c8ab..a869aed2 100644 --- a/castai/sdk/api.gen.go +++ b/castai/sdk/api.gen.go @@ -283,6 +283,7 @@ const ( // Defines values for WorkloadoptimizationV1EventType. const ( EVENTTYPECONFIGURATIONCHANGEDV2 WorkloadoptimizationV1EventType = "EVENT_TYPE_CONFIGURATION_CHANGEDV2" + EVENTTYPEFAILEDHELMTESTHOOK WorkloadoptimizationV1EventType = "EVENT_TYPE_FAILED_HELM_TEST_HOOK" EVENTTYPEINVALID WorkloadoptimizationV1EventType = "EVENT_TYPE_INVALID" EVENTTYPEOOMKILL WorkloadoptimizationV1EventType = "EVENT_TYPE_OOM_KILL" EVENTTYPERECOMMENDEDPODCOUNTCHANGED WorkloadoptimizationV1EventType = "EVENT_TYPE_RECOMMENDED_POD_COUNT_CHANGED" @@ -359,6 +360,10 @@ type CastaiAuthtokenV1beta1AuthToken struct { // created_by is used to link this token to a user who created it. CreatedBy *string `json:"createdBy"` + // (read only) Time when the token will expire (unix timestamp in nanoseconds). + // A null value means that the key will never expire. + ExpiresAt *time.Time `json:"expiresAt,omitempty"` + // (read only) ID of the token. Id *string `json:"id,omitempty"` @@ -1537,6 +1542,7 @@ type ExternalclusterV1AKSClusterParams struct { // Node resource group of the cluster. NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"` + PodCidr *string `json:"podCidr"` // Region of the cluster. Region *string `json:"region,omitempty"` @@ -1544,6 +1550,9 @@ type ExternalclusterV1AKSClusterParams struct { // Azure subscription ID where cluster runs. SubscriptionId *string `json:"subscriptionId,omitempty"` + // Azure tenant id. + TenantId *string `json:"tenantId,omitempty"` + // Zone name pattern in the cluster. ZoneNamePattern *string `json:"zoneNamePattern,omitempty"` } @@ -3386,6 +3395,7 @@ type WorkloadoptimizationV1DownscalingSettings struct { // WorkloadoptimizationV1Event defines model for workloadoptimization.v1.Event. type WorkloadoptimizationV1Event struct { ConfigurationChangedV2 *WorkloadoptimizationV1ConfigurationChangedEventV2 `json:"configurationChangedV2,omitempty"` + FailedHook *WorkloadoptimizationV1FailedHookEvent `json:"failedHook,omitempty"` OomKill *WorkloadoptimizationV1OOMKillEvent `json:"oomKill,omitempty"` RecommendedPodCountChanged *WorkloadoptimizationV1RecommendedPodCountChangedEvent `json:"recommendedPodCountChanged,omitempty"` RecommendedRequestsChanged *WorkloadoptimizationV1RecommendedRequestsChangedEvent `json:"recommendedRequestsChanged,omitempty"` @@ -3405,6 +3415,12 @@ type WorkloadoptimizationV1EventContainer struct { // EventType defines possible types for workload events. type WorkloadoptimizationV1EventType string +// WorkloadoptimizationV1FailedHookEvent defines model for workloadoptimization.v1.FailedHookEvent. +type WorkloadoptimizationV1FailedHookEvent struct { + Message string `json:"message"` + Time time.Time `json:"time"` +} + // WorkloadoptimizationV1GetAgentStatusResponse defines model for workloadoptimization.v1.GetAgentStatusResponse. type WorkloadoptimizationV1GetAgentStatusResponse struct { CastAgentCurrentVersion *string `json:"castAgentCurrentVersion"` @@ -4157,6 +4173,12 @@ type ExternalClusterAPIDeleteNodeParams struct { // ExternalClusterAPIDrainNodeJSONBody defines parameters for ExternalClusterAPIDrainNode. type ExternalClusterAPIDrainNodeJSONBody = ExternalclusterV1DrainConfig +// ExternalClusterAPIReconcileClusterParams defines parameters for ExternalClusterAPIReconcileCluster. +type ExternalClusterAPIReconcileClusterParams struct { + // Whether to skip AKS refresh of instance-template. + SkipAksInitData *bool `form:"skipAksInitData,omitempty" json:"skipAksInitData,omitempty"` +} + // ExternalClusterAPITriggerResumeClusterJSONBody defines parameters for ExternalClusterAPITriggerResumeCluster. type ExternalClusterAPITriggerResumeClusterJSONBody = ExternalclusterV1NodeConfig diff --git a/castai/sdk/client.gen.go b/castai/sdk/client.gen.go index 087d9790..0743749e 100644 --- a/castai/sdk/client.gen.go +++ b/castai/sdk/client.gen.go @@ -304,7 +304,7 @@ type ClientInterface interface { ExternalClusterAPIDrainNode(ctx context.Context, clusterId string, nodeId string, body ExternalClusterAPIDrainNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ExternalClusterAPIReconcileCluster request - ExternalClusterAPIReconcileCluster(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*http.Response, error) + ExternalClusterAPIReconcileCluster(ctx context.Context, clusterId string, params *ExternalClusterAPIReconcileClusterParams, reqEditors ...RequestEditorFn) (*http.Response, error) // ExternalClusterAPITriggerResumeCluster request with any body ExternalClusterAPITriggerResumeClusterWithBody(ctx context.Context, clusterId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1491,8 +1491,8 @@ func (c *Client) ExternalClusterAPIDrainNode(ctx context.Context, clusterId stri return c.Client.Do(req) } -func (c *Client) ExternalClusterAPIReconcileCluster(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewExternalClusterAPIReconcileClusterRequest(c.Server, clusterId) +func (c *Client) ExternalClusterAPIReconcileCluster(ctx context.Context, clusterId string, params *ExternalClusterAPIReconcileClusterParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewExternalClusterAPIReconcileClusterRequest(c.Server, clusterId, params) if err != nil { return nil, err } @@ -5367,7 +5367,7 @@ func NewExternalClusterAPIDrainNodeRequestWithBody(server string, clusterId stri } // NewExternalClusterAPIReconcileClusterRequest generates requests for ExternalClusterAPIReconcileCluster -func NewExternalClusterAPIReconcileClusterRequest(server string, clusterId string) (*http.Request, error) { +func NewExternalClusterAPIReconcileClusterRequest(server string, clusterId string, params *ExternalClusterAPIReconcileClusterParams) (*http.Request, error) { var err error var pathParam0 string @@ -5392,6 +5392,26 @@ func NewExternalClusterAPIReconcileClusterRequest(server string, clusterId strin return nil, err } + queryValues := queryURL.Query() + + if params.SkipAksInitData != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "skipAksInitData", runtime.ParamLocationQuery, *params.SkipAksInitData); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err @@ -8699,7 +8719,7 @@ type ClientWithResponsesInterface interface { ExternalClusterAPIDrainNodeWithResponse(ctx context.Context, clusterId string, nodeId string, body ExternalClusterAPIDrainNodeJSONRequestBody) (*ExternalClusterAPIDrainNodeResponse, error) // ExternalClusterAPIReconcileCluster request - ExternalClusterAPIReconcileClusterWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIReconcileClusterResponse, error) + ExternalClusterAPIReconcileClusterWithResponse(ctx context.Context, clusterId string, params *ExternalClusterAPIReconcileClusterParams) (*ExternalClusterAPIReconcileClusterResponse, error) // ExternalClusterAPITriggerResumeCluster request with any body ExternalClusterAPITriggerResumeClusterWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPITriggerResumeClusterResponse, error) @@ -13416,8 +13436,8 @@ func (c *ClientWithResponses) ExternalClusterAPIDrainNodeWithResponse(ctx contex } // ExternalClusterAPIReconcileClusterWithResponse request returning *ExternalClusterAPIReconcileClusterResponse -func (c *ClientWithResponses) ExternalClusterAPIReconcileClusterWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIReconcileClusterResponse, error) { - rsp, err := c.ExternalClusterAPIReconcileCluster(ctx, clusterId) +func (c *ClientWithResponses) ExternalClusterAPIReconcileClusterWithResponse(ctx context.Context, clusterId string, params *ExternalClusterAPIReconcileClusterParams) (*ExternalClusterAPIReconcileClusterResponse, error) { + rsp, err := c.ExternalClusterAPIReconcileCluster(ctx, clusterId, params) if err != nil { return nil, err } diff --git a/castai/sdk/mock/client.go b/castai/sdk/mock/client.go index 587857a7..3b95d76f 100644 --- a/castai/sdk/mock/client.go +++ b/castai/sdk/mock/client.go @@ -1156,9 +1156,9 @@ func (mr *MockClientInterfaceMockRecorder) ExternalClusterAPIListNodes(ctx, clus } // ExternalClusterAPIReconcileCluster mocks base method. -func (m *MockClientInterface) ExternalClusterAPIReconcileCluster(ctx context.Context, clusterId string, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { +func (m *MockClientInterface) ExternalClusterAPIReconcileCluster(ctx context.Context, clusterId string, params *sdk.ExternalClusterAPIReconcileClusterParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { m.ctrl.T.Helper() - varargs := []interface{}{ctx, clusterId} + varargs := []interface{}{ctx, clusterId, params} for _, a := range reqEditors { varargs = append(varargs, a) } @@ -1169,9 +1169,9 @@ func (m *MockClientInterface) ExternalClusterAPIReconcileCluster(ctx context.Con } // ExternalClusterAPIReconcileCluster indicates an expected call of ExternalClusterAPIReconcileCluster. -func (mr *MockClientInterfaceMockRecorder) ExternalClusterAPIReconcileCluster(ctx, clusterId interface{}, reqEditors ...interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) ExternalClusterAPIReconcileCluster(ctx, clusterId, params interface{}, reqEditors ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx, clusterId}, reqEditors...) + varargs := append([]interface{}{ctx, clusterId, params}, reqEditors...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalClusterAPIReconcileCluster", reflect.TypeOf((*MockClientInterface)(nil).ExternalClusterAPIReconcileCluster), varargs...) } @@ -4289,18 +4289,18 @@ func (mr *MockClientWithResponsesInterfaceMockRecorder) ExternalClusterAPIListNo } // ExternalClusterAPIReconcileClusterWithResponse mocks base method. -func (m *MockClientWithResponsesInterface) ExternalClusterAPIReconcileClusterWithResponse(ctx context.Context, clusterId string) (*sdk.ExternalClusterAPIReconcileClusterResponse, error) { +func (m *MockClientWithResponsesInterface) ExternalClusterAPIReconcileClusterWithResponse(ctx context.Context, clusterId string, params *sdk.ExternalClusterAPIReconcileClusterParams) (*sdk.ExternalClusterAPIReconcileClusterResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ExternalClusterAPIReconcileClusterWithResponse", ctx, clusterId) + ret := m.ctrl.Call(m, "ExternalClusterAPIReconcileClusterWithResponse", ctx, clusterId, params) ret0, _ := ret[0].(*sdk.ExternalClusterAPIReconcileClusterResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ExternalClusterAPIReconcileClusterWithResponse indicates an expected call of ExternalClusterAPIReconcileClusterWithResponse. -func (mr *MockClientWithResponsesInterfaceMockRecorder) ExternalClusterAPIReconcileClusterWithResponse(ctx, clusterId interface{}) *gomock.Call { +func (mr *MockClientWithResponsesInterfaceMockRecorder) ExternalClusterAPIReconcileClusterWithResponse(ctx, clusterId, params interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalClusterAPIReconcileClusterWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).ExternalClusterAPIReconcileClusterWithResponse), ctx, clusterId) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalClusterAPIReconcileClusterWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).ExternalClusterAPIReconcileClusterWithResponse), ctx, clusterId, params) } // ExternalClusterAPIRegisterClusterWithBodyWithResponse mocks base method.