Documentation ¶
Index ¶
- Constants
- func NewRestyClient(url, key, ca string, level logrus.Level, ...) (*resty.Client, error)
- type AKSInitDataRequest
- type AckClusterActionRequest
- type ActionApproveCSR
- type ActionChartRollback
- type ActionChartUninstall
- type ActionChartUpsert
- type ActionCheckNodeDeleted
- type ActionCheckNodeStatus
- type ActionCheckNodeStatus_Status
- type ActionCreate
- type ActionCreateEvent
- type ActionDelete
- type ActionDeleteNode
- type ActionDisconnectCluster
- type ActionDrainNode
- type ActionPatch
- type ActionPatchNode
- type ActionSendAKSInitData
- type CastAIClient
- type ChartSource
- type Client
- func (c *Client) AckAction(ctx context.Context, actionID string, req *AckClusterActionRequest) error
- func (c *Client) GetActions(ctx context.Context, k8sVersion string) ([]*ClusterAction, error)
- func (c *Client) SendAKSInitData(ctx context.Context, req *AKSInitDataRequest) error
- func (c *Client) SendLog(ctx context.Context, e *logexporter.LogEntry) error
- type ClusterAction
- type GetClusterActionsResponse
- type GroupVersionResource
- type LogEvent
- type NodeTaint
- type ObjectID
Constants ¶
View Source
const ( LabelNodeID = "provisioner.cast.ai/node-id" LabelManagedBy = "provisioner.cast.ai/managed-by" LabelValueManagedByCASTAI = "cast.ai" )
Variables ¶
This section is empty.
Functions ¶
func NewRestyClient ¶
func NewRestyClient(url, key, ca string, level logrus.Level, binVersion *config.ClusterControllerVersion, defaultTimeout time.Duration) (*resty.Client, error)
NewRestyClient configures a default instance of the resty.Client used to do HTTP requests.
Types ¶
type AKSInitDataRequest ¶
type AckClusterActionRequest ¶
type AckClusterActionRequest struct {
Error *string `json:"error"`
}
type ActionApproveCSR ¶
type ActionChartRollback ¶
type ActionChartUninstall ¶
type ActionChartUpsert ¶
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"` ResetThenReuseValues bool `json:"resetThenReuseValues,omitempty"` }
type ActionCheckNodeDeleted ¶
type ActionCheckNodeStatus ¶
type ActionCheckNodeStatus struct { NodeName string `json:"nodeName"` NodeID string `json:"nodeId"` NodeStatus ActionCheckNodeStatus_Status `json:"nodeStatus,omitempty"` WaitTimeoutSeconds *int32 `json:"waitTimeoutSeconds,omitempty"` }
type ActionCheckNodeStatus_Status ¶
type ActionCheckNodeStatus_Status string
const ( ActionCheckNodeStatus_READY ActionCheckNodeStatus_Status = "NodeStatus_READY" ActionCheckNodeStatus_DELETED ActionCheckNodeStatus_Status = "NodeStatus_DELETED" )
type ActionCreate ¶
type ActionCreate struct { GroupVersionResource `json:",inline"` Object map[string]interface{} `json:"object,omitempty"` }
type ActionCreateEvent ¶
type ActionDelete ¶
type ActionDelete struct {
ID ObjectID `json:"id"`
}
type ActionDeleteNode ¶
type ActionDisconnectCluster ¶
type ActionDisconnectCluster struct{}
type ActionDrainNode ¶
type ActionPatch ¶
type ActionPatchNode ¶
type ActionPatchNode struct { NodeName string `json:"nodeName"` NodeID string `json:"nodeId"` Labels map[string]string `json:"labels"` Taints []NodeTaint `json:"taints"` Annotations map[string]string `json:"annotations"` Unschedulable *bool `json:"unschedulable"` // Capacity allows advertising extended resources for a Node. // More info: https://kubernetes.io/docs/tasks/administer-cluster/extended-resource-node/ Capacity v1.ResourceList `json:"capacity"` }
type ActionSendAKSInitData ¶
type ActionSendAKSInitData struct{}
type CastAIClient ¶
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 }
CastAIClient lists functions used by actions package.
type ChartSource ¶
type ChartSource struct { RepoURL string `json:"repoUrl"` Name string `json:"name"` Version string `json:"version"` }
func (*ChartSource) Validate ¶
func (c *ChartSource) Validate() error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client talks to Cast AI. It can poll and acknowledge actions and also inject logs.
func (*Client) GetActions ¶
func (*Client) SendAKSInitData ¶
func (c *Client) SendAKSInitData(ctx context.Context, req *AKSInitDataRequest) error
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"` 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"` ActionPatch *ActionPatch `json:"actionPatch,omitempty"` ActionCreate *ActionCreate `json:"actionCreate,omitempty"` ActionDelete *ActionDelete `json:"actionDelete,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 GroupVersionResource ¶
type GroupVersionResource struct { Group string `json:"group"` Version string `json:"version"` Resource string `json:"resource"` }
func (GroupVersionResource) String ¶
func (r GroupVersionResource) String() string
type ObjectID ¶
type ObjectID struct { GroupVersionResource `json:",inline"` Namespace *string `json:"namespace"` Name string `json:"name"` }
Click to show internal directories.
Click to hide internal directories.