Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 0 additions & 154 deletions internal/actions/send_aks_init_data_handler.go

This file was deleted.

42 changes: 0 additions & 42 deletions internal/actions/send_aks_init_data_handler_test.go

This file was deleted.

16 changes: 0 additions & 16 deletions internal/castai/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const (
type CastAIClient interface {
GetActions(ctx context.Context, k8sVersion string) ([]*ClusterAction, error)
AckAction(ctx context.Context, actionID string, req *AckClusterActionRequest) error
SendAKSInitData(ctx context.Context, req *AKSInitDataRequest) error
SendLog(ctx context.Context, e *LogEntry) error
}

Expand Down Expand Up @@ -126,21 +125,6 @@ func createTLSConfig(ca string) (*tls.Config, error) {
}, nil
}

func (c *Client) SendAKSInitData(ctx context.Context, req *AKSInitDataRequest) error {
resp, err := c.rest.R().
SetBody(req).
SetContext(ctx).
Post(fmt.Sprintf("/v1/kubernetes/external-clusters/%s/aks-init-data", c.clusterID))
if err != nil {
return fmt.Errorf("sending aks init data: %w", err)
}
if resp.IsError() {
return fmt.Errorf("sending aks init data: request error status_code=%d body=%s", resp.StatusCode(), resp.Body())
}

return nil
}

func (c *Client) SendLog(ctx context.Context, e *LogEntry) error {
// Server expects fields values to be strings. If they're not it fails with BAD_REQUEST/400.
// Alternatively we could use "google/protobuf/any.proto" on server side but ATM it doesn't work.
Expand Down
14 changes: 0 additions & 14 deletions internal/castai/mock/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions internal/castai/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ type ClusterAction struct {
ActionChartUninstall *ActionChartUninstall `json:"actionChartUninstall,omitempty"`
ActionChartRollback *ActionChartRollback `json:"actionChartRollback,omitempty"`
ActionDisconnectCluster *ActionDisconnectCluster `json:"actionDisconnectCluster,omitempty"`
ActionSendAKSInitData *ActionSendAKSInitData `json:"actionSendAksInitData,omitempty"`
ActionCheckNodeDeleted *ActionCheckNodeDeleted `json:"actionCheckNodeDeleted,omitempty"`
ActionCheckNodeStatus *ActionCheckNodeStatus `json:"actionCheckNodeStatus,omitempty"`
ActionEvictPod *ActionEvictPod `json:"actionEvictPod,omitempty"`
Expand Down Expand Up @@ -74,9 +73,6 @@ func (c *ClusterAction) Data() interface{} {
if c.ActionDisconnectCluster != nil {
return c.ActionDisconnectCluster
}
if c.ActionSendAKSInitData != nil {
return c.ActionSendAKSInitData
}
if c.ActionCheckNodeDeleted != nil {
return c.ActionCheckNodeDeleted
}
Expand Down Expand Up @@ -189,8 +185,6 @@ type ActionCreateEvent struct {

type ActionDisconnectCluster struct{}

type ActionSendAKSInitData struct{}

type ActionCheckNodeDeleted struct {
NodeName string `json:"nodeName"`
NodeID string `json:"nodeId"`
Expand Down Expand Up @@ -250,9 +244,3 @@ func (c *ChartSource) Validate() error {
}
return nil
}

type AKSInitDataRequest struct {
CloudConfigBase64 string `json:"cloudConfigBase64"`
ProtectedSettingsBase64 string `json:"protectedSettingsBase64"`
Architecture string `json:"architecture"`
}
1 change: 0 additions & 1 deletion internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func NewService(
reflect.TypeOf(&castai.ActionChartUninstall{}): actions.NewChartUninstallHandler(log, helmClient),
reflect.TypeOf(&castai.ActionChartRollback{}): actions.NewChartRollbackHandler(log, helmClient, cfg.Version),
reflect.TypeOf(&castai.ActionDisconnectCluster{}): actions.NewDisconnectClusterHandler(log, clientset),
reflect.TypeOf(&castai.ActionSendAKSInitData{}): actions.NewSendAKSInitDataHandler(log, castaiClient),
reflect.TypeOf(&castai.ActionCheckNodeDeleted{}): actions.NewCheckNodeDeletedHandler(log, clientset),
reflect.TypeOf(&castai.ActionCheckNodeStatus{}): actions.NewCheckNodeStatusHandler(log, clientset),
reflect.TypeOf(&castai.ActionEvictPod{}): actions.NewEvictPodHandler(log, clientset),
Expand Down

This file was deleted.

Loading
Loading