castai

package
v0.18.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultClient

func NewDefaultClient(url, key string, level logrus.Level, binVersion *config.ClusterControllerVersion) *resty.Client

NewDefaultClient configures a default instance of the resty.Client used to do HTTP requests.

Types

type AKSInitDataRequest added in v0.9.0

type AKSInitDataRequest struct {
	CloudConfigBase64       string `json:"cloudConfigBase64"`
	ProtectedSettingsBase64 string `json:"protectedSettingsBase64"`
}

type AckClusterActionRequest

type AckClusterActionRequest struct {
	Error *string `json:"error"`
}

type ActionApproveCSR added in v0.5.0

type ActionApproveCSR struct {
	NodeName string `json:"nodeName"`
}

type ActionChartUninstall added in v0.11.0

type ActionChartUninstall struct {
	Namespace   string `json:"namespace"`
	ReleaseName string `json:"releaseName"`
}

type ActionChartUpsert added in v0.6.0

type ActionChartUpsert struct {
	Namespace       string            `json:"namespace"`
	ReleaseName     string            `json:"releaseName"`
	ValuesOverrides map[string]string `json:"valuesOverrides,omitempty"`
	ChartSource     ChartSource       `json:"chartSource"`
	CreateNamespace bool              `json:"createNamespace"`
}

type ActionCheckNodeDeleted added in v0.17.0

type ActionCheckNodeDeleted struct {
	NodeName string `json:"nodeName"`
}

type ActionCreateEvent added in v0.4.0

type ActionCreateEvent struct {
	Reporter  string             `json:"reportingComponent"`
	ObjectRef v1.ObjectReference `json:"objectReference"`
	EventTime time.Time          `json:"eventTime"`
	EventType string             `json:"eventType"`
	Reason    string             `json:"reason"`
	Action    string             `json:"action"`
	Message   string             `json:"message"`
}

type ActionDeleteNode

type ActionDeleteNode struct {
	NodeName string `json:"nodeName"`
}

type ActionDisconnectCluster added in v0.8.0

type ActionDisconnectCluster struct {
}

type ActionDrainNode

type ActionDrainNode struct {
	NodeName            string `json:"nodeName"`
	DrainTimeoutSeconds int    `json:"drainTimeoutSeconds"`
	Force               bool   `json:"force"`
}

type ActionPatchNode

type ActionPatchNode struct {
	NodeName    string            `json:"nodeName"`
	Labels      map[string]string `json:"labels"`
	Taints      []NodeTaint       `json:"taints"`
	Annotations map[string]string `json:"annotations"`
}

type ActionSendAKSInitData added in v0.9.0

type ActionSendAKSInitData struct {
}

type ChartSource added in v0.6.0

type ChartSource struct {
	RepoURL string `json:"repoUrl"`
	Name    string `json:"name"`
	Version string `json:"version"`
}

func (*ChartSource) Validate added in v0.6.0

func (c *ChartSource) Validate() error

type Client

type Client interface {
	GetActions(ctx context.Context, k8sVersion string) ([]*ClusterAction, error)
	AckAction(ctx context.Context, actionID string, req *AckClusterActionRequest) error
	SendLogs(ctx context.Context, req *LogEvent) error
	SendAKSInitData(ctx context.Context, req *AKSInitDataRequest) error
}

func NewClient

func NewClient(log *logrus.Logger, rest *resty.Client, clusterID string) Client

type ClusterAction

type ClusterAction struct {
	ID                      string                   `json:"id"`
	ActionDeleteNode        *ActionDeleteNode        `json:"actionDeleteNode,omitempty"`
	ActionDrainNode         *ActionDrainNode         `json:"actionDrainNode,omitempty"`
	ActionPatchNode         *ActionPatchNode         `json:"actionPatchNode,omitempty"`
	ActionCreateEvent       *ActionCreateEvent       `json:"actionCreateEvent,omitempty"`
	ActionApproveCSR        *ActionApproveCSR        `json:"actionApproveCsr,omitempty"`
	ActionChartUpsert       *ActionChartUpsert       `json:"actionChartUpsert,omitempty"`
	ActionChartUninstall    *ActionChartUninstall    `json:"actionChartUninstall,omitempty"`
	ActionDisconnectCluster *ActionDisconnectCluster `json:"actionDisconnectCluster,omitempty"`
	ActionSendAKSInitData   *ActionSendAKSInitData   `json:"actionSendAksInitData,omitempty"`
	ActionCheckNodeDeleted  *ActionCheckNodeDeleted  `json:"actionCheckNodeDeleted,omitempty"`
	CreatedAt               time.Time                `json:"createdAt"`
	DoneAt                  *time.Time               `json:"doneAt,omitempty"`
	Error                   *string                  `json:"error,omitempty"`
}

func (*ClusterAction) Data

func (c *ClusterAction) Data() interface{}

type GetClusterActionsResponse

type GetClusterActionsResponse struct {
	Items []*ClusterAction `json:"items"`
}

type LogEvent added in v0.3.0

type LogEvent struct {
	Level   string        `json:"level"`
	Time    time.Time     `json:"time"`
	Message string        `json:"message"`
	Fields  logrus.Fields `json:"fields"`
}

type NodeTaint

type NodeTaint struct {
	Effect string `json:"effect"`
	Key    string `json:"key"`
	Value  string `json:"value"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL