v1

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the job v1 API group +kubebuilder:object:generate=true +groupName=job.operator.kube-stager.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "job.operator.kube-stager.io", Version: "v1"}

	// 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 Backup

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

	Spec   BackupSpec   `json:"spec,omitempty"`
	Status BackupStatus `json:"status,omitempty"`
}

Backup is the Schema for the backups API

func (*Backup) DeepCopy

func (in *Backup) DeepCopy() *Backup

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

func (*Backup) DeepCopyInto

func (in *Backup) DeepCopyInto(out *Backup)

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

func (*Backup) DeepCopyObject

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

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

type BackupList

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

BackupList contains a list of Backup

func (*BackupList) DeepCopy

func (in *BackupList) DeepCopy() *BackupList

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

func (*BackupList) DeepCopyInto

func (in *BackupList) DeepCopyInto(out *BackupList)

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

func (*BackupList) DeepCopyObject

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

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

type BackupSpec

type BackupSpec struct {
	//+kubebuilder:validate:MinLength=1
	// Name of the site owning this job
	SiteName string `json:"siteName"`

	//+kubebuilder:default:=Manual
	// Type of the backup. Scheduled backups should happen daily if the backup is enabled for a site, Final backup should happen just before deleting the databases
	//+optional
	BackupType BackupType `json:"backupType"`
}

BackupSpec defines the desired state of Backup

func (*BackupSpec) DeepCopy

func (in *BackupSpec) DeepCopy() *BackupSpec

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

func (*BackupSpec) DeepCopyInto

func (in *BackupSpec) DeepCopyInto(out *BackupSpec)

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

type BackupStatus

type BackupStatus struct {
	BackupStatusDetail `json:",inline"`

	// Service level statuses
	Services map[string]BackupStatusDetail `json:"services,omitempty"`
}

BackupStatus defines the observed state of Backup

func (*BackupStatus) DeepCopy

func (in *BackupStatus) DeepCopy() *BackupStatus

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

func (*BackupStatus) DeepCopyInto

func (in *BackupStatus) DeepCopyInto(out *BackupStatus)

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

type BackupStatusDetail

type BackupStatusDetail struct {
	//+kubebuilder:default:=Pending
	// State of the job
	State JobState `json:"state"`

	// Time the backup job was started at
	//+optional
	JobStartedAt *metav1.Time `json:"jobStartedAt,omitempty"`

	// Time the backup job successfully completed at
	//+optional
	JobFinishedAt *metav1.Time `json:"jobFinishedAt,omitempty"`
}

func (*BackupStatusDetail) DeepCopy

func (in *BackupStatusDetail) DeepCopy() *BackupStatusDetail

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

func (*BackupStatusDetail) DeepCopyInto

func (in *BackupStatusDetail) DeepCopyInto(out *BackupStatusDetail)

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

type BackupType

type BackupType string

+kubebuilder:validation:Enum=Manual;Scheduled;Final

const (
	BackupTypeManual    BackupType = "Manual"
	BackupTypeScheduled BackupType = "Scheduled"
	BackupTypeFinal     BackupType = "Final"
)

type DbInitJob

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

	Spec   DbInitJobSpec   `json:"spec,omitempty"`
	Status DbInitJobStatus `json:"status,omitempty"`
}

DbInitJob is the Schema for the dbinitjobs API

func (*DbInitJob) DeepCopy

func (in *DbInitJob) DeepCopy() *DbInitJob

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

func (*DbInitJob) DeepCopyInto

func (in *DbInitJob) DeepCopyInto(out *DbInitJob)

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

func (*DbInitJob) DeepCopyObject

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

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

func (*DbInitJob) PopulateFomSite

func (r *DbInitJob) PopulateFomSite(
	site *sitev1.StagingSite,
	config *configv1.ServiceConfig,
	mysqlEnvironment string,
	mongoEnvironment string,
) error

type DbInitJobList

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

DbInitJobList contains a list of DbInitJob

func (*DbInitJobList) DeepCopy

func (in *DbInitJobList) DeepCopy() *DbInitJobList

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

func (*DbInitJobList) DeepCopyInto

func (in *DbInitJobList) DeepCopyInto(out *DbInitJobList)

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

func (*DbInitJobList) DeepCopyObject

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

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

type DbInitJobSpec

type DbInitJobSpec struct {
	//+kubebuilder:validate:MinLength=1
	// Name of the site owning this job
	SiteName string `json:"siteName"`

	//+kubebuilder:validate:MinLength=1
	// Name of the service.
	ServiceName string `json:"serviceName"`

	//+kubebuilder:validate:MinLength=0
	// Name of the mysql environment to initialise
	//+optional
	MysqlEnvironment string `json:"mysqlEnvironment"`

	//+kubebuilder:validate:MinLength=0
	// Name of the mongo environment to initialise
	//+optional
	MongoEnvironment string `json:"mongoEnvironment"`

	//+kubebuilder:validate:MinLength=1
	// Name of the staging site used to initialise the db
	DbInitSource string `json:"dbInitSource"`

	//+kubebuilder:validate:MinLength=1
	//+kubebuilder:validation:MaxLength=63
	// Name of the database to initialise
	DatabaseName string `json:"databaseName"`

	//+kubebuilder:validate:MinLength=1
	//+kubebuilder:validation:MaxLength=16
	// Name of the user used to connect to the databases
	Username string `json:"username"`

	//+kubebuilder:validate:MinLength=1
	//+kubebuilder:validation:MaxLength=32
	// Password for the user used to connect to the databases
	Password string `json:"password"`

	// The number of seconds to use as the completion deadline
	DeadlineSeconds int64 `json:"deadlineSeconds"`
}

DbInitJobSpec defines the desired state of DbInitJob

func (*DbInitJobSpec) DeepCopy

func (in *DbInitJobSpec) DeepCopy() *DbInitJobSpec

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

func (*DbInitJobSpec) DeepCopyInto

func (in *DbInitJobSpec) DeepCopyInto(out *DbInitJobSpec)

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

type DbInitJobStatus

type DbInitJobStatus struct {
	//+kubebuilder:default:=Pending
	// State of the job
	State JobState `json:"state"`

	//+kubebuilder:default:=0
	// Number of consecutive times the related batch job failed to load
	JobNotFoundCount uint32 `json:"jobNotFoundCount"`

	// The deadline for the job's completion, after which the job will be marked as failed if it didn't run to completion yet
	DeadlineTimestamp *metav1.Time `json:"deadlineTimestamp"`
}

DbInitJobStatus defines the observed state of DbInitJob

func (*DbInitJobStatus) DeepCopy

func (in *DbInitJobStatus) DeepCopy() *DbInitJobStatus

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

func (*DbInitJobStatus) DeepCopyInto

func (in *DbInitJobStatus) DeepCopyInto(out *DbInitJobStatus)

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

type DbMigrationJob

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

	Spec   DbMigrationJobSpec   `json:"spec,omitempty"`
	Status DbMigrationJobStatus `json:"status,omitempty"`
}

DbMigrationJob is the Schema for the dbmigrationjobs API

func (*DbMigrationJob) DeepCopy

func (in *DbMigrationJob) DeepCopy() *DbMigrationJob

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

func (*DbMigrationJob) DeepCopyInto

func (in *DbMigrationJob) DeepCopyInto(out *DbMigrationJob)

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

func (*DbMigrationJob) DeepCopyObject

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

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

func (*DbMigrationJob) Matches

func (r *DbMigrationJob) Matches(job *DbMigrationJob) bool

func (*DbMigrationJob) PopulateFomSite

func (r *DbMigrationJob) PopulateFomSite(site *sitev1.StagingSite, config *configv1.ServiceConfig) error

func (*DbMigrationJob) UpdateFrom

func (r *DbMigrationJob) UpdateFrom(job *DbMigrationJob)

type DbMigrationJobList

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

DbMigrationJobList contains a list of DbMigrationJob

func (*DbMigrationJobList) DeepCopy

func (in *DbMigrationJobList) DeepCopy() *DbMigrationJobList

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

func (*DbMigrationJobList) DeepCopyInto

func (in *DbMigrationJobList) DeepCopyInto(out *DbMigrationJobList)

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

func (*DbMigrationJobList) DeepCopyObject

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

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

type DbMigrationJobSpec

type DbMigrationJobSpec struct {
	//+kubebuilder:validate:MinLength=1
	// Name of the site owning this job
	SiteName string `json:"siteName"`

	//+kubebuilder:validate:MinLength=1
	// Name of the service.
	ServiceName string `json:"serviceName"`

	//+kubebuilder:validate:MinLength=1
	// The tag for the images to use
	ImageTag string `json:"imageTag"`

	// The number of seconds to use as the completion deadline
	DeadlineSeconds int64 `json:"deadlineSeconds"`
}

DbMigrationJobSpec defines the desired state of DbMigrationJob

func (*DbMigrationJobSpec) DeepCopy

func (in *DbMigrationJobSpec) DeepCopy() *DbMigrationJobSpec

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

func (*DbMigrationJobSpec) DeepCopyInto

func (in *DbMigrationJobSpec) DeepCopyInto(out *DbMigrationJobSpec)

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

type DbMigrationJobStatus

type DbMigrationJobStatus struct {
	//+kubebuilder:default:=Pending
	// State of the job
	State JobState `json:"state"`

	//+kubebuilder:default:=0
	// Number of consecutive times the related batch job failed to load
	JobNotFoundCount uint32 `json:"jobNotFoundCount"`

	// Name of the image that the last migration was executed
	LastMigratedImageTag string `json:"lastMigratedImageTag"`

	// The deadline for the job's completion, after which the job will be marked as failed if it didn't run to completion yet
	DeadlineTimestamp *metav1.Time `json:"deadlineTimestamp"`
}

DbMigrationJobStatus defines the observed state of DbMigrationJob

func (*DbMigrationJobStatus) DeepCopy

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

func (*DbMigrationJobStatus) DeepCopyInto

func (in *DbMigrationJobStatus) DeepCopyInto(out *DbMigrationJobStatus)

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

type JobState

type JobState string
const (
	Pending  JobState = "Pending"
	Running  JobState = "Running"
	Failed   JobState = "Failed"
	Complete JobState = "Complete"
)

func (JobState) IsFinal

func (r JobState) IsFinal() bool

Jump to

Keyboard shortcuts

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