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
Constants ¶
View Source
const TaskTTL = 750 // ~2 hour
TaskTTL is the minimum number of ticks (every ~10sec) within which a given task must be completed before being rescheduled again.
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 ¶
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.