config

package
v2.0.37 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 6 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

func SetTaskPluginConfig added in v2.0.24

func SetTaskPluginConfig(cfg *TaskPluginConfig) error

SetTaskPluginConfig replaces the active task plugin configuration. Intended for use in tests.

Types

type Config

type Config struct {
	// MetricsBindAddress is the address the metrics endpoint binds to.
	// Use :8443 for HTTPS or :8080 for HTTP, or leave as 0 to disable.
	MetricsBindAddress string `json:"metricsBindAddress" pflag:",Address the metrics endpoint binds to"`

	// HealthProbeBindAddress is the address the probe endpoint binds to.
	HealthProbeBindAddress string `json:"healthProbeBindAddress" pflag:",Address the probe endpoint binds to"`

	// LeaderElect enables leader election for controller manager.
	LeaderElect bool `json:"leaderElect" pflag:",Enable leader election for controller manager"`

	// MetricsSecure controls whether the metrics endpoint is served via HTTPS.
	MetricsSecure bool `json:"metricsSecure" pflag:",Serve metrics endpoint via HTTPS"`

	// WebhookCertPath is the directory containing the webhook certificate.
	WebhookCertPath string `json:"webhookCertPath" pflag:",Directory containing the webhook certificate"`

	// WebhookCertName is the name of the webhook certificate file.
	WebhookCertName string `json:"webhookCertName" pflag:",Name of the webhook certificate file"`

	// WebhookCertKey is the name of the webhook key file.
	WebhookCertKey string `json:"webhookCertKey" pflag:",Name of the webhook key file"`

	// MetricsCertPath is the directory containing the metrics server certificate.
	MetricsCertPath string `json:"metricsCertPath" pflag:",Directory containing the metrics server certificate"`

	// MetricsCertName is the name of the metrics server certificate file.
	MetricsCertName string `json:"metricsCertName" pflag:",Name of the metrics server certificate file"`

	// MetricsCertKey is the name of the metrics server key file.
	MetricsCertKey string `json:"metricsCertKey" pflag:",Name of the metrics server key file"`

	// EnableHTTP2 enables HTTP/2 for the metrics and webhook servers.
	EnableHTTP2 bool `json:"enableHTTP2" pflag:",Enable HTTP/2 for metrics and webhook servers"`

	// EventsServiceURL is the URL of the event Service for reporting action state updates.
	EventsServiceURL string `json:"EventsServiceURL" pflag:",URL of the Event Service for action event updates"`

	// CacheServiceURL is the URL of the cache service for catalog operations.
	CacheServiceURL string `json:"cacheServiceURL" pflag:",URL of the cache service for task cache operations"`

	// Cluster is the cluster identifier attached to action events.
	Cluster string `json:"cluster" pflag:",Cluster identifier for action events"`

	// DefaultK8sServiceAccount is assigned to task pods when the task's security
	// context does not specify one. Empty means no account is set, so Kubernetes
	// assigns the `default` ServiceAccount of the pod's own namespace.
	DefaultK8sServiceAccount string `json:"defaultK8sServiceAccount" pflag:",Default Kubernetes service account for task pods when the task does not set one"`

	// MaxSystemFailures bounds consecutive system-level failures (Plugin.Handle Go
	// errors and plugin-reported system-retryable failures) before a TaskAction is
	// converted to a permanent failure.
	MaxSystemFailures int32 `json:"maxSystemFailures" pflag:",Max consecutive system-level failures before forcing permanent failure"`

	// MaxConcurrentReconciles is the maximum number of concurrent reconcile loops for TaskActions.
	MaxConcurrentReconciles int `json:"maxConcurrentReconciles" pflag:",Max concurrent reconcile loops for TaskActions"`

	// RequeueDuration is how long the controller waits before reconciling a running
	// TaskAction again. Lowering it makes task actions more responsive at the cost of
	// more reconciles and more load on the plugin backends. 0 or unset means the
	// built-in default of 10s.
	RequeueDuration stdconfig.Duration `json:"requeueDuration" pflag:",How long to wait before reconciling a running TaskAction again. 0 means the default of 10s"`

	// GC configures the garbage collector for terminal TaskActions.
	GC GCConfig `json:"gc" pflag:",Garbage collector configuration for terminal TaskActions"`
}

Config holds the configuration for the executor controller manager

func GetConfig

func GetConfig() *Config

GetConfig returns the parsed executor configuration

func (Config) GetPFlagSet

func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the flags is json-name.json-sub-name... etc.

type GCConfig added in v2.0.8

type GCConfig struct {
	// Interval is how often the garbage collector runs. 0 disables GC.
	Interval stdconfig.Duration `json:"interval" pflag:",How often the garbage collector runs. 0 disables GC."`

	// MaxTTL is the time-to-live for terminal TaskActions before deletion.
	MaxTTL stdconfig.Duration `json:"maxTTL" pflag:",Time-to-live for terminal TaskActions before deletion."`
}

GCConfig holds the configuration for the TaskAction garbage collector.

type TaskPluginConfig added in v2.0.24

type TaskPluginConfig struct {
	// DefaultForTaskTypes overrides which plugin handles a given task type.
	// Key: task type string, Value: plugin ID string.
	DefaultForTaskTypes map[string]string `json:"default-for-task-types"`
}

TaskPluginConfig holds the task plugin routing configuration, read from the tasks.task-plugins config section.

func GetTaskPluginConfig added in v2.0.24

func GetTaskPluginConfig() *TaskPluginConfig

GetTaskPluginConfig returns the parsed task plugin configuration from the tasks.task-plugins config section.

type TasksConfig added in v2.0.24

type TasksConfig struct{}

TasksConfig is the top-level tasks configuration container.

Jump to

Keyboard shortcuts

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