v1alpha1

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the config v1 API group +kubebuilder:object:generate=true +groupName=config.furiko.io

Index

Constants

View Source
const (
	Version = "v1"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: config.GroupName, Version: Version}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type BootstrapConfigSpec

type BootstrapConfigSpec struct {
	// DefaultResync controls the default resync duration.
	//
	// Default: 10 minutes
	// +optional
	DefaultResync metav1.Duration `json:"defaultResync,omitempty"`

	// DynamicConfigs defines how to load dynamic configs.
	// +optional
	DynamicConfigs *DynamicConfigsSpec `json:"dynamicConfigs,omitempty"`

	// HTTP controls HTTP serving.
	// +optional
	HTTP *HTTPSpec `json:"http,omitempty"`
}

BootstrapConfigSpec is a shared configuration spec for all controller managers and webhook servers.

func (*BootstrapConfigSpec) DeepCopy

func (in *BootstrapConfigSpec) DeepCopy() *BootstrapConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapConfigSpec.

func (*BootstrapConfigSpec) DeepCopyInto

func (in *BootstrapConfigSpec) DeepCopyInto(out *BootstrapConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Concurrency

type Concurrency struct {
	// Define an absolute number of workers for the controller.
	// Takes precedence over FactorOfCPUs if it is also defined.
	//
	// +optional
	Workers uint64 `json:"workers,omitempty"`

	// Define the number of workers as a factor of the number of CPUs. This is
	// useful to scale a controller vertically that is CPU-bound with a single CPU
	// count knob, and tie the number of workers based on the total number of CPUs.
	//
	// +optional
	FactorOfCPUs uint64 `json:"factorOfCPUs,omitempty"`
}

func (*Concurrency) DeepCopy

func (in *Concurrency) DeepCopy() *Concurrency

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Concurrency.

func (*Concurrency) DeepCopyInto

func (in *Concurrency) DeepCopyInto(out *Concurrency)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigName

type ConfigName string

ConfigName refers to the name of a dynamic configuration.

const (
	// JobExecutionConfigName refers to JobExecutionConfig.
	JobExecutionConfigName ConfigName = "jobs"

	// JobConfigExecutionConfigName refers to JobConfigExecutionConfig.
	JobConfigExecutionConfigName ConfigName = "jobConfigs"

	// CronExecutionConfigName refers to CronExecutionConfig.
	CronExecutionConfigName ConfigName = "cron"
)

type ControllerManagerConfigSpec

type ControllerManagerConfigSpec struct {
	// LeaderElection controls leader election configuration.
	// +optional
	LeaderElection *LeaderElectionSpec `json:"leaderElection,omitempty"`
}

ControllerManagerConfigSpec is a shared configuration spec for all controller managers.

func (*ControllerManagerConfigSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerConfigSpec.

func (*ControllerManagerConfigSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CronExecutionConfig

type CronExecutionConfig struct {
	metav1.TypeMeta `json:",inline"`

	// CronFormat specifies the format used to parse cron expressions. Select
	// between "standard" (default) or "quartz". More info can be found at
	// https://github.com/furiko-io/cronexpr.
	//
	// Default: standard
	// +optional
	CronFormat string `json:"cronFormat,omitempty"`

	// CronHashNames specifies if cron expressions should be hashed using the
	// JobConfig's name.
	//
	// This enables "hash cron expressions", which looks like `0 H * * *`. This
	// particular example means to run once a day on the 0th minute of some hour,
	// which will be determined by hashing the JobConfig's name. By enabling this
	// option, JobConfigs that use such cron schedules will be load balanced across
	// the cluster.
	//
	// If disabled, any JobConfigs that use the `H` syntax will throw a parse error.
	//
	// Default: true
	// +optional
	CronHashNames *bool `json:"cronHashNames,omitempty"`

	// CronHashSecondsByDefault specifies if the seconds field of a cron expression
	// should be a `H` or `0` by default. If enabled, it will be `H`, otherwise it
	// will default to `0`.
	//
	// For JobConfigs which use a short cron expression format (i.e. 5 or 6 tokens
	// long), the seconds field is omitted and is typically assumed to be `0` (e.g.
	// `5 10 * * *` means to run at 10:05:00 every day). Enabling this option will
	// allow JobConfigs to be scheduled across the minute, improving load balancing.
	//
	// Users can still choose to start at 0 seconds by explicitly specifying a long
	// cron expression format with `0` in the seconds field. In the above example,
	// this would be `0 5 10 * * * *`.
	//
	// Default: false
	// +optional
	CronHashSecondsByDefault *bool `json:"cronHashSecondsByDefault,omitempty"`

	// CronHashFields specifies if the fields should be hashed along with the
	// JobConfig's name.
	//
	// For example, `H H * * * * *` will always hash the seconds and minutes to the
	// same value, for example 00:37:37, 01:37:37, etc. Enabling this option will
	// append additional keys to be hashed to introduce additional non-determinism.
	//
	// Default: true
	// +optional
	CronHashFields *bool `json:"cronHashFields,omitempty"`

	// DefaultTimezone defines a default timezone to use for JobConfigs that do not
	// specify a timezone. If left empty, UTC will be used as the default timezone.
	//
	// Default: UTC
	// +optional
	DefaultTimezone *string `json:"defaultTimezone,omitempty"`

	// MaxMissedSchedules defines a maximum number of jobs that the controller
	// should back-schedule, or attempt to create after coming back up from
	// downtime. Having a sane value here would prevent a thundering herd of jobs
	// being scheduled that would exhaust resources in the cluster. Set this to 0 to
	// disable back-scheduling.
	//
	// Default: 5
	// +optional
	MaxMissedSchedules *int64 `json:"maxMissedSchedules,omitempty"`

	// MaxDowntimeThresholdSeconds defines the maximum downtime that the controller
	// can tolerate. If the controller was intentionally shut down for an extended
	// period of time, we should not attempt to back-schedule jobs once it was
	// started.
	//
	// Default: 300
	// +optional
	MaxDowntimeThresholdSeconds int64 `json:"maxDowntimeThresholdSeconds,omitempty"`
}

CronExecutionConfig defines runtime global configuration for Cron in the cluster.

func (*CronExecutionConfig) DeepCopy

func (in *CronExecutionConfig) DeepCopy() *CronExecutionConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronExecutionConfig.

func (*CronExecutionConfig) DeepCopyInto

func (in *CronExecutionConfig) DeepCopyInto(out *CronExecutionConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CronExecutionConfig) DeepCopyObject

func (in *CronExecutionConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DynamicConfigsSpec

type DynamicConfigsSpec struct {
	// Defines how the dynamic ConfigMap is loaded.
	//
	// Defaults to:
	//  - namespace: furiko-system
	//  - name: execution-dynamic-config
	//
	// +optional
	ConfigMap *ObjectReference `json:"configMap,omitempty"`

	// Defines how the dynamic Secret is loaded. If the Secret is present, fields
	// take precedence over those defined in ConfigMap.
	//
	// Defaults to:
	//  - namespace: furiko-system
	//  - name: execution-dynamic-config
	//
	// +optional
	Secret *ObjectReference `json:"secret,omitempty"`
}

func (*DynamicConfigsSpec) DeepCopy

func (in *DynamicConfigsSpec) DeepCopy() *DynamicConfigsSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicConfigsSpec.

func (*DynamicConfigsSpec) DeepCopyInto

func (in *DynamicConfigsSpec) DeepCopyInto(out *DynamicConfigsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExecutionControllerConcurrencySpec

type ExecutionControllerConcurrencySpec struct {
	// Control the concurrency for the Job controller.
	//
	// Default: factorOfCPUs = 4
	// +optional
	Job *Concurrency `json:"job,omitempty"`

	// Control the concurrency for the JobConfig controller.
	//
	// Default: factorOfCPUs = 4
	// +optional
	JobConfig *Concurrency `json:"jobConfig,omitempty"`

	// Control the concurrency for the JobQueue controller.
	//
	// Default: factorOfCPUs = 4
	// +optional
	JobQueue *Concurrency `json:"jobQueue,omitempty"`

	// Control the concurrency for the Cron controller.
	//
	// Default: factorOfCPUs = 4
	// +optional
	Cron *Concurrency `json:"cron,omitempty"`
}

func (*ExecutionControllerConcurrencySpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionControllerConcurrencySpec.

func (*ExecutionControllerConcurrencySpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExecutionControllerConfig

type ExecutionControllerConfig struct {
	metav1.TypeMeta `json:",inline"`

	BootstrapConfigSpec         `json:",inline"`
	ControllerManagerConfigSpec `json:",inline"`

	// ControllerConcurrency defines the concurrency factor for individual controllers.
	// +optional
	ControllerConcurrency *ExecutionControllerConcurrencySpec `json:"controllerConcurrency,omitempty"`
}

ExecutionControllerConfig defines bootstrap configuration for execution-controller.

func (*ExecutionControllerConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionControllerConfig.

func (*ExecutionControllerConfig) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExecutionControllerConfig) DeepCopyObject

func (in *ExecutionControllerConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ExecutionWebhookConfig

type ExecutionWebhookConfig struct {
	metav1.TypeMeta `json:",inline"`

	BootstrapConfigSpec `json:",inline"`

	// Webhooks controls the webhooks server.
	// +optional
	Webhooks *WebhookServerSpec `json:"webhooks,omitempty"`
}

ExecutionWebhookConfig defines bootstrap configuration for execution-webhook.

func (*ExecutionWebhookConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionWebhookConfig.

func (*ExecutionWebhookConfig) DeepCopyInto

func (in *ExecutionWebhookConfig) DeepCopyInto(out *ExecutionWebhookConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExecutionWebhookConfig) DeepCopyObject

func (in *ExecutionWebhookConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type HTTPSpec

type HTTPSpec struct {
	// BindAddress is the TCP address that the controller manager should bind to for
	// serving HTTP requests.
	//
	// Default: :8080
	// +optional
	BindAddress string `json:"bindAddress,omitempty"`

	// Metrics controls metrics serving.
	// +optional
	Metrics *MetricsSpec `json:"metrics,omitempty"`

	// Health controls health status serving.
	// +optional
	Health *HealthSpec `json:"health,omitempty"`
}

func (*HTTPSpec) DeepCopy

func (in *HTTPSpec) DeepCopy() *HTTPSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPSpec.

func (*HTTPSpec) DeepCopyInto

func (in *HTTPSpec) DeepCopyInto(out *HTTPSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HealthSpec

type HealthSpec struct {
	// Enabled is whether the controller manager enables serving health probes.
	//
	// Default: true
	// +optional
	Enabled *bool `json:"enabled,omitempty"`

	// ReadinessProbePath is the path to the readiness probe.
	//
	// Default: /readyz
	// +optional
	ReadinessProbePath string `json:"readinessProbePath,omitempty"`

	// LivenessProbePath is the path to the liveness probe.
	//
	// Default: /healthz
	// +optional
	LivenessProbePath string `json:"livenessProbePath,omitempty"`
}

func (*HealthSpec) DeepCopy

func (in *HealthSpec) DeepCopy() *HealthSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthSpec.

func (*HealthSpec) DeepCopyInto

func (in *HealthSpec) DeepCopyInto(out *HealthSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JobConfigExecutionConfig

type JobConfigExecutionConfig struct {
	metav1.TypeMeta `json:",inline"`

	// MaxEnqueuedJobs is the global maximum enqueued jobs that can be enqueued for
	// a single JobConfig.
	//
	// Default: 20
	// +optional
	MaxEnqueuedJobs *int64 `json:"maxEnqueuedJobs,omitempty"`
}

JobConfigExecutionConfig defines runtime global configuration for JobConfigs in the cluster.

func (*JobConfigExecutionConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobConfigExecutionConfig.

func (*JobConfigExecutionConfig) DeepCopyInto

func (in *JobConfigExecutionConfig) DeepCopyInto(out *JobConfigExecutionConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JobConfigExecutionConfig) DeepCopyObject

func (in *JobConfigExecutionConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type JobExecutionConfig

type JobExecutionConfig struct {
	metav1.TypeMeta `json:",inline"`

	// DefaultTTLSecondsAfterFinished is the default time-to-live (TTL) for a Job
	// after it has finished. Lower this value to reduce the strain on the
	// cluster/kubelet. Set to 0 to delete immediately after the Job is finished.
	//
	// Default: 3600
	// +optional
	DefaultTTLSecondsAfterFinished *int64 `json:"defaultTTLSecondsAfterFinished,omitempty"`

	// DefaultPendingTimeoutSeconds is default timeout to use if job does not
	// specify the pending timeout. By default, this is a non-zero value to prevent
	// permanently stuck jobs. To disable default pending timeout, set this to 0.
	//
	// Default: 900
	// +optional
	DefaultPendingTimeoutSeconds *int64 `json:"defaultPendingTimeoutSeconds,omitempty"`

	// ForceDeleteTaskTimeoutSeconds is the duration before we use force deletion
	// instead of normal deletion. This timeout is computed from the
	// deletionTimestamp of the object, which may also include an additional delay
	// of deletionGracePeriodSeconds. Set this value to 0 to disable force deletion.
	//
	// Default: 900
	// +optional
	ForceDeleteTaskTimeoutSeconds *int64 `json:"forceDeleteTaskTimeoutSeconds,omitempty"`
}

JobExecutionConfig defines runtime global configuration for Jobs in the cluster.

func (*JobExecutionConfig) DeepCopy

func (in *JobExecutionConfig) DeepCopy() *JobExecutionConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobExecutionConfig.

func (*JobExecutionConfig) DeepCopyInto

func (in *JobExecutionConfig) DeepCopyInto(out *JobExecutionConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JobExecutionConfig) DeepCopyObject

func (in *JobExecutionConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type LeaderElectionSpec

type LeaderElectionSpec struct {
	// Enabled controls whether leader election is enabled.
	//
	// Default: false
	// +optional
	Enabled *bool `json:"enabled,omitempty"`

	// LeaseName controls the name used for the lease.
	// If left empty, then a default name will be used.
	//
	// +optional
	LeaseName string `json:"leaseName,omitempty"`

	// LeaseNamespace controls the namespace used for the lease.
	//
	// Default: furiko-system
	// +optional
	LeaseNamespace string `json:"leaseNamespace,omitempty"`

	// LeaseDuration is the duration that non-leader candidates will wait after
	// observing a leadership renewal until attempting to acquire leadership of a
	// led but unrenewed leader slot. This is effectively the maximum duration that
	// a leader can be stopped before it is replaced by another candidate. This is
	// only applicable if leader election is enabled.
	//
	// Default: 30s
	// +optional
	LeaseDuration metav1.Duration `json:"leaseDuration,omitempty"`

	// RenewDeadline is the interval between attempts by the acting master to renew
	// a leadership slot before it stops leading. This must be less than or equal to
	// the lease duration. This is only applicable if leader election is enabled.
	//
	// Default: 15s
	// +optional
	RenewDeadline metav1.Duration `json:"renewDeadline,omitempty"`

	// RetryPeriod is the duration the clients should wait between attempting
	// acquisition and renewal of a leadership. This is only applicable if leader
	// election is enabled.
	//
	// Default: 5s
	// +optional
	RetryPeriod metav1.Duration `json:"retryPeriod,omitempty"`
}

func (*LeaderElectionSpec) DeepCopy

func (in *LeaderElectionSpec) DeepCopy() *LeaderElectionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaderElectionSpec.

func (*LeaderElectionSpec) DeepCopyInto

func (in *LeaderElectionSpec) DeepCopyInto(out *LeaderElectionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MetricsSpec

type MetricsSpec struct {
	// Enabled is whether the controller manager enables serving Prometheus metrics.
	//
	// Default: true
	// +optional
	Enabled *bool `json:"enabled,omitempty"`

	// MetricsPath is the path that serves Prometheus metrics.
	//
	// Default: /metrics
	// +optional
	MetricsPath string `json:"metricsPath,omitempty"`
}

func (*MetricsSpec) DeepCopy

func (in *MetricsSpec) DeepCopy() *MetricsSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsSpec.

func (*MetricsSpec) DeepCopyInto

func (in *MetricsSpec) DeepCopyInto(out *MetricsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ObjectReference

type ObjectReference struct {
	// Namespace of the object. If empty, the default namespace will be used.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Name of the object.
	Name string `json:"name"`
}

func (*ObjectReference) DeepCopy

func (in *ObjectReference) DeepCopy() *ObjectReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.

func (*ObjectReference) DeepCopyInto

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebhookServerSpec

type WebhookServerSpec struct {
	// BindAddress is the TCP address that the controller manager should bind to for
	// serving webhook requests over HTTPS.
	//
	// Default: :9443
	// +optional
	BindAddress string `json:"bindAddress,omitempty"`

	// TLSCertFile is the path to the X.509 certificate to use for serving webhook
	// requests over HTTPS.
	TLSCertFile string `json:"tlsCertFile"`

	// TLSPrivateKeyFile is the path to the private key which corresponds to
	// TLSCertFile, to use for serving webhook requests over HTTPS.
	TLSPrivateKeyFile string `json:"tlsPrivateKeyFile"`
}

func (*WebhookServerSpec) DeepCopy

func (in *WebhookServerSpec) DeepCopy() *WebhookServerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookServerSpec.

func (*WebhookServerSpec) DeepCopyInto

func (in *WebhookServerSpec) DeepCopyInto(out *WebhookServerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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