v1alpha1

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the argoproj.skyscanner.net v1alpha1 API group +kubebuilder:object:generate=true +groupName=argoproj.skyscanner.net

Index

Constants

View Source
const (
	// CompletedCondition is the condition type used
	// to record the last progressive sync result.
	CompletedCondition string = "Completed"

	// StagesCompleteReason represent the fact that all
	// the progressive sync stages have been completed
	StagesCompleteReason string = "StagesCompleted"

	// StagesProgressingReason represent the fact that some
	// of the progressive sync stages are progressing
	StagesProgressingReason string = "StagesProgressing"

	// StagesFailedReason represent the fact that a
	// progressive sync stage has failed
	StagesFailedReason string = "StagesFailed"
)
View Source
const ProgressiveSyncFinalizer = "finalizers.argoproj.skyscanner.net"

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "argoproj.skyscanner.net", Version: "v1alpha1"}

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

type Clusters struct {
	// Selector is a label selector to get the clusters for the update
	//+kubebuilder:validation:Required
	Selector metav1.LabelSelector `json:"selector"`
}

Clusters defines a target of type clusters

func (*Clusters) DeepCopy

func (in *Clusters) DeepCopy() *Clusters

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

func (*Clusters) DeepCopyInto

func (in *Clusters) DeepCopyInto(out *Clusters)

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

type ProgressiveSync

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

	Spec   ProgressiveSyncSpec   `json:"spec,omitempty"`
	Status ProgressiveSyncStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status ProgressiveSync is the Schema for the progressivesyncs API

func (*ProgressiveSync) DeepCopy

func (in *ProgressiveSync) DeepCopy() *ProgressiveSync

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

func (*ProgressiveSync) DeepCopyInto

func (in *ProgressiveSync) DeepCopyInto(out *ProgressiveSync)

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

func (*ProgressiveSync) DeepCopyObject

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

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

func (*ProgressiveSync) GetStatusConditions

func (in *ProgressiveSync) GetStatusConditions() *[]metav1.Condition

GetStatusConditions returns a pointer to the Status.Conditions slice

func (*ProgressiveSync) NewStatusCondition

func (in *ProgressiveSync) NewStatusCondition(t string, s metav1.ConditionStatus, r string, m string) metav1.Condition

NewStatusCondition adds a new Condition

func (*ProgressiveSync) Owns

func (in *ProgressiveSync) Owns(owners []metav1.OwnerReference) bool

Owns returns true if the ProgressiveSync object has a reference to one of the owners

func (*ProgressiveSync) SetStageStatus

func (in *ProgressiveSync) SetStageStatus(newStatus StageStatus, updateTime *metav1.Time)

SetStageStatus sets the corresponding StageStatus in stageStatus to newStatus - If a stage doesn't exist, it will be added to StageStatus slice - If a stage already exists it will be updated

type ProgressiveSyncList

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

ProgressiveSyncList contains a list of ProgressiveSync

func (*ProgressiveSyncList) DeepCopy

func (in *ProgressiveSyncList) DeepCopy() *ProgressiveSyncList

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

func (*ProgressiveSyncList) DeepCopyInto

func (in *ProgressiveSyncList) DeepCopyInto(out *ProgressiveSyncList)

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

func (*ProgressiveSyncList) DeepCopyObject

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

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

type ProgressiveSyncSpec

type ProgressiveSyncSpec struct {

	// SourceRef defines the resource, example an ApplicationSet, which owns ArgoCD Applications
	//+kubebuilder:validation:Required
	SourceRef corev1.TypedLocalObjectReference `json:"sourceRef"`
	// Stages defines a list of Progressive Rollout stages
	//+kubebuilder:validation:Optional
	Stages []ProgressiveSyncStage `json:"stages,omitempty"`
}

ProgressiveSyncSpec defines the desired state of ProgressiveSync

func (*ProgressiveSyncSpec) DeepCopy

func (in *ProgressiveSyncSpec) DeepCopy() *ProgressiveSyncSpec

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

func (*ProgressiveSyncSpec) DeepCopyInto

func (in *ProgressiveSyncSpec) DeepCopyInto(out *ProgressiveSyncSpec)

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

type ProgressiveSyncStage

type ProgressiveSyncStage struct {
	// Name is a human friendly name for the stage
	//+kubebuilder:validation:Required
	Name string `json:"name"`
	// MaxParallel is how many selected targets to update in parallel
	//+kubebuilder:validation:Minimum:1
	MaxParallel intstr.IntOrString `json:"maxParallel"`
	// MaxTargets is the maximum number of selected targets to update
	//+kubebuilder:validation:Minimum:1
	MaxTargets intstr.IntOrString `json:"maxTargets"`
	// Targets is the targets to update in the stage
	//+kubebuilder:validation:Optional
	Targets ProgressiveSyncTargets `json:"targets,omitempty"`
}

ProgressiveSyncStage defines a rollout stage

func (*ProgressiveSyncStage) DeepCopy

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

func (*ProgressiveSyncStage) DeepCopyInto

func (in *ProgressiveSyncStage) DeepCopyInto(out *ProgressiveSyncStage)

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

type ProgressiveSyncStatus

type ProgressiveSyncStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	Stages     []StageStatus      `json:"stages,omitempty"`
}

ProgressiveSyncStatus defines the observed state of ProgressiveSync

func (*ProgressiveSyncStatus) DeepCopy

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

func (*ProgressiveSyncStatus) DeepCopyInto

func (in *ProgressiveSyncStatus) DeepCopyInto(out *ProgressiveSyncStatus)

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

type ProgressiveSyncTargets

type ProgressiveSyncTargets struct {
	// Clusters is the a cluster type of targets
	//+kubebuilder:validation:Optional
	Clusters Clusters `json:"clusters"`
}

ProgressiveSyncTargets defines the target of the Progressive Rollout

func (*ProgressiveSyncTargets) DeepCopy

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

func (*ProgressiveSyncTargets) DeepCopyInto

func (in *ProgressiveSyncTargets) DeepCopyInto(out *ProgressiveSyncTargets)

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

type StageStatus

type StageStatus struct {
	Name       string           `json:"name"`
	Phase      StageStatusPhase `json:"phase,omitempty"`
	Message    string           `json:"message,omitempty"`
	StartedAt  *metav1.Time     `json:"startedAt,omitempty"`
	FinishedAt *metav1.Time     `json:"finishedAt,omitempty"`
}

StageStatus defines the observed stage status

func FindStageStatus

func FindStageStatus(ss []StageStatus, statusName string) *StageStatus

FindStageStatus finds the given stage by name in stage status.

func NewStageStatus

func NewStageStatus(name, message string, phase StageStatusPhase) StageStatus

NewStageStatus adds a new StageStatus

func (*StageStatus) DeepCopy

func (in *StageStatus) DeepCopy() *StageStatus

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

func (*StageStatus) DeepCopyInto

func (in *StageStatus) DeepCopyInto(out *StageStatus)

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

type StageStatusPhase

type StageStatusPhase string

StageStatusPhase defines the observed stage phase +kubebuilder:validation:Enum={Progressing,Succeeded,Failed,Unknown}

const (
	PhaseProgressing StageStatusPhase = "Progressing"
	PhaseSucceeded   StageStatusPhase = "Succeeded"
	PhaseFailed      StageStatusPhase = "Failed"
	PhaseUnknown     StageStatusPhase = "Unknown"
)

Jump to

Keyboard shortcuts

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