lighthouse

package
v1.1.21 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Keeper           keeper.Config           `json:"tide,omitempty"`
	Plank            Plank                   `json:"plank,omitempty"`
	BranchProtection branchprotection.Config `json:"branch-protection,omitempty"`
	Orgs             map[string]org.Config   `json:"orgs,omitempty"`
	InRepoConfig     InRepoConfig            `json:"in_repo_config"`

	// TODO: Move this out of the main config.
	Jenkinses []JenkinsConfig `json:"jenkinses,omitempty"`
	// LighthouseJobNamespace is the namespace in the cluster that prow
	// components will use for looking up LighthouseJobs. The namespace
	// needs to exist and will not be created by prow.
	// Defaults to "default".
	LighthouseJobNamespace string `json:"prowjob_namespace,omitempty"`
	// PodNamespace is the namespace in the cluster that prow
	// components will use for looking up Pods owned by LighthouseJobs.
	// The namespace needs to exist and will not be created by prow.
	// Defaults to "default".
	PodNamespace string `json:"pod_namespace,omitempty"`
	// LogLevel enables dynamically updating the log level of the
	// standard logger that is used by all prow components.
	//
	// Valid values:
	//
	// "debug", "info", "warn", "warning", "error", "fatal", "panic"
	//
	// Defaults to "info".
	LogLevel string `json:"log_level,omitempty"`
	// PushGateway is a prometheus push gateway.
	PushGateway PushGateway `json:"push_gateway,omitempty"`
	// OwnersDirExcludes is used to configure which directories to ignore when
	// searching for OWNERS{,_ALIAS} files in a repo.
	OwnersDirExcludes *OwnersDirExcludes `json:"owners_dir_excludes,omitempty"`
	// Pub/Sub Subscriptions that we want to listen to
	PubSubSubscriptions PubsubSubscriptions `json:"pubsub_subscriptions,omitempty"`
	// GitHubOptions allows users to control how prow applications display GitHub website links.
	GitHubOptions GitHubOptions `json:"github,omitempty"`
	// ProviderConfig contains optional SCM provider information
	ProviderConfig *ProviderConfig `json:"providerConfig,omitempty"`
}

Config is config for all lighthouse controllers

func (*Config) InRepoConfigEnabled added in v0.0.825

func (c *Config) InRepoConfigEnabled(identifier string) bool

InRepoConfigEnabled returns whether InRepoConfig is enabled for a given repository.

func (*Config) Parse

func (c *Config) Parse() error

Parse initializes and validates the Config

type Controller

type Controller struct {
	// JobURLTemplateString compiles into JobURLTemplate at load time.
	JobURLTemplateString string `json:"job_url_template,omitempty"`
	// JobURLTemplate is compiled at load time from JobURLTemplateString. It
	// will be passed a builder.PipelineOptions and is used to set the URL for the
	// "Details" link on GitHub as well as the link from deck.
	JobURLTemplate *template.Template `json:"-"`

	// ReportTemplateString compiles into ReportTemplate at load time.
	ReportTemplateString string `json:"report_template,omitempty"`
	// ReportTemplate is compiled at load time from ReportTemplateString. It
	// will be passed a builder.PipelineOptions and can provide an optional blurb below
	// the test failures comment.
	ReportTemplate *template.Template `json:"-"`

	// MaxConcurrency is the maximum number of tests running concurrently that
	// will be allowed by the controller. 0 implies no limit.
	MaxConcurrency int `json:"max_concurrency,omitempty"`

	// MaxGoroutines is the maximum number of goroutines spawned inside the
	// controller to handle tests. Defaults to 20. Needs to be a positive
	// number.
	MaxGoroutines int `json:"max_goroutines,omitempty"`

	// AllowCancellations enables aborting presubmit jobs for commits that
	// have been superseded by newer commits in Github pull requests.
	AllowCancellations bool `json:"allow_cancellations,omitempty"`
}

Controller holds configuration applicable to all agent-specific prow controllers.

func (*Controller) Parse

func (c *Controller) Parse() error

Parse initializes and validates the Config

type GitHubOptions

type GitHubOptions struct {
	// LinkURLFromConfig is the string representation of the link_url config parameter.
	// This config parameter allows users to override the default GitHub link url for all plugins.
	// If this option is not set, we assume "https://github.com".
	LinkURLFromConfig string `json:"link_url,omitempty"`

	// LinkURL is the url representation of LinkURLFromConfig. This variable should be used
	// in all places internally.
	LinkURL *url.URL
}

GitHubOptions allows users to control how prow applications display GitHub website links.

func (*GitHubOptions) Parse

func (c *GitHubOptions) Parse() error

Parse initializes and validates the Config

type InRepoConfig added in v0.0.825

type InRepoConfig struct {
	// Enabled describes whether InRepoConfig is enabled for a given repository. This can
	// be set globally, per org or per repo using '*', 'org' or 'org/repo' as key. The
	// narrowest match always takes precedence.
	Enabled map[string]*bool `json:"enabled,omitempty"`
}

InRepoConfig to enable configuration inside the source code of a repository

this struct mirrors the similar struct inside prow

type JenkinsConfig added in v0.0.826

type JenkinsConfig struct {
	Controller `json:",inline"`
	// LabelSelectorString compiles into LabelSelector at load time.
	// If set, this option needs to match --label-selector used by
	// the desired jenkins-operator. This option is considered
	// invalid when provided with a single jenkins-operator config.
	//
	// For label selector syntax, see below:
	// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
	LabelSelectorString string `json:"label_selector,omitempty"`
	// LabelSelector is used so different jenkins-operator replicas
	// can use their own configuration.
	LabelSelector labels.Selector `json:"-"`
}

JenkinsConfig is config for the Jenkins controller.

func (*JenkinsConfig) Parse added in v0.0.826

func (c *JenkinsConfig) Parse() error

Parse initializes and validates the Config

type OwnersDirExcludes

type OwnersDirExcludes struct {
	// Repos configures a directory blacklist per repo (or org)
	Repos map[string][]string `json:"repos"`
	// Default configures a default blacklist for repos (or orgs) not
	// specifically configured
	Default []string `json:"default"`
}

OwnersDirExcludes is used to configure which directories to ignore when searching for OWNERS{,_ALIAS} files in a repo.

type Plank

type Plank struct {
	// ReportTemplateString compiles into ReportTemplate at load time.
	ReportTemplateString string `json:"report_template,omitempty"`
	// ReportTemplate is compiled at load time from ReportTemplateString. It
	// will be passed a builder.PipelineOptions and can provide an optional blurb below
	// the test failures comment.
	ReportTemplate *template.Template `json:"-"`
}

Plank is config for the plank controller.

func (*Plank) Parse

func (c *Plank) Parse() error

Parse initializes and validates the Config

type ProviderConfig

type ProviderConfig struct {
	// Kind is the go-scm driver name
	Kind string `json:"kind,omitempty"`
	// Server is the base URL for the provider, like https://github.com
	Server string `json:"server,omitempty"`
	// BotUser is the username on the provider the bot will use
	BotUser string `json:"botUser,omitempty"`
}

ProviderConfig is optionally used to configure information about the SCM provider being used. These values will be used as fallbacks if environment variables aren't set.

type PubsubSubscriptions

type PubsubSubscriptions map[string][]string

PubsubSubscriptions maps GCP projects to a list of Topics.

type PushGateway

type PushGateway struct {
	// Endpoint is the location of the prometheus pushgateway
	// where prow will push metrics to.
	Endpoint string `json:"endpoint,omitempty"`
	// IntervalString compiles into Interval at load time.
	IntervalString string `json:"interval,omitempty"`
	// Interval specifies how often prow will push metrics
	// to the pushgateway. Defaults to 1m.
	Interval time.Duration `json:"-"`
	// ServeMetrics tells if or not the components serve metrics
	ServeMetrics bool `json:"serve_metrics"`
}

PushGateway is a prometheus push gateway.

func (*PushGateway) Parse

func (c *PushGateway) Parse() error

Parse initializes and validates the Config

Jump to

Keyboard shortcuts

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