Documentation ¶
Index ¶
- Constants
- Variables
- func Diff(current, desired *spec.K8Scluster, currentLbs, desiredLbs []*spec.LBcluster) []*spec.TaskEvent
- func LbsNodePoolNodes(clusters []*spec.LBcluster) (map[string]map[string][]string, map[string]map[string][]string)
- func MustRegisterCounters()
- func NodePoolNodes(cluster *spec.K8Scluster) (map[string][]string, map[string][]string)
- type GRPC
- func (g *GRPC) GetConfig(ctx context.Context, request *pb.GetConfigRequest) (*pb.GetConfigResponse, error)
- func (g *GRPC) ListConfigs(ctx context.Context, _ *pb.ListConfigRequest) (*pb.ListConfigResponse, error)
- func (g *GRPC) MarkForDeletion(ctx context.Context, request *pb.MarkForDeletionRequest) (*pb.MarkForDeletionResponse, error)
- func (g *GRPC) NextTask(ctx context.Context, _ *pb.NextTaskRequest) (*pb.NextTaskResponse, error)
- func (g *GRPC) Serve() error
- func (g *GRPC) Stop() error
- func (g *GRPC) TaskComplete(ctx context.Context, req *pb.TaskCompleteRequest) (*pb.TaskCompleteResponse, error)
- func (g *GRPC) TaskUpdate(ctx context.Context, req *pb.TaskUpdateRequest) (*pb.TaskUpdateResponse, error)
- func (g *GRPC) UpdateNodePool(ctx context.Context, request *pb.UpdateNodePoolRequest) (*pb.UpdateNodePoolResponse, error)
- func (g *GRPC) UpsertManifest(ctx context.Context, request *pb.UpsertManifestRequest) (*pb.UpsertManifestResponse, error)
- func (g *GRPC) WatchForDoneOrErrorDocuments(ctx context.Context) error
- func (g *GRPC) WatchForPendingDocuments(ctx context.Context) error
- func (g *GRPC) WatchForScheduledDocuments(ctx context.Context) error
- type ScheduleResult
Constants ¶
View Source
const ( // TaskTTL is the minimum number of ticks (every ~10sec) within which a given task must be completed // before being rescheduled again. TaskTTL = 750 // ~2 hour // Tick represents the interval at which each manifest state is checked. Tick = 10 * time.Second )
Variables ¶
View Source
var ( TasksScheduled = prometheus.NewCounter(prometheus.CounterOpts{ Name: "claudie_input_manifests_tasks_scheduled", Help: "Total number of tasks scheduled for builder service to work on", }) TasksFinishedOk = prometheus.NewCounter(prometheus.CounterOpts{ Name: "claudie_input_manifests_tasks_completed", Help: "Total number of tasks completed by the builder service", }) TasksFinishedErr = prometheus.NewCounter(prometheus.CounterOpts{ Name: "claudie_input_manifests_tasks_errored", Help: "Total number of tasks errored while processing by the builder service", }) )
Functions ¶
func Diff ¶
func Diff(current, desired *spec.K8Scluster, currentLbs, desiredLbs []*spec.LBcluster) []*spec.TaskEvent
Diff takes the desired and current state to determine the difference and returns a number of tasks to be performed in specific order. It is expected that the current state actually represents the actual current state of the cluster and the desired state contains relevant data from the current state with the requested changes (i.e. deletion, addition of nodes) from the new config changes, (relevant data was transferred to desired state).
func LbsNodePoolNodes ¶
func MustRegisterCounters ¶
func MustRegisterCounters()
func NodePoolNodes ¶
NodePoolNodes returns the current nodes for the dynamic and static nodepools.
Types ¶
type GRPC ¶
type GRPC struct { pb.UnimplementedManagerServiceServer HealthCheckServer *health.Server Store store.Store // contains filtered or unexported fields }
func (*GRPC) GetConfig ¶
func (g *GRPC) GetConfig(ctx context.Context, request *pb.GetConfigRequest) (*pb.GetConfigResponse, error)
func (*GRPC) ListConfigs ¶
func (g *GRPC) ListConfigs(ctx context.Context, _ *pb.ListConfigRequest) (*pb.ListConfigResponse, error)
func (*GRPC) MarkForDeletion ¶
func (g *GRPC) MarkForDeletion(ctx context.Context, request *pb.MarkForDeletionRequest) (*pb.MarkForDeletionResponse, error)
func (*GRPC) NextTask ¶
func (g *GRPC) NextTask(ctx context.Context, _ *pb.NextTaskRequest) (*pb.NextTaskResponse, error)
func (*GRPC) TaskComplete ¶
func (g *GRPC) TaskComplete(ctx context.Context, req *pb.TaskCompleteRequest) (*pb.TaskCompleteResponse, error)
func (*GRPC) TaskUpdate ¶
func (g *GRPC) TaskUpdate(ctx context.Context, req *pb.TaskUpdateRequest) (*pb.TaskUpdateResponse, error)
func (*GRPC) UpdateNodePool ¶
func (g *GRPC) UpdateNodePool(ctx context.Context, request *pb.UpdateNodePoolRequest) (*pb.UpdateNodePoolResponse, error)
func (*GRPC) UpsertManifest ¶
func (g *GRPC) UpsertManifest(ctx context.Context, request *pb.UpsertManifestRequest) (*pb.UpsertManifestResponse, error)
func (*GRPC) WatchForDoneOrErrorDocuments ¶
func (*GRPC) WatchForPendingDocuments ¶
type ScheduleResult ¶ added in v0.9.1
type ScheduleResult uint8
ScheduleResult describes what has happened during the scheduling of the tasks.
const ( // NoReschedule describes the case where the manifest should not be rescheduled again // after either error-ing or completing. NoReschedule ScheduleResult = iota // Reschedule describes the case where the manifest should be rescheduled again // after either error-ing or completing. Reschedule // NotReady describes the case where the manifest is not ready to be scheduled yet, // this is mostly related to the retry policies which can vary. For example if // an exponential retry policy is used the manifest will not be ready to be scheduled // until the specified number of Tick pass. NotReady // FinalRetry describes the case where a manifest had a retry policy to retry // rescheduling the manifest N times before giving up. FinalRetry states that // the manifest should be retried one last time before giving up. FinalRetry )
Source Files ¶
- create_desired_state.go
- existing_state.go
- grpc.go
- handler_get_config.go
- handler_list_configs.go
- handler_mark_for_deletion.go
- handler_next_task.go
- handler_task_complete.go
- handler_task_update.go
- handler_update_nodepool.go
- handler_upsert_manifest.go
- metrics.go
- rolling_update.go
- rolling_update_lbs.go
- schedule_tasks.go
- watchers.go
Click to show internal directories.
Click to hide internal directories.