coordinator

package
v0.0.0-...-53bcd79 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOtherTaskIsRunning = xerrors.Define("coordinator: Other task is running")
)

Functions

This section is empty.

Types

type BazelBuilder

type BazelBuilder struct {
	Namespace string
	// contains filtered or unexported fields
}

func NewBazelBuilder

func NewBazelBuilder(
	dashboardUrl string,
	kOpt KubernetesOptions,
	daoOpt dao.Options,
	namespace string,
	ghClient *github.Client,
	bucket string,
	minIOOpt storage.MinIOOptions,
	bazelOpt BazelOptions,
	vaultClient *vault.Client,
	dev bool,
) (*BazelBuilder, error)

func (*BazelBuilder) Build

func (b *BazelBuilder) Build(ctx context.Context, repo *database.SourceRepository, job *config.Job, revision, bazelVersion, command string, targets, platforms []string, via string, isMainBranch bool) ([]*database.Task, error)

func (*BazelBuilder) IsStub

func (b *BazelBuilder) IsStub() bool

type BazelOptions

type BazelOptions struct {
	RemoteCache          string
	EnableRemoteAssetApi bool
	SidecarImage         string
	BazelImage           string
	UseBazelisk          bool
	DefaultVersion       string
	PullAlways           bool
	BazelMirrorURL       string
	GithubAppId          int64
	GithubInstallationId int64
	GithubAppSecretName  string
}

func NewBazelOptions

func NewBazelOptions(remoteCache string, enableRemoteAssetApi bool, sidecarImage, bazelImage string, useBazelisk bool, defaultVersion, bazelMirrorURL string, pullAlways bool, githubAppId, githubInstallationId int64, githubAppSecretName string) BazelOptions

type JobBuilder

type JobBuilder struct {
	PreProcessContainerName string
	BuildContainerName      string
	ReportContainerName     string
	// contains filtered or unexported fields
}

func NewJobBuilder

func NewJobBuilder(ns, bazelImage, sidecar string) *JobBuilder

func (*JobBuilder) BazelBinaryMirror

func (j *JobBuilder) BazelBinaryMirror(u string)

func (*JobBuilder) Build

func (j *JobBuilder) Build() ([]runtime.Object, error)

func (*JobBuilder) Clone

func (j *JobBuilder) Clone() *JobBuilder

func (*JobBuilder) DefaultBazelVersion

func (j *JobBuilder) DefaultBazelVersion(ver string)

func (*JobBuilder) DefaultLimit

func (j *JobBuilder) DefaultLimit(cpu, memory resource.Quantity)

func (*JobBuilder) EnableRemoteAssetAPI

func (j *JobBuilder) EnableRemoteAssetAPI()

func (*JobBuilder) EnableRemoteCache

func (j *JobBuilder) EnableRemoteCache(addr string)

func (*JobBuilder) GitHubApp

func (j *JobBuilder) GitHubApp(appId, installationId int64, secretName string)

func (*JobBuilder) Job

func (j *JobBuilder) Job(job *config.Job) *JobBuilder

func (*JobBuilder) Platform

func (j *JobBuilder) Platform(p string) *JobBuilder

func (*JobBuilder) PullAlways

func (j *JobBuilder) PullAlways()

func (*JobBuilder) Repo

func (*JobBuilder) Task

func (j *JobBuilder) Task(task *database.Task) *JobBuilder

func (*JobBuilder) UseBazelisk

func (j *JobBuilder) UseBazelisk()

func (*JobBuilder) Vault

func (j *JobBuilder) Vault(addr string)

type KubernetesOptions

type KubernetesOptions struct {
	JobInformer        batchv1informers.JobInformer
	PodInformer        corev1informers.PodInformer
	Client             kubernetes.Interface
	SecretStoreClient  secretstoreclient.Interface
	RESTConfig         *rest.Config
	DefaultCPULimit    string
	DefaultMemoryLimit string
}

func NewKubernetesOptions

func NewKubernetesOptions(
	jInformer batchv1informers.JobInformer,
	podI corev1informers.PodInformer,
	c kubernetes.Interface,
	ssc secretstoreclient.Interface,
	cfg *rest.Config,
	cpuLimit, memoryLimit string,
) KubernetesOptions

Jump to

Keyboard shortcuts

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