v1alpha1

package
v0.0.0-...-13d25fa Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the airflow v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=k8s.io/airflow-operator/pkg/apis/airflow +k8s:defaulter-gen=TypeMeta +groupName=airflow.k8s.io

Package v1alpha1 contains API Schema definitions for the airflow v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=k8s.io/airflow-operator/pkg/apis/airflow +k8s:defaulter-gen=TypeMeta +groupName=airflow.k8s.io

Index

Constants

View Source
const (
	DefaultMySQLImage      = "mysql"
	DefaultMySQLVersion    = "5.7"
	DefaultPostgresImage   = "postgres"
	DefaultPostgresVersion = "9.5"

	StatusReady      = "Ready"
	StatusInProgress = "InProgress"
	StatusDisabled   = "Disabled"
	DatabaseMySQL    = "MySQL"
	DatabasePostgres = "Postgres"
	DatabaseSQLProxy = "SQLProxy"
)

defaults and constant strings

View Source
const (
	PasswordCharNumSpace = "abcdefghijklmnopqrstuvwxyz0123456789"
	PasswordCharSpace    = "abcdefghijklmnopqrstuvwxyz"

	GitsyncImage       = "gcr.io/google_containers/git-sync"
	GitsyncVersion     = "v3.0.1"
	GCSsyncImage       = "gcr.io/cloud-airflow-releaser/gcs-syncd"
	GCSsyncVersion     = "cloud_composer_service_2018-05-23-RC0"
	ExecutorLocal      = "Local"
	ExecutorCelery     = "Celery"
	ExecutorSequential = "Sequential"
	ExecutorK8s        = "Kubernetes"
)

defaults and constant strings

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "airflow.k8s.io", Version: "v1alpha1"}

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

	// AddToScheme is required by pkg/client/...
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func RandomAlphanumericString

func RandomAlphanumericString(strlen int) []byte

RandomAlphanumericString generates a random password of some fixed length.

func Resource

func Resource(resource string) schema.GroupResource

Resource is required by pkg/client/listers/...

Types

type AirflowBase

type AirflowBase struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AirflowBaseSpec   `json:"spec,omitempty"`
	Status AirflowBaseStatus `json:"status,omitempty"`
}

AirflowBase represents the components required for an Airflow scheduler and worker to function. At a minimum they need a SQL service (MySQL or SQLProxy) and Airflow UI. In addition for an installation with minimal external dependencies, NFS and Airflow UI are also added. +k8s:openapi-gen=true +kubebuilder:resource:path=airflowbases

func NewAirflowBase

func NewAirflowBase(name, namespace string, database string, storage bool) *AirflowBase

NewAirflowBase return a defaults filled AirflowBase object

func (*AirflowBase) ApplyDefaults

func (b *AirflowBase) ApplyDefaults()

ApplyDefaults the AirflowBase

func (*AirflowBase) DeepCopy

func (in *AirflowBase) DeepCopy() *AirflowBase

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

func (*AirflowBase) DeepCopyInto

func (in *AirflowBase) DeepCopyInto(out *AirflowBase)

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

func (*AirflowBase) DeepCopyObject

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

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

func (*AirflowBase) HandleError

func (b *AirflowBase) HandleError(err error)

HandleError records status or error in status

func (*AirflowBase) OwnerRef

func (b *AirflowBase) OwnerRef() *metav1.OwnerReference

OwnerRef returns owner ref object with the component's resource as owner

func (*AirflowBase) Validate

func (b *AirflowBase) Validate() error

Validate the AirflowBase

type AirflowBaseList

type AirflowBaseList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AirflowBase `json:"items"`
}

AirflowBaseList contains a list of AirflowBase

func (*AirflowBaseList) DeepCopy

func (in *AirflowBaseList) DeepCopy() *AirflowBaseList

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

func (*AirflowBaseList) DeepCopyInto

func (in *AirflowBaseList) DeepCopyInto(out *AirflowBaseList)

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

func (*AirflowBaseList) DeepCopyObject

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

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

type AirflowBaseSpec

type AirflowBaseSpec struct {
	// Selector for fitting pods to nodes whose labels match the selector.
	// https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// Define scheduling constraints for pods.
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
	// Custom annotations to be added to the pods.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// Custom labels to be added to the pods.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
	// Spec for MySQL component.
	// +optional
	MySQL    *MySQLSpec    `json:"mysql,omitempty"`
	SQLProxy *SQLProxySpec `json:"sqlproxy,omitempty"`
	Postgres *PostgresSpec `json:"postgres,omitempty"`
	// Spec for NFS component.
	// +optional
	Storage *NFSStoreSpec `json:"storage,omitempty"`
}

AirflowBaseSpec defines the desired state of AirflowBase

func (*AirflowBaseSpec) DeepCopy

func (in *AirflowBaseSpec) DeepCopy() *AirflowBaseSpec

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

func (*AirflowBaseSpec) DeepCopyInto

func (in *AirflowBaseSpec) DeepCopyInto(out *AirflowBaseSpec)

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

type AirflowBaseStatus

type AirflowBaseStatus struct {
	status.Meta          `json:",inline"`
	status.ComponentMeta `json:",inline"`
}

AirflowBaseStatus defines the observed state of AirflowBase

func (*AirflowBaseStatus) DeepCopy

func (in *AirflowBaseStatus) DeepCopy() *AirflowBaseStatus

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

func (*AirflowBaseStatus) DeepCopyInto

func (in *AirflowBaseStatus) DeepCopyInto(out *AirflowBaseStatus)

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

type AirflowCluster

type AirflowCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AirflowClusterSpec   `json:"spec,omitempty"`
	Status AirflowClusterStatus `json:"status,omitempty"`
}

AirflowCluster represents the Airflow Scheduler and workers for a single DAG folder function. At a minimum they need a SQL service (MySQL or SQLProxy) and Airflow UI. In addition for an installation with minimal external dependencies, NFS and Airflow UI are also added. +k8s:openapi-gen=true +kubebuilder:resource:path=airflowclusters

func NewAirflowCluster

func NewAirflowCluster(name, namespace, executor, base string, dags *DagSpec) *AirflowCluster

NewAirflowCluster return a defaults filled AirflowCluster object

func (*AirflowCluster) ApplyDefaults

func (b *AirflowCluster) ApplyDefaults()

ApplyDefaults the AirflowCluster

func (*AirflowCluster) DeepCopy

func (in *AirflowCluster) DeepCopy() *AirflowCluster

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

func (*AirflowCluster) DeepCopyInto

func (in *AirflowCluster) DeepCopyInto(out *AirflowCluster)

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

func (*AirflowCluster) DeepCopyObject

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

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

func (*AirflowCluster) Validate

func (b *AirflowCluster) Validate() error

Validate the AirflowCluster

type AirflowClusterList

type AirflowClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AirflowCluster `json:"items"`
}

AirflowClusterList contains a list of AirflowCluster

func (*AirflowClusterList) DeepCopy

func (in *AirflowClusterList) DeepCopy() *AirflowClusterList

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

func (*AirflowClusterList) DeepCopyInto

func (in *AirflowClusterList) DeepCopyInto(out *AirflowClusterList)

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

func (*AirflowClusterList) DeepCopyObject

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

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

type AirflowClusterSpec

type AirflowClusterSpec struct {
	// Selector for fitting pods to nodes whose labels match the selector.
	// https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// Define scheduling constraints for pods.
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
	// Custom annotations to be added to the pods.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// Custom labels to be added to the pods.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
	// Airflow Executor desired: local,celery,kubernetes
	// +optional
	Executor string `json:"executor,omitempty"`
	// Airflow config as env list
	// +optional
	Config ClusterConfig `json:"config,omitempty"`
	// Spec for MemoryStore component
	// +optional
	MemoryStore *MemoryStoreSpec `json:"memoryStore,omitempty"`
	// Spec for Redis component.
	// +optional
	Redis *RedisSpec `json:"redis,omitempty"`
	// Spec for Airflow Scheduler component.
	// +optional
	Scheduler *SchedulerSpec `json:"scheduler,omitempty"`
	// Spec for Airflow Workers
	// +optional
	Worker *WorkerSpec `json:"worker,omitempty"`
	// Spec for Airflow UI component.
	// +optional
	UI *AirflowUISpec `json:"ui,omitempty"`
	// Spec for Flower component.
	// +optional
	Flower *FlowerSpec `json:"flower,omitempty"`
	// Spec for DAG source and location
	// +optional
	DAGs *DagSpec `json:"dags,omitempty"`
	// AirflowBaseRef is a reference to the AirflowBase CR
	AirflowBaseRef *corev1.LocalObjectReference `json:"airflowbase,omitempty"`
}

AirflowClusterSpec defines the desired state of AirflowCluster

func (*AirflowClusterSpec) DeepCopy

func (in *AirflowClusterSpec) DeepCopy() *AirflowClusterSpec

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

func (*AirflowClusterSpec) DeepCopyInto

func (in *AirflowClusterSpec) DeepCopyInto(out *AirflowClusterSpec)

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

type AirflowClusterStatus

type AirflowClusterStatus struct {
	status.Meta          `json:",inline"`
	status.ComponentMeta `json:",inline"`
}

AirflowClusterStatus defines the observed state of AirflowCluster

func (*AirflowClusterStatus) DeepCopy

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

func (*AirflowClusterStatus) DeepCopyInto

func (in *AirflowClusterStatus) DeepCopyInto(out *AirflowClusterStatus)

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

type AirflowUISpec

type AirflowUISpec struct {
	// Image defines the AirflowUI Docker image.
	// +optional
	Image string `json:"image,omitempty"`
	// Version defines the AirflowUI Docker image version.
	// +optional
	Version string `json:"version,omitempty"`
	// Replicas defines the number of running Airflow UI instances in a cluster
	// +optional
	Replicas int32 `json:"replicas,omitempty"`
	// Resources is the resource requests and limits for the pods.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

AirflowUISpec defines the attributes to deploy Airflow UI component

func (*AirflowUISpec) DeepCopy

func (in *AirflowUISpec) DeepCopy() *AirflowUISpec

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

func (*AirflowUISpec) DeepCopyInto

func (in *AirflowUISpec) DeepCopyInto(out *AirflowUISpec)

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

type ClusterConfig

type ClusterConfig struct {
	// Airflow defines a list of kv pairs that describe env variables injected into the nodes
	// +optional
	AirflowEnv map[string]string `json:"airflow,omitempty"`
	// AirflowSecret defines a list of secret envs
	// +optional
	AirflowSecretEnv []SecretEnv `json:"airflowsecret,omitempty"`
}

ClusterConfig is used to capture the config for Airflow

func (*ClusterConfig) DeepCopy

func (in *ClusterConfig) DeepCopy() *ClusterConfig

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

func (*ClusterConfig) DeepCopyInto

func (in *ClusterConfig) DeepCopyInto(out *ClusterConfig)

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

type DagSpec

type DagSpec struct {
	// DagSubdir is the directory under source where the dags are present
	DagSubdir string `json:"subdir,omitempty"`
	// GitSpec defines details to pull DAGs from a git repo using
	// github.com/kubernetes/git-sync sidecar
	Git *GitSpec `json:"git,omitempty"`
	// NfsPVSpec
	NfsPV *corev1.PersistentVolumeClaim `json:"nfspv,omitempty"`
	// Storage has s3 compatible storage spec for copying files from
	Storage *StorageSpec `json:"storage,omitempty"`
	// Gcs config which uses storage spec
	GCS *GCSSpec `json:"gcs,omitempty"`
}

DagSpec defines where the DAGs are located and how to access them

func (*DagSpec) DeepCopy

func (in *DagSpec) DeepCopy() *DagSpec

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

func (*DagSpec) DeepCopyInto

func (in *DagSpec) DeepCopyInto(out *DagSpec)

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

type FlowerSpec

type FlowerSpec struct {
	// Image defines the Flower Docker image.
	// +optional
	Image string `json:"image,omitempty"`
	// Version defines the Flower Docker image version.
	// +optional
	Version string `json:"version,omitempty"`
	// Replicas defines the number of running Flower instances in a cluster
	Replicas int32 `json:"replicas,omitempty"`
	// Resources is the resource requests and limits for the pods.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

FlowerSpec defines the attributes to deploy Flower component

func (*FlowerSpec) DeepCopy

func (in *FlowerSpec) DeepCopy() *FlowerSpec

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

func (*FlowerSpec) DeepCopyInto

func (in *FlowerSpec) DeepCopyInto(out *FlowerSpec)

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

type GCSSpec

type GCSSpec struct {
	// Bucket describes the GCS bucket
	Bucket string `json:"bucket,omitempty"`
	// Once syncs initially and quits (use init container instead of sidecar)
	Once bool `json:"once,omitempty"`
}

GCSSpec defines the atributed needed to sync from a git repo

func (*GCSSpec) DeepCopy

func (in *GCSSpec) DeepCopy() *GCSSpec

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

func (*GCSSpec) DeepCopyInto

func (in *GCSSpec) DeepCopyInto(out *GCSSpec)

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

type GitSpec

type GitSpec struct {
	// Repo describes the http/ssh uri for git repo
	Repo string `json:"repo,"`
	// Branch describes the branch name to be synced
	Branch string `json:"branch,omitempty"`
	// Rev is the git hash to be used for syncing
	Rev string `json:"rev,omitempty"`
	// User for git access
	User string `json:"user,omitempty"`
	// Once syncs initially and quits (use init container instead of sidecar)
	Once bool `json:"once,omitempty"`
	// Reference to git credentials (user, password, ssh etc)
	CredSecretRef *corev1.LocalObjectReference `json:"cred,omitempty"`
}

GitSpec defines the atributed needed to sync from a git repo

func (*GitSpec) DeepCopy

func (in *GitSpec) DeepCopy() *GitSpec

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

func (*GitSpec) DeepCopyInto

func (in *GitSpec) DeepCopyInto(out *GitSpec)

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

type MemoryStoreSpec

type MemoryStoreSpec struct {
	// Project defines the SQL instance project
	Project string `json:"project"`
	// Region defines the SQL instance region
	Region string `json:"region"`
	// AlternativeLocationID - alt
	// +optional.
	AlternativeLocationID string `json:"alternativeLocationId,omitempty"`
	// AuthorizedNetwork
	// +optional.
	AuthorizedNetwork string `json:"authorizedNetwork,omitempty"`
	// LocationID The zone where the instance will be provisioned.
	// +optional
	LocationID string `json:"locationId,omitempty"`
	// MemorySizeGb: Required. Redis memory size in GiB.
	MemorySizeGb int64 `json:"memorySizeGb,omitempty"`
	// RedisConfigs: Optional. Redis configuration parameters
	RedisConfigs map[string]string `json:"redisConfigs,omitempty"`
	// RedisVersion: Optional. The version of Redis software.
	RedisVersion string `json:"redisVersion,omitempty"`
	// Tier: Required. The service tier of the instance.
	Tier string `json:"tier,omitempty"`
	// Specifies the behavior Redis follows when the memory size limit is reached.
	MaxMemoryPolicy string `json:"maxMemoryPolicy,omitempty"`
	// Allows clients to subscribe to notifications on certain keyspace events
	NotifyKeyspaceEvents string `json:"notifyKeyspaceEvents,omitempty"`
	// Status
	Status MemoryStoreStatus `json:"status,omitempty"`
}

MemoryStoreSpec defines the attributes and desired state of MemoryStore component

func (*MemoryStoreSpec) DeepCopy

func (in *MemoryStoreSpec) DeepCopy() *MemoryStoreSpec

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

func (*MemoryStoreSpec) DeepCopyInto

func (in *MemoryStoreSpec) DeepCopyInto(out *MemoryStoreSpec)

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

type MemoryStoreStatus

type MemoryStoreStatus struct {
	// CreateTime: Output only. The time the instance was created.
	CreateTime string `json:"createTime,omitempty"`
	// CurrentLocationID: Output only. The current zone where the Redis
	// endpoint is placed.
	CurrentLocationID string `json:"currentLocationId,omitempty"`
	// StatusMessage: Output only. Additional information about the current
	// status of this instance, if available.
	StatusMessage string `json:"statusMessage,omitempty"`
	// Host: Output only. Hostname or IP address of the exposed Redis endpoint used by
	// clients to connect to the service.
	Host string `json:"host,omitempty"`
	// Port: Output only. The port number of the exposed Redis endpoint.
	Port int64 `json:"port,omitempty"`
	// State: Output only. The current state of this instance.
	State                string `json:"state,omitempty"`
	status.Meta          `json:",inline"`
	status.ComponentMeta `json:",inline"`
}

MemoryStoreStatus defines the observed state of MemoryStore

func (*MemoryStoreStatus) DeepCopy

func (in *MemoryStoreStatus) DeepCopy() *MemoryStoreStatus

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

func (*MemoryStoreStatus) DeepCopyInto

func (in *MemoryStoreStatus) DeepCopyInto(out *MemoryStoreStatus)

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

type MySQLBackup

type MySQLBackup struct {
	// Schedule is the cron string used to schedule backup
	Schedule string `json:"schedule"`
	// Storage has the s3 compatible storage spec
	Storage StorageSpec `json:"storage"`
}

MySQLBackup defines the Backup Custom Resource which is handled by MySQLOperator

func (*MySQLBackup) DeepCopy

func (in *MySQLBackup) DeepCopy() *MySQLBackup

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

func (*MySQLBackup) DeepCopyInto

func (in *MySQLBackup) DeepCopyInto(out *MySQLBackup)

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

type MySQLSpec

type MySQLSpec struct {
	// Image defines the MySQL Docker image name
	// +optional
	Image string `json:"image,omitempty"`
	// Version defines the MySQL Docker image version
	// +optional
	Version string `json:"version,omitempty"`
	// Replicas defines the number of running MySQL instances in a cluster
	// +optional
	Replicas int32 `json:"replicas,omitempty"`
	// VolumeClaimTemplate allows a user to specify volume claim for MySQL Server files
	// +optional
	VolumeClaimTemplate *corev1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"`
	// BackupVolumeClaimTemplate allows a user to specify a volume to temporarily store the
	// data for a backup prior to it being shipped to object storage.
	// +optional
	BackupVolumeClaimTemplate *corev1.PersistentVolumeClaim `json:"backupVolumeClaimTemplate,omitempty"`
	// Flag when True generates MySQLOperator CustomResource to be handled by MySQL Operator
	// If False, a StatefulSet with 1 replica is created (not for production setups)
	// +optional
	Operator bool `json:"operator,omitempty"`
	// Spec defining the Backup Custom Resource to be handled by MySQLOperator
	// Ignored when Operator is False
	// +optional
	Backup *MySQLBackup `json:"backup,omitempty"`
	// Resources is the resource requests and limits for the pods.
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// Options command line options for mysql
	Options map[string]string
}

MySQLSpec defines the attributes and desired state of MySQL Component TODO - minimum spec needed .. for now it is version: "" need to consider empty mysql

func (*MySQLSpec) DeepCopy

func (in *MySQLSpec) DeepCopy() *MySQLSpec

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

func (*MySQLSpec) DeepCopyInto

func (in *MySQLSpec) DeepCopyInto(out *MySQLSpec)

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

type NFSStoreSpec

type NFSStoreSpec struct {
	// Image defines the NFS Docker image.
	// +optional
	Image string `json:"image,omitempty"`
	// Version defines the NFS Server Docker image version.
	// +optional
	Version string `json:"version,omitempty"`
	// Resources is the resource requests and limits for the pods.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// Volume allows a user to specify volume claim template to be used for fileserver
	// +optional
	Volume *corev1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"`
}

NFSStoreSpec defines the attributes to deploy Airflow Storage component

func (*NFSStoreSpec) DeepCopy

func (in *NFSStoreSpec) DeepCopy() *NFSStoreSpec

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

func (*NFSStoreSpec) DeepCopyInto

func (in *NFSStoreSpec) DeepCopyInto(out *NFSStoreSpec)

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

type PostgresSpec

type PostgresSpec struct {
	// Image defines the Postgres Docker image name
	// +optional
	Image string `json:"image,omitempty"`
	// Version defines the Postgres Docker image version
	// +optional
	Version string `json:"version,omitempty"`
	// Replicas defines the number of running Postgres instances in a cluster
	// +optional
	Replicas int32 `json:"replicas,omitempty"`
	// VolumeClaimTemplate allows a user to specify volume claim for Postgres Server files
	// +optional
	VolumeClaimTemplate *corev1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"`
	// Flag when True generates PostgresOperator CustomResource to be handled by Postgres Operator
	// If False, a StatefulSet with 1 replica is created (not for production setups)
	// +optional
	Operator bool `json:"operator,omitempty"`
	// Resources is the resource requests and limits for the pods.
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// Options command line options for mysql
	Options map[string]string
}

PostgresSpec defines the attributes and desired state of Postgres Component TODO - minimum spec needed .. for now it is version: "" need to consider empty mysql

func (*PostgresSpec) DeepCopy

func (in *PostgresSpec) DeepCopy() *PostgresSpec

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

func (*PostgresSpec) DeepCopyInto

func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec)

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

type RedisSpec

type RedisSpec struct {
	// Image defines the Redis Docker image name
	// +optional
	Image string `json:"image,omitempty"`
	// Version defines the Redis Docker image version.
	// +optional
	Version string `json:"version,omitempty"`
	// Flag when True generates RedisReplica CustomResource to be handled by Redis Operator
	// If False, a StatefulSet with 1 replica is created
	// +optional
	Operator bool `json:"operator,omitempty"`
	// Hostname or IP of existing Redis instance
	RedisHost string `json:"redisHost,omitempty"`
	// Port of existing Redis instance
	RedisPort string `json:"redisPort,omitempty"`
	// If the existing Redis instance uses password or not, as MemoryStore doesn't support password yet
	RedisPassword bool `json:"redisPassword,omitempty"`
	// Resources is the resource requests and limits for the pods.
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// VolumeClaimTemplate allows a user to specify volume claim for MySQL Server files
	// +optional
	VolumeClaimTemplate *corev1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"`
	// AdditionalArgs for redis-server
	// +optional
	AdditionalArgs string `json:"additionalargs,omitempty"`
}

RedisSpec defines the attributes and desired state of Redis component

func (*RedisSpec) DeepCopy

func (in *RedisSpec) DeepCopy() *RedisSpec

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

func (*RedisSpec) DeepCopyInto

func (in *RedisSpec) DeepCopyInto(out *RedisSpec)

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

type ResourceLimits

type ResourceLimits struct {
	// Cpu is the CPU limit for a pod.
	// +optional
	CPU string `json:"cpu,omitempty"`
	// Memory is the RAM limit for a pod.
	// +optional
	Memory string `json:"memory,omitempty"`
}

ResourceLimits is used to describe the resources limits for a Redis pod. When limits are exceeded, the Pod will be terminated.

func (*ResourceLimits) DeepCopy

func (in *ResourceLimits) DeepCopy() *ResourceLimits

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

func (*ResourceLimits) DeepCopyInto

func (in *ResourceLimits) DeepCopyInto(out *ResourceLimits)

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

type ResourceRequests

type ResourceRequests struct {
	// Cpu is the amount of CPU requested for a pod.
	// +optional
	CPU string `json:"cpu,omitempty"`
	// Memory is the amount of RAM requested for a Pod.
	// +optional
	Memory string `json:"memory,omitempty"`
	// Disk is the amount of Disk requested for a pod.
	// +optional
	Disk string `json:"disk,omitempty"`
	// DiskStorageClass is the storage class for Disk.
	// Disk must be present or this field is invalid.
	// +optional
	DiskStorageClass string `json:"diskStorageClass,omitempty"`
}

ResourceRequests is used to describe the resource requests for a Redis pod.

func (*ResourceRequests) DeepCopy

func (in *ResourceRequests) DeepCopy() *ResourceRequests

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

func (*ResourceRequests) DeepCopyInto

func (in *ResourceRequests) DeepCopyInto(out *ResourceRequests)

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

type Resources

type Resources struct {
	// The amount of CPU, Memory, and Disk requested for pods.
	// +optional
	Requests ResourceRequests `json:"requests,omitempty"`
	// The limit of CPU and Memory that pods may use.
	// +optional
	Limits ResourceLimits `json:"limits,omitempty"`
}

Resources aggregates resource requests and limits. Note that requests, if specified, must be less than or equal to limits.

func (*Resources) DeepCopy

func (in *Resources) DeepCopy() *Resources

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

func (*Resources) DeepCopyInto

func (in *Resources) DeepCopyInto(out *Resources)

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

type SQLProxySpec

type SQLProxySpec struct {
	// Image defines the SQLProxy Docker image name
	// +optional
	Image string `json:"image,omitempty"`
	// Version defines the SQL Proxy docker image version.
	// +optional
	Version string `json:"version,omitempty"`
	// example: myProject:us-central1:myInstance=tcp:3306
	// Project defines the SQL instance project
	Project string `json:"project"`
	// Region defines the SQL instance region
	Region string `json:"region"`
	// Instance defines the SQL instance name
	Instance string `json:"instance"`
	// Type defines the SQL instance type
	Type string `json:"type"`
	// Resources is the resource requests and limits for the pods.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

SQLProxySpec defines the attributes to deploy SQL Proxy component

func (*SQLProxySpec) DeepCopy

func (in *SQLProxySpec) DeepCopy() *SQLProxySpec

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

func (*SQLProxySpec) DeepCopyInto

func (in *SQLProxySpec) DeepCopyInto(out *SQLProxySpec)

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

type SchedulerSpec

type SchedulerSpec struct {
	// Image defines the Airflow custom server Docker image.
	// +optional
	Image string `json:"image,omitempty"`
	// Version defines the Airflow Docker image version
	// +optional
	Version string `json:"version,omitempty"`
	// DBName defines the Airflow Database to be used
	// +optional
	DBName string `json:"database,omitempty"`
	// DBUser defines the Airflow Database user to be used
	// +optional
	DBUser string `json:"dbuser,omitempty"`
	// Resources is the resource requests and limits for the pods.
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

SchedulerSpec defines the attributes and desired state of Airflow Scheduler

func (*SchedulerSpec) DeepCopy

func (in *SchedulerSpec) DeepCopy() *SchedulerSpec

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

func (*SchedulerSpec) DeepCopyInto

func (in *SchedulerSpec) DeepCopyInto(out *SchedulerSpec)

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

type SchedulerStatus

type SchedulerStatus struct {
	// DagCount is a count of number of Dags observed
	DagCount int32 `json:"dagcount,omitempty"`
	// RunCount is a count of number of Dag Runs observed
	RunCount int32 `json:"runcount,omitempty"`
}

SchedulerStatus defines the observed state of Airflow Scheduler

func (*SchedulerStatus) DeepCopy

func (in *SchedulerStatus) DeepCopy() *SchedulerStatus

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

func (*SchedulerStatus) DeepCopyInto

func (in *SchedulerStatus) DeepCopyInto(out *SchedulerStatus)

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

type SecretEnv

type SecretEnv struct {
	Env    string
	Secret string
	Field  string
}

SecretEnv secret env

func (*SecretEnv) DeepCopy

func (in *SecretEnv) DeepCopy() *SecretEnv

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

func (*SecretEnv) DeepCopyInto

func (in *SecretEnv) DeepCopyInto(out *SecretEnv)

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

type StorageSpec

type StorageSpec struct {
	// Provider is the storage type used for backup and restore
	// e.g. s3, oci-s3-compat, aws-s3, gce-s3, etc.
	StorageProvider string `json:"storageprovider"`
	// SecretRef is a reference to the Kubernetes secret containing the configuration for uploading
	// the backup to authenticated storage.
	SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
	// Config is generic string based key-value map that defines non-secret configuration values for
	// uploading the backup to storage w.r.t the configured storage provider.
	Config map[string]string `json:"config,omitempty"`
}

StorageSpec describes the s3 compatible storage

func (*StorageSpec) DeepCopy

func (in *StorageSpec) DeepCopy() *StorageSpec

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

func (*StorageSpec) DeepCopyInto

func (in *StorageSpec) DeepCopyInto(out *StorageSpec)

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

type WorkerSpec

type WorkerSpec struct {
	// Image defines the Airflow worker Docker image.
	// +optional
	Image string `json:"image,omitempty"`
	// Version defines the Airflow worker Docker image version
	// +optional
	Version string `json:"version,omitempty"`
	// Replicas is the count of number of workers
	Replicas int32 `json:"replicas,omitempty"`
	// Resources is the resource requests and limits for the pods.
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

WorkerSpec defines the attributes and desired state of Airflow workers

func (*WorkerSpec) DeepCopy

func (in *WorkerSpec) DeepCopy() *WorkerSpec

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

func (*WorkerSpec) DeepCopyInto

func (in *WorkerSpec) DeepCopyInto(out *WorkerSpec)

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