v1alpha1

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the kargo v1alpha1 API group +kubebuilder:object:generate=true +groupName=kargo.akuity.io

Index

Constants

View Source
const (
	AnnotationKeyRefresh = "kargo.akuity.io/refresh"

	AnnotationKeyOIDCEmails   = "rbac.kargo.akuity.io/email"
	AnnotationKeyOIDCGroups   = "rbac.kargo.akuity.io/groups"
	AnnotationKeyOIDCSubjects = "rbac.kargo.akuity.io/sub"
)
View Source
const (
	AliasLabelKey   = "kargo.akuity.io/alias"
	FreightLabelKey = "kargo.akuity.io/freight"
	ProjectLabelKey = "kargo.akuity.io/project"
	ShardLabelKey   = "kargo.akuity.io/shard"
	StageLabelKey   = "kargo.akuity.io/stage"

	LabelTrueValue = "true"

	FinalizerName = "kargo.akuity.io/finalizer"
)

Variables

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

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

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

Functions

func ClearPromotionRefresh added in v0.3.0

func ClearPromotionRefresh(
	ctx context.Context,
	c client.Client,
	promo *Promotion,
) error

ClearPromotionRefresh is called by the Promotion controller to clear the refresh annotation on the Promotion (if present).

func ClearStageRefresh

func ClearStageRefresh(
	ctx context.Context,
	c client.Client,
	stage *Stage,
) error

ClearStageRefresh is called by the Stage controller to clear the refresh annotation on the Stage (if present). A client (e.g. UI) who requested a Stage refresh, can wait until the annotation is cleared, to understand that the controller successfully reconciled the Stage after the refresh request.

func ClearWarehouseRefresh added in v0.2.0

func ClearWarehouseRefresh(
	ctx context.Context,
	c client.Client,
	wh *Warehouse,
) error

ClearWarehouseRefresh is called by the Warehouse controller to clear the refresh annotation on the Warehouse (if present). A client (e.g. UI) who requested a Warehouse refresh, can wait until the annotation is cleared, to understand that the controller successfully reconciled the Warehouse after the refresh request.

func IsFreightAvailable added in v0.3.0

func IsFreightAvailable(
	freight *Freight,
	stage string,
	upstreamStages []string,
) bool

IsFreightAvailable answers whether the specified Freight is available to the specified Stage having the specified upstream stages. Freight is available if:

  1. No upstreamStages are specified OR
  2. The Freight has has been verified in ANY of the specified upstream stages OR
  3. The Freight is approved for the specified stage

Note: The rationale for returning true when no upstream stages are specified is that some Stages have no upstream Stages (e.g. a Stage that subscribes to a Warehouse), so ANY Freight is available to such a Stage.

Types

type AnalysisRunArgument added in v0.3.0

type AnalysisRunArgument struct {
	// Name is the name of the argument.
	//
	//+kubebuilder:validation:Required
	Name string `json:"name"`
	// Value is the value of the argument.
	//
	//+kubebuilder:validation:Required
	Value string `json:"value,omitempty"`
}

AnalysisRunArgument represents an argument to be added to an AnalysisRun.

func (*AnalysisRunArgument) DeepCopy added in v0.3.0

func (in *AnalysisRunArgument) DeepCopy() *AnalysisRunArgument

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

func (*AnalysisRunArgument) DeepCopyInto added in v0.3.0

func (in *AnalysisRunArgument) DeepCopyInto(out *AnalysisRunArgument)

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

type AnalysisRunMetadata added in v0.3.0

type AnalysisRunMetadata struct {
	// Additional labels to apply to an AnalysisRun.
	Labels map[string]string `json:"labels,omitempty"`
	// Additional annotations to apply to an AnalysisRun.
	Annotations map[string]string `json:"annotations,omitempty"`
}

AnalysisRunMetadata contains optional metadata that should be applied to all AnalysisRuns.

func (*AnalysisRunMetadata) DeepCopy added in v0.3.0

func (in *AnalysisRunMetadata) DeepCopy() *AnalysisRunMetadata

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

func (*AnalysisRunMetadata) DeepCopyInto added in v0.3.0

func (in *AnalysisRunMetadata) DeepCopyInto(out *AnalysisRunMetadata)

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

type AnalysisRunReference added in v0.3.0

type AnalysisRunReference struct {
	// Namespace is the namespace of the AnalysisRun.
	Namespace string `json:"namespace"`
	// Name is the name of the AnalysisRun.
	Name string `json:"name"`
	// Phase is the last observed phase of the AnalysisRun referenced by Name.
	Phase string `json:"phase"`
}

AnalysisRunReference is a reference to an AnalysisRun.

func (*AnalysisRunReference) DeepCopy added in v0.3.0

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

func (*AnalysisRunReference) DeepCopyInto added in v0.3.0

func (in *AnalysisRunReference) DeepCopyInto(out *AnalysisRunReference)

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

type AnalysisTemplateReference added in v0.3.0

type AnalysisTemplateReference struct {
	// Name is the name of the AnalysisTemplate in the same project/namespace as
	// the Stage.
	//
	//+kubebuilder:validation:Required
	Name string `json:"name"`
}

AnalysisTemplateReference is a reference to an AnalysisTemplate.

func (*AnalysisTemplateReference) DeepCopy added in v0.3.0

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

func (*AnalysisTemplateReference) DeepCopyInto added in v0.3.0

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

type ApprovedStage added in v0.3.0

type ApprovedStage struct{}

ApprovedStage describes a Stage for which Freight has been (manually) approved.

func (*ApprovedStage) DeepCopy added in v0.3.0

func (in *ApprovedStage) DeepCopy() *ApprovedStage

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

func (*ApprovedStage) DeepCopyInto added in v0.3.0

func (in *ApprovedStage) DeepCopyInto(out *ApprovedStage)

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

type ArgoCDAppHealthState

type ArgoCDAppHealthState string
const (
	ArgoCDAppHealthStateUnknown     ArgoCDAppHealthState = "Unknown"
	ArgoCDAppHealthStateProgressing ArgoCDAppHealthState = "Progressing"
	ArgoCDAppHealthStateHealthy     ArgoCDAppHealthState = "Healthy"
	ArgoCDAppHealthStateSuspended   ArgoCDAppHealthState = "Suspended"
	ArgoCDAppHealthStateDegraded    ArgoCDAppHealthState = "Degraded"
	ArgoCDAppHealthStateMissing     ArgoCDAppHealthState = "Missing"
)

type ArgoCDAppHealthStatus

type ArgoCDAppHealthStatus struct {
	Status  ArgoCDAppHealthState `json:"status"`
	Message string               `json:"message,omitempty"`
}

ArgoCDAppHealthStatus describes the health of an ArgoCD Application.

func (*ArgoCDAppHealthStatus) DeepCopy

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

func (*ArgoCDAppHealthStatus) DeepCopyInto

func (in *ArgoCDAppHealthStatus) DeepCopyInto(out *ArgoCDAppHealthStatus)

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

type ArgoCDAppStatus

type ArgoCDAppStatus struct {
	// Namespace is the namespace of the ArgoCD Application.
	Namespace string `json:"namespace"`
	// Name is the name of the ArgoCD Application.
	Name string `json:"name"`
	// HealthStatus is the health of the ArgoCD Application.
	HealthStatus ArgoCDAppHealthStatus `json:"healthStatus,omitempty"`
	// SyncStatus is the sync status of the ArgoCD Application.
	SyncStatus ArgoCDAppSyncStatus `json:"syncStatus,omitempty"`
}

ArgoCDAppStatus describes the current state of a single ArgoCD Application.

func (*ArgoCDAppStatus) DeepCopy

func (in *ArgoCDAppStatus) DeepCopy() *ArgoCDAppStatus

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

func (*ArgoCDAppStatus) DeepCopyInto

func (in *ArgoCDAppStatus) DeepCopyInto(out *ArgoCDAppStatus)

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

type ArgoCDAppSyncState

type ArgoCDAppSyncState string
const (
	ArgoCDAppSyncStateUnknown   ArgoCDAppSyncState = "Unknown"
	ArgoCDAppSyncStateSynced    ArgoCDAppSyncState = "Synced"
	ArgoCDAppSyncStateOutOfSync ArgoCDAppSyncState = "OutOfSync"
)

type ArgoCDAppSyncStatus

type ArgoCDAppSyncStatus struct {
	Status    ArgoCDAppSyncState `json:"status"`
	Revision  string             `json:"revision,omitempty"`
	Revisions []string           `json:"revisions,omitempty"`
}

ArgoCDAppSyncStatus describes the sync status of an ArgoCD Application.

func (*ArgoCDAppSyncStatus) DeepCopy

func (in *ArgoCDAppSyncStatus) DeepCopy() *ArgoCDAppSyncStatus

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

func (*ArgoCDAppSyncStatus) DeepCopyInto

func (in *ArgoCDAppSyncStatus) DeepCopyInto(out *ArgoCDAppSyncStatus)

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

type ArgoCDAppUpdate

type ArgoCDAppUpdate struct {
	// AppName specifies the name of an Argo CD Application resource to be
	// updated.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
	AppName string `json:"appName"`
	// AppNamespace specifies the namespace of an Argo CD Application resource to
	// be updated. If left unspecified, the namespace of this Application resource
	// will use the value of ARGOCD_NAMESPACE or "argocd"
	//
	//+kubebuilder:validation:Optional
	//+kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
	AppNamespace string `json:"appNamespace,omitempty"`
	// SourceUpdates describes updates to be applied to various sources of the
	// specified Argo CD Application resource.
	SourceUpdates []ArgoCDSourceUpdate `json:"sourceUpdates,omitempty"`
}

ArgoCDAppUpdate describes updates that should be applied to an Argo CD Application resources to incorporate Freight into a Stage.

func (*ArgoCDAppUpdate) AppNamespaceOrDefault

func (a *ArgoCDAppUpdate) AppNamespaceOrDefault() string

func (*ArgoCDAppUpdate) DeepCopy

func (in *ArgoCDAppUpdate) DeepCopy() *ArgoCDAppUpdate

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

func (*ArgoCDAppUpdate) DeepCopyInto

func (in *ArgoCDAppUpdate) DeepCopyInto(out *ArgoCDAppUpdate)

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

type ArgoCDHelm

type ArgoCDHelm struct {
	// Images describes how specific image versions can be incorporated into an
	// Argo CD Application's Helm parameters.
	//
	//+kubebuilder:validation:MinItems=1
	Images []ArgoCDHelmImageUpdate `json:"images"`
}

ArgoCDHelm describes updates to an Argo CD Application source's Helm-specific attributes to incorporate newly observed Freight into a Stage.

func (*ArgoCDHelm) DeepCopy

func (in *ArgoCDHelm) DeepCopy() *ArgoCDHelm

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

func (*ArgoCDHelm) DeepCopyInto

func (in *ArgoCDHelm) DeepCopyInto(out *ArgoCDHelm)

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

type ArgoCDHelmImageUpdate

type ArgoCDHelmImageUpdate struct {
	// Image specifies a container image (without tag). This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	Image string `json:"image"`
	// Key specifies a key within an Argo CD Application's Helm parameters that is
	// to be updated. This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	Key string `json:"key"`
	// Value specifies the new value for the specified key in the Argo CD
	// Application's Helm parameters. Valid values are:
	//
	// - ImageAndTag: Replaces the value of the specified key with
	//   <image name>:<tag>
	// - Tag: Replaces the value of the specified key with just the new tag
	// - ImageAndDigest: Replaces the value of the specified key with
	//   <image name>@<digest>
	// - Digest: Replaces the value of the specified key with just the new digest.
	//
	// This is a required field.
	Value ImageUpdateValueType `json:"value"`
}

ArgoCDHelmImageUpdate describes how a specific image version can be incorporated into an Argo CD Application's Helm parameters.

func (*ArgoCDHelmImageUpdate) DeepCopy

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

func (*ArgoCDHelmImageUpdate) DeepCopyInto

func (in *ArgoCDHelmImageUpdate) DeepCopyInto(out *ArgoCDHelmImageUpdate)

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

type ArgoCDKustomize

type ArgoCDKustomize struct {
	// Images describes how specific image versions can be incorporated into an
	// Argo CD Application's Kustomize parameters.
	//
	//+kubebuilder:validation:MinItems=1
	Images []ArgoCDKustomizeImageUpdate `json:"images"`
}

ArgoCDKustomize describes updates to an Argo CD Application source's Kustomize-specific attributes to incorporate newly observed Freight into a Stage.

func (*ArgoCDKustomize) DeepCopy

func (in *ArgoCDKustomize) DeepCopy() *ArgoCDKustomize

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

func (*ArgoCDKustomize) DeepCopyInto

func (in *ArgoCDKustomize) DeepCopyInto(out *ArgoCDKustomize)

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

type ArgoCDKustomizeImageUpdate added in v0.3.0

type ArgoCDKustomizeImageUpdate struct {
	// Image specifies a container image (without tag). This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	Image string `json:"image"`
	// UseDigest specifies whether the image's digest should be used instead of
	// its tag.
	//
	//+kubebuilder:validation:Optional
	UseDigest bool `json:"useDigest"`
}

ArgoCDKustomizeImageUpdate describes how a specific image version can be incorporated into an Argo CD Application's Kustomize parameters.

func (*ArgoCDKustomizeImageUpdate) DeepCopy added in v0.3.0

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

func (*ArgoCDKustomizeImageUpdate) DeepCopyInto added in v0.3.0

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

type ArgoCDSourceUpdate

type ArgoCDSourceUpdate struct {
	// RepoURL along with the Chart field identifies which of an Argo CD
	// Application's sources this update is intended for. Note: As of Argo CD 2.6,
	// Applications can use multiple sources. When the source to be updated
	// references a Helm chart repository, the values of the RepoURL and Chart
	// fields should exactly match the values of the fields of the same names in
	// the source. i.e. Do not match the values of these two fields to your
	// Warehouse; match them to the Application source you wish to update. This is
	// a required field.
	//
	//+kubebuilder:validation:MinLength=1
	RepoURL string `json:"repoURL"`
	// Chart along with the RepoURL field identifies which of an Argo CD
	// Application's sources this update is intended for. Note: As of Argo CD 2.6,
	// Applications can use multiple sources. When the source to be updated
	// references a Helm chart repository, the values of the RepoURL and Chart
	// fields should exactly match the values of the fields of the same names in
	// the source. i.e. Do not match the values of these two fields to your
	// Warehouse; match them to the Application source you wish to update.
	//
	//+kubebuilder:validation:Optional
	Chart string `json:"chart,omitempty"`
	// UpdateTargetRevision is a bool indicating whether the source should be
	// updated such that its TargetRevision field points at the most recently git
	// commit (if RepoURL references a git repository) or chart version (if
	// RepoURL references a chart repository).
	UpdateTargetRevision bool `json:"updateTargetRevision,omitempty"`
	// Kustomize describes updates to the source's Kustomize-specific attributes.
	Kustomize *ArgoCDKustomize `json:"kustomize,omitempty"`
	// Helm describes updates to the source's Helm-specific attributes.
	Helm *ArgoCDHelm `json:"helm,omitempty"`
}

ArgoCDSourceUpdate describes updates that should be applied to one of an Argo CD Application resource's sources.

func (*ArgoCDSourceUpdate) DeepCopy

func (in *ArgoCDSourceUpdate) DeepCopy() *ArgoCDSourceUpdate

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

func (*ArgoCDSourceUpdate) DeepCopyInto

func (in *ArgoCDSourceUpdate) DeepCopyInto(out *ArgoCDSourceUpdate)

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

type Chart

type Chart struct {
	// RepoURL specifies the URL of a Helm chart repository. Classic chart
	// repositories (using HTTP/S) can contain differently named charts. When this
	// field points to such a repository, the Name field will specify the name of
	// the chart within the repository. In the case of a repository within an OCI
	// registry, the URL implicitly points to a specific chart and the Name field
	// will be empty.
	RepoURL string `json:"repoURL,omitempty"`
	// Name specifies the name of the chart.
	Name string `json:"name,omitempty"`
	// Version specifies a particular version of the chart.
	Version string `json:"version,omitempty"`
}

Chart describes a specific version of a Helm chart.

func (*Chart) DeepCopy

func (in *Chart) DeepCopy() *Chart

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

func (*Chart) DeepCopyInto

func (in *Chart) DeepCopyInto(out *Chart)

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

type ChartSubscription

type ChartSubscription struct {
	// RepoURL specifies the URL of a Helm chart repository. It may be a classic
	// chart repository (using HTTP/S) OR a repository within an OCI registry.
	// Classic chart repositories can contain differently named charts. When this
	// field points to such a repository, the Name field MUST also be used
	// to specify the name of the desired chart within that repository. In the
	// case of a repository within an OCI registry, the URL implicitly points to
	// a specific chart and the Name field MUST NOT be used. The RepoURL field is
	// required.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=`^(((https?)|(oci))://)([\w\d\.\-]+)(:[\d]+)?(/.*)*$`
	RepoURL string `json:"repoURL"`
	// Name specifies the name of a Helm chart to subscribe to within a classic
	// chart repository specified by the RepoURL field. This field is required
	// when the RepoURL field points to a classic chart repository and MUST
	// otherwise be empty.
	Name string `json:"name,omitempty"`
	// SemverConstraint specifies constraints on what new chart versions are
	// permissible. This field is optional. When left unspecified, there will be
	// no constraints, which means the latest version of the chart will always be
	// used. Care should be taken with leaving this field unspecified, as it can
	// lead to the unanticipated rollout of breaking changes.
	// More info: https://github.com/masterminds/semver#checking-version-constraints
	//
	//+kubebuilder:validation:Optional
	SemverConstraint string `json:"semverConstraint,omitempty"`
}

ChartSubscription defines a subscription to a Helm chart repository.

func (*ChartSubscription) DeepCopy

func (in *ChartSubscription) DeepCopy() *ChartSubscription

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

func (*ChartSubscription) DeepCopyInto

func (in *ChartSubscription) DeepCopyInto(out *ChartSubscription)

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

type CommitSelectionStrategy added in v0.4.0

type CommitSelectionStrategy string

+kubebuilder:validation:Enum={Lexical,NewestFromBranch,NewestTag,SemVer}

const (
	CommitSelectionStrategyLexical          CommitSelectionStrategy = "Lexical"
	CommitSelectionStrategyNewestFromBranch CommitSelectionStrategy = "NewestFromBranch"
	CommitSelectionStrategyNewestTag        CommitSelectionStrategy = "NewestTag"
	CommitSelectionStrategySemVer           CommitSelectionStrategy = "SemVer"
)

type Freight

type Freight struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// ID is a system-assigned value that is derived deterministically from the
	// contents of the Freight. i.e. Two pieces of Freight can be compared for
	// equality by comparing their IDs.
	ID string `json:"id,omitempty"`
	// Commits describes specific Git repository commits.
	Commits []GitCommit `json:"commits,omitempty"`
	// Images describes specific versions of specific container images.
	Images []Image `json:"images,omitempty"`
	// Charts describes specific versions of specific Helm charts.
	Charts []Chart `json:"charts,omitempty"`
	// Status describes the current status of this Freight.
	Status FreightStatus `json:"status,omitempty"`
}

Freight represents a collection of versioned artifacts.

func GetFreight added in v0.2.0

func GetFreight(
	ctx context.Context,
	c client.Client,
	namespacedName types.NamespacedName,
) (*Freight, error)

GetFreight returns a pointer to the Freight resource specified by the namespacedName argument. If no such resource is found, nil is returned instead.

func (*Freight) DeepCopy

func (in *Freight) DeepCopy() *Freight

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

func (*Freight) DeepCopyInto

func (in *Freight) DeepCopyInto(out *Freight)

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

func (*Freight) DeepCopyObject added in v0.2.0

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

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

func (*Freight) GetStatus added in v0.2.0

func (f *Freight) GetStatus() *FreightStatus

func (*Freight) UpdateID added in v0.2.0

func (f *Freight) UpdateID()

UpdateID deterministically calculates a piece of Freight's ID based on its contents and assigns it to the ID field.

type FreightList added in v0.2.0

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

FreightList is a list of Freight resources.

func (*FreightList) DeepCopy added in v0.2.0

func (in *FreightList) DeepCopy() *FreightList

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

func (*FreightList) DeepCopyInto added in v0.2.0

func (in *FreightList) DeepCopyInto(out *FreightList)

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

func (*FreightList) DeepCopyObject added in v0.2.0

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

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

type FreightReference added in v0.4.0

type FreightReference struct {
	// ID is system-assigned value that is derived deterministically from the
	// contents of the Freight. i.e. Two pieces of Freight can be compared for
	// equality by comparing their IDs.
	ID string `json:"id,omitempty"`
	// Commits describes specific Git repository commits.
	Commits []GitCommit `json:"commits,omitempty"`
	// Images describes specific versions of specific container images.
	Images []Image `json:"images,omitempty"`
	// Charts describes specific versions of specific Helm charts.
	Charts []Chart `json:"charts,omitempty"`
	// VerificationInfo is information about any verification process that was
	// associated with this Freight for this Stage.
	VerificationInfo *VerificationInfo `json:"verificationInfo,omitempty"`
}

FreightReference is a simplified representation of a piece of Freight -- not a root resource type.

func (*FreightReference) DeepCopy added in v0.4.0

func (in *FreightReference) DeepCopy() *FreightReference

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

func (*FreightReference) DeepCopyInto added in v0.4.0

func (in *FreightReference) DeepCopyInto(out *FreightReference)

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

type FreightReferenceStack added in v0.4.0

type FreightReferenceStack []FreightReference

func (FreightReferenceStack) DeepCopy added in v0.4.0

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

func (FreightReferenceStack) DeepCopyInto added in v0.4.0

func (in FreightReferenceStack) DeepCopyInto(out *FreightReferenceStack)

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

func (FreightReferenceStack) Empty added in v0.4.0

func (f FreightReferenceStack) Empty() bool

Empty returns a bool indicating whether or not the FreightReferenceStack is empty. nil counts as empty.

func (*FreightReferenceStack) Pop added in v0.4.0

Pop removes and returns the leading element from a FreightReferenceStack. If the FreightReferenceStack is empty, the FreightReferenceStack is not modified and a empty FreightReference is returned instead. A boolean is also returned indicating whether the returned FreightReference came from the top of the stack (true) or is a zero value for that type (false).

func (*FreightReferenceStack) Push added in v0.4.0

func (f *FreightReferenceStack) Push(freight ...FreightReference)

Push pushes one or more Freight onto the FreightStack. The order of the new elements at the top of the stack will be equal to the order in which they were passed to this function. i.e. The first new element passed will be the element at the top of the stack. If resulting modification grow the depth of the stack beyond 10 elements, the stack is truncated at the bottom. i.e. Modified to contain only the top 10 elements.

func (FreightReferenceStack) Top added in v0.4.0

Top returns the leading element from a FreightReferenceStack without modifying the FreightReferenceStack. If the FreightReferenceStack is empty, an empty FreightReference is returned instead. A boolean is also returned indicating whether the returned FreightReference came from the top of the stack (true) or is a zero value for that type (false).

type FreightStatus added in v0.2.0

type FreightStatus struct {
	// VerifiedIn describes the Stages in which this Freight has been verified
	// through promotion and subsequent health checks.
	VerifiedIn map[string]VerifiedStage `json:"verifiedIn,omitempty"`
	// ApprovedFor describes the Stages for which this Freight has been approved
	// preemptively/manually by a user. This is useful for hotfixes, where one
	// might wish to promote a piece of Freight to a given Stage without
	// transiting the entire pipeline.
	ApprovedFor map[string]ApprovedStage `json:"approvedFor,omitempty"`
}

FreightStatus describes a piece of Freight's most recently observed state.

func (*FreightStatus) DeepCopy added in v0.2.0

func (in *FreightStatus) DeepCopy() *FreightStatus

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

func (*FreightStatus) DeepCopyInto added in v0.2.0

func (in *FreightStatus) DeepCopyInto(out *FreightStatus)

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

type GitCommit

type GitCommit struct {
	// RepoURL is the URL of a Git repository.
	RepoURL string `json:"repoURL,omitempty"`
	// ID is the ID of a specific commit in the Git repository specified by
	// RepoURL.
	ID string `json:"id,omitempty"`
	// Branch denotes the branch of the repository where this commit was found.
	Branch string `json:"branch,omitempty"`
	// Tag denotes a tag in the repository that matched selection criteria and
	// resolved to this commit.
	Tag string `json:"tag,omitempty"`
	// HealthCheckCommit is the ID of a specific commit. When specified,
	// assessments of Stage health will used this value (instead of ID) when
	// determining if applicable sources of Argo CD Application resources
	// associated with the Stage are or are not synced to this commit. Note that
	// there are cases (as in that of Kargo Render being utilized as a promotion
	// mechanism) wherein the value of this field may differ from the commit ID
	// found in the ID field.
	HealthCheckCommit string `json:"healthCheckCommit,omitempty"`
	// Message is the git commit message
	Message string `json:"message,omitempty"`
	// Author is the git commit author
	Author string `json:"author,omitempty"`
}

GitCommit describes a specific commit from a specific Git repository.

func (*GitCommit) DeepCopy

func (in *GitCommit) DeepCopy() *GitCommit

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

func (*GitCommit) DeepCopyInto

func (in *GitCommit) DeepCopyInto(out *GitCommit)

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

func (*GitCommit) Equals

func (g *GitCommit) Equals(rhs *GitCommit) bool

Equals returns a bool indicating whether two GitCommits are equivalent.

type GitHubPullRequest added in v0.3.0

type GitHubPullRequest struct {
}

func (*GitHubPullRequest) DeepCopy added in v0.3.0

func (in *GitHubPullRequest) DeepCopy() *GitHubPullRequest

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

func (*GitHubPullRequest) DeepCopyInto added in v0.3.0

func (in *GitHubPullRequest) DeepCopyInto(out *GitHubPullRequest)

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

type GitRepoUpdate

type GitRepoUpdate struct {
	// RepoURL is the URL of the repository to update. This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=`^https://(\w+([\.-]\w+)*@)?\w+([\.-]\w+)*(:[\d]+)?(/.*)?$`
	RepoURL string `json:"repoURL"`
	// InsecureSkipTLSVerify specifies whether certificate verification errors
	// should be ignored when connecting to the repository. This should be enabled
	// only with great caution.
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
	// ReadBranch specifies a particular branch of the repository from which to
	// locate contents that will be written to the branch specified by the
	// WriteBranch field. This field is optional. When not specified, the
	// ReadBranch is implicitly the repository's default branch AND in cases where
	// a Freight includes a GitCommit, that commit's ID will supersede the value
	// of this field. Therefore, in practice, this field is only used to clarify
	// what branch of a repository can be treated as a source of manifests or
	// other configuration when a Stage has no subscription to that repository.
	//
	//+kubebuilder:validation:Optional
	//+kubebuilder:validation:Pattern=`^(\w+([-/]\w+)*)?$`
	ReadBranch string `json:"readBranch,omitempty"`
	// WriteBranch specifies the particular branch of the repository to be
	// updated. This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=`^\w+([-/]\w+)*$`
	WriteBranch string `json:"writeBranch"`
	// PullRequest will generate a pull request instead of making the commit directly
	PullRequest *PullRequestPromotionMechanism `json:"pullRequest,omitempty"`
	// Render describes how to use Kargo Render to incorporate Freight into the
	// Stage. This is mutually exclusive with the Kustomize and Helm fields.
	Render *KargoRenderPromotionMechanism `json:"render,omitempty"`
	// Kustomize describes how to use Kustomize to incorporate Freight into the
	// Stage. This is mutually exclusive with the Render and Helm fields.
	Kustomize *KustomizePromotionMechanism `json:"kustomize,omitempty"`
	// Helm describes how to use Helm to incorporate Freight into the Stage. This
	// is mutually exclusive with the Render and Kustomize fields.
	Helm *HelmPromotionMechanism `json:"helm,omitempty"`
}

GitRepoUpdate describes updates that should be applied to a Git repository (using various configuration management tools) to incorporate Freight into a Stage.

func (*GitRepoUpdate) DeepCopy

func (in *GitRepoUpdate) DeepCopy() *GitRepoUpdate

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

func (*GitRepoUpdate) DeepCopyInto

func (in *GitRepoUpdate) DeepCopyInto(out *GitRepoUpdate)

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

type GitSubscription

type GitSubscription struct {
	// URL is the repository's URL. This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=`^https://(\w+([\.-]\w+)*@)?\w+([\.-]\w+)*(:[\d]+)?(/.*)?$`
	RepoURL string `json:"repoURL"`
	// CommitSelectionStrategy specifies the rules for how to identify the newest
	// commit of interest in the repository specified by the RepoURL field. This
	// field is optional. When left unspecified, the field is implicitly treated
	// as if its value were "NewestFromBranch".
	//
	// +kubebuilder:default=NewestFromBranch
	CommitSelectionStrategy CommitSelectionStrategy `json:"commitSelectionStrategy,omitempty"`
	// Branch references a particular branch of the repository. The value in this
	// field only has any effect when the CommitSelectionStrategy is
	// NewestFromBranch or left unspecified (which is implicitly the same as
	// NewestFromBranch). This field is optional. When left unspecified, (and the
	// CommitSelectionStrategy is NewestFromBranch or unspecified), the
	// subscription is implicitly to the repository's default branch.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=`^\w+([-/]\w+)*$`
	Branch string `json:"branch,omitempty"`
	// SemverConstraint specifies constraints on what new tagged commits are
	// considered in determining the newest commit of interest. The value in this
	// field only has any effect when the CommitSelectionStrategy is SemVer. This
	// field is optional. When left unspecified, there will be no constraints,
	// which means the latest semantically tagged commit will always be used. Care
	// should be taken with leaving this field unspecified, as it can lead to the
	// unanticipated rollout of breaking changes.
	//
	//+kubebuilder:validation:Optional
	SemverConstraint string `json:"semverConstraint,omitempty"`
	// AllowTags is a regular expression that can optionally be used to limit the
	// tags that are considered in determining the newest commit of interest. The
	// value in this field only has any effect when the CommitSelectionStrategy is
	// Lexical, NewestTag, or SemVer. This field is optional.
	//
	//+kubebuilder:validation:Optional
	AllowTags string `json:"allowTags,omitempty"`
	// IgnoreTags is a list of tags that must be ignored when determining the
	// newest commit of interest. No regular expressions or glob patterns are
	// supported yet. The value in this field only has any effect when the
	// CommitSelectionStrategy is Lexical, NewestTag, or SemVer. This field is
	// optional.
	//
	//+kubebuilder:validation:Optional
	IgnoreTags []string `json:"ignoreTags,omitempty"`
	// InsecureSkipTLSVerify specifies whether certificate verification errors
	// should be ignored when connecting to the repository. This should be enabled
	// only with great caution.
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
}

GitSubscription defines a subscription to a Git repository.

func (*GitSubscription) DeepCopy

func (in *GitSubscription) DeepCopy() *GitSubscription

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

func (*GitSubscription) DeepCopyInto

func (in *GitSubscription) DeepCopyInto(out *GitSubscription)

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

type Health

type Health struct {
	// Status describes the health of the Stage.
	Status HealthState `json:"status,omitempty"`
	// Issues clarifies why a Stage in any state other than Healthy is in that
	// state. This field will always be the empty when a Stage is Healthy.
	Issues []string `json:"issues,omitempty"`
	// ArgoCDApps describes the current state of any related ArgoCD Applications.
	ArgoCDApps []ArgoCDAppStatus `json:"argoCDApps,omitempty"`
}

Health describes the health of a Stage.

func (*Health) DeepCopy

func (in *Health) DeepCopy() *Health

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

func (*Health) DeepCopyInto

func (in *Health) DeepCopyInto(out *Health)

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

type HealthState

type HealthState string
const (
	HealthStateHealthy     HealthState = "Healthy"
	HealthStateUnhealthy   HealthState = "Unhealthy"
	HealthStateProgressing HealthState = "Progressing"
	HealthStateUnknown     HealthState = "Unknown"
)

func (HealthState) Merge

func (h HealthState) Merge(other HealthState) HealthState

Merge returns the more severe of two HealthStates.

type HelmChartDependencyUpdate

type HelmChartDependencyUpdate struct {
	// Repository along with Name identifies a subchart of the umbrella chart at
	// ChartPath whose version should be updated. The values of both fields should
	// exactly match the values of the fields of the same names in a dependency
	// expressed in the Chart.yaml of the umbrella chart at ChartPath. i.e. Do not
	// match the values of these two fields to your Warehouse; match them to the
	// Chart.yaml. This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=`^(((https?)|(oci))://)([\w\d\.\-]+)(:[\d]+)?(/.*)*$`
	Repository string `json:"repository"`
	// Name along with Repository identifies a subchart of the umbrella chart at
	// ChartPath whose version should be updated. The values of both fields should
	// exactly match the values of the fields of the same names in a dependency
	// expressed in the Chart.yaml of the umbrella chart at ChartPath. i.e. Do not
	// match the values of these two fields to your Warehouse; match them to the
	// Chart.yaml. This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// ChartPath is the path to an umbrella chart.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=^[\w-\.]+(/[\w-\.]+)*$
	ChartPath string `json:"chartPath"`
}

HelmChartDependencyUpdate describes how a specific Helm chart that is used as a subchart of an umbrella chart can be updated.

func (*HelmChartDependencyUpdate) DeepCopy

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

func (*HelmChartDependencyUpdate) DeepCopyInto

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

type HelmImageUpdate

type HelmImageUpdate struct {
	// Image specifies a container image (without tag). This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=`^(\w+([\.-]\w+)*(:[\d]+)?/)?(\w+([\.-]\w+)*)(/\w+([\.-]\w+)*)*$`
	Image string `json:"image"`
	// ValuesFilePath specifies a path to the Helm values file that is to be
	// updated. This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=^[\w-\.]+(/[\w-\.]+)*$
	ValuesFilePath string `json:"valuesFilePath"`
	// Key specifies a key within the Helm values file that is to be updated. This
	// is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	Key string `json:"key"`
	// Value specifies the new value for the specified key in the specified Helm
	// values file. Valid values are:
	//
	// - ImageAndTag: Replaces the value of the specified key with
	//   <image name>:<tag>
	// - Tag: Replaces the value of the specified key with just the new tag
	// - ImageAndDigest: Replaces the value of the specified key with
	//   <image name>@<digest>
	// - Digest: Replaces the value of the specified key with just the new digest.
	//
	// This is a required field.
	Value ImageUpdateValueType `json:"value"`
}

HelmImageUpdate describes how a specific image version can be incorporated into a specific Helm values file.

func (*HelmImageUpdate) DeepCopy

func (in *HelmImageUpdate) DeepCopy() *HelmImageUpdate

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

func (*HelmImageUpdate) DeepCopyInto

func (in *HelmImageUpdate) DeepCopyInto(out *HelmImageUpdate)

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

type HelmPromotionMechanism

type HelmPromotionMechanism struct {
	// Images describes how specific image versions can be incorporated into Helm
	// values files.
	Images []HelmImageUpdate `json:"images,omitempty"`
	// Charts describes how specific chart versions can be incorporated into an
	// umbrella chart.
	Charts []HelmChartDependencyUpdate `json:"charts,omitempty"`
}

HelmPromotionMechanism describes how to use Helm to incorporate Freight into a Stage.

func (*HelmPromotionMechanism) DeepCopy

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

func (*HelmPromotionMechanism) DeepCopyInto

func (in *HelmPromotionMechanism) DeepCopyInto(out *HelmPromotionMechanism)

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

type Image

type Image struct {
	// RepoURL describes the repository in which the image can be found.
	RepoURL string `json:"repoURL,omitempty"`
	// GitRepoURL specifies the URL of a Git repository that contains the source
	// code for the image repository referenced by the RepoURL field if Kargo was
	// able to infer it.
	GitRepoURL string `json:"gitRepoURL,omitempty"`
	// Tag identifies a specific version of the image in the repository specified
	// by RepoURL.
	Tag string `json:"tag,omitempty"`
	// Digest identifies a specific version of the image in the repository
	// specified by RepoURL. This is a more precise identifier than Tag.
	Digest string `json:"digest,omitempty"`
}

Image describes a specific version of a container image.

func (*Image) DeepCopy

func (in *Image) DeepCopy() *Image

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

func (*Image) DeepCopyInto

func (in *Image) DeepCopyInto(out *Image)

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

type ImageSelectionStrategy added in v0.4.0

type ImageSelectionStrategy string

+kubebuilder:validation:Enum={Digest,Lexical,NewestBuild,SemVer}

const (
	ImageSelectionStrategyDigest      ImageSelectionStrategy = "Digest"
	ImageSelectionStrategyLexical     ImageSelectionStrategy = "Lexical"
	ImageSelectionStrategyNewestBuild ImageSelectionStrategy = "NewestBuild"
	ImageSelectionStrategySemVer      ImageSelectionStrategy = "SemVer"
)

type ImageSubscription

type ImageSubscription struct {
	// RepoURL specifies the URL of the image repository to subscribe to. The
	// value in this field MUST NOT include an image tag. This field is required.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=`^(\w+([\.-]\w+)*(:[\d]+)?/)?(\w+([\.-]\w+)*)(/\w+([\.-]\w+)*)*$`
	RepoURL string `json:"repoURL"`
	// GitRepoURL optionally specifies the URL of a Git repository that contains
	// the source code for the image repository referenced by the RepoURL field.
	// When this is specified, Kargo MAY be able to infer and link to the exact
	// revision of that source code that was used to build the image.
	//
	//+kubebuilder:validation:Optional
	//+kubebuilder:validation:Pattern=`^https://(\w+([\.-]\w+)*@)?\w+([\.-]\w+)*(:[\d]+)?(/.*)?$`
	GitRepoURL string `json:"gitRepoURL,omitempty"`
	// ImageSelectionStrategy specifies the rules for how to identify the newest version
	// of the image specified by the RepoURL field. This field is optional. When
	// left unspecified, the field is implicitly treated as if its value were
	// "SemVer".
	//
	// +kubebuilder:default=SemVer
	ImageSelectionStrategy ImageSelectionStrategy `json:"imageSelectionStrategy,omitempty"`
	// SemverConstraint specifies constraints on what new image versions are
	// permissible. The value in this field only has any effect when the
	// ImageSelectionStrategy is SemVer or left unspecified (which is implicitly
	// the same as SemVer). This field is also optional. When left unspecified,
	// (and the ImageSelectionStrategy is SemVer or unspecified), there will be no
	// constraints, which means the latest semantically tagged version of an image
	// will always be used. Care should be taken with leaving this field
	// unspecified, as it can lead to the unanticipated rollout of breaking
	// changes. Refer to Image Updater documentation for more details.
	// More info: https://github.com/masterminds/semver#checking-version-constraints
	//
	//+kubebuilder:validation:Optional
	SemverConstraint string `json:"semverConstraint,omitempty"`
	// AllowTags is a regular expression that can optionally be used to limit the
	// image tags that are considered in determining the newest version of an
	// image. This field is optional.
	//
	//+kubebuilder:validation:Optional
	AllowTags string `json:"allowTags,omitempty"`
	// IgnoreTags is a list of tags that must be ignored when determining the
	// newest version of an image. No regular expressions or glob patterns are
	// supported yet. This field is optional.
	//
	//+kubebuilder:validation:Optional
	IgnoreTags []string `json:"ignoreTags,omitempty"`
	// Platform is a string of the form <os>/<arch> that limits the tags that can
	// be considered when searching for new versions of an image. This field is
	// optional. When left unspecified, it is implicitly equivalent to the
	// OS/architecture of the Kargo controller. Care should be taken to set this
	// value correctly in cases where the image referenced by this
	// ImageRepositorySubscription will run on a Kubernetes node with a different
	// OS/architecture than the Kargo controller. At present this is uncommon, but
	// not unheard of.
	//
	//+kubebuilder:validation:Optional
	Platform string `json:"platform,omitempty"`
}

ImageSubscription defines a subscription to an image repository.

func (*ImageSubscription) DeepCopy

func (in *ImageSubscription) DeepCopy() *ImageSubscription

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

func (*ImageSubscription) DeepCopyInto

func (in *ImageSubscription) DeepCopyInto(out *ImageSubscription)

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

type ImageUpdateValueType

type ImageUpdateValueType string

+kubebuilder:validation:Enum={ImageAndTag,Tag,ImageAndDigest,Digest}

const (
	ImageUpdateValueTypeImageAndTag    ImageUpdateValueType = "ImageAndTag"
	ImageUpdateValueTypeTag            ImageUpdateValueType = "Tag"
	ImageUpdateValueTypeImageAndDigest ImageUpdateValueType = "ImageAndDigest"
	ImageUpdateValueTypeDigest         ImageUpdateValueType = "Digest"
)

type KargoRenderImageUpdate added in v0.3.0

type KargoRenderImageUpdate struct {
	// Image specifies a container image (without tag). This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	Image string `json:"image"`
	// UseDigest specifies whether the image's digest should be used instead of
	// its tag.
	//
	//+kubebuilder:validation:Optional
	UseDigest bool `json:"useDigest"`
}

KargoRenderImageUpdate describes how an image can be incorporated into a Stage using Kargo Render.

func (*KargoRenderImageUpdate) DeepCopy added in v0.3.0

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

func (*KargoRenderImageUpdate) DeepCopyInto added in v0.3.0

func (in *KargoRenderImageUpdate) DeepCopyInto(out *KargoRenderImageUpdate)

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

type KargoRenderPromotionMechanism added in v0.2.0

type KargoRenderPromotionMechanism struct {
	// Images describes how images can be incorporated into a Stage using Kargo
	// Render. If this field is omitted, all images in the Freight being promoted
	// will be passed to Kargo Render in the form <image name>:<tag>. (e.g. Will
	// not use digests by default.)
	//
	//+kubebuilder:validation:Optional
	Images []KargoRenderImageUpdate `json:"images,omitempty"`
}

KargoRenderPromotionMechanism describes how to use Kargo Render to incorporate Freight into a Stage.

func (*KargoRenderPromotionMechanism) DeepCopy added in v0.2.0

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

func (*KargoRenderPromotionMechanism) DeepCopyInto added in v0.2.0

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

type KustomizeImageUpdate

type KustomizeImageUpdate struct {
	// Image specifies a container image (without tag). This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	Image string `json:"image"`
	// Path specifies a path in which the `kustomize edit set image` command
	// should be executed. This is a required field.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=^[\w-\.]+(/[\w-\.]+)*$
	Path string `json:"path"`
	// UseDigest specifies whether the image's digest should be used instead of
	// its tag.
	//
	//+kubebuilder:validation:Optional
	UseDigest bool `json:"useDigest"`
}

KustomizeImageUpdate describes how to run `kustomize edit set image` for a given image.

func (*KustomizeImageUpdate) DeepCopy

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

func (*KustomizeImageUpdate) DeepCopyInto

func (in *KustomizeImageUpdate) DeepCopyInto(out *KustomizeImageUpdate)

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

type KustomizePromotionMechanism

type KustomizePromotionMechanism struct {
	// Images describes images for which `kustomize edit set image` should be
	// executed and the paths in which those commands should be executed.
	//
	//+kubebuilder:validation:MinItems=1
	Images []KustomizeImageUpdate `json:"images"`
}

KustomizePromotionMechanism describes how to use Kustomize to incorporate Freight into a Stage.

func (*KustomizePromotionMechanism) DeepCopy

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

func (*KustomizePromotionMechanism) DeepCopyInto

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

type Project added in v0.4.0

type Project struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec describes a Project.
	Spec *ProjectSpec `json:"spec,omitempty"`
	// Status describes the Project's current status.
	Status ProjectStatus `json:"status,omitempty"`
}

Project is a resource type that reconciles to a specially labeled namespace and other TODO: TBD project-level resources.

func GetProject added in v0.4.0

func GetProject(
	ctx context.Context,
	c client.Client,
	name string,
) (*Project, error)

GetProject returns a pointer to the cluster-scoped Project resource specified by the name argument. If no such resource is found, nil is returned instead.

func (*Project) DeepCopy added in v0.4.0

func (in *Project) DeepCopy() *Project

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

func (*Project) DeepCopyInto added in v0.4.0

func (in *Project) DeepCopyInto(out *Project)

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

func (*Project) DeepCopyObject added in v0.4.0

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

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

func (*Project) GetStatus added in v0.4.0

func (p *Project) GetStatus() *ProjectStatus

type ProjectList added in v0.4.0

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

ProjectList is a list of Project resources.

func (*ProjectList) DeepCopy added in v0.4.0

func (in *ProjectList) DeepCopy() *ProjectList

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

func (*ProjectList) DeepCopyInto added in v0.4.0

func (in *ProjectList) DeepCopyInto(out *ProjectList)

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

func (*ProjectList) DeepCopyObject added in v0.4.0

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

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

type ProjectPhase added in v0.4.0

type ProjectPhase string
const (
	// ProjectPhaseInitializing denotes a Project that is not yet fully
	// initialized.
	ProjectPhaseInitializing ProjectPhase = "Initializing"
	// ProjectPhaseInitializationFailed denotes a Project while failed to
	// initialize properly.
	ProjectPhaseInitializationFailed ProjectPhase = "InitializationFailed"
	// ProjectPhaseReady denotes a Project that is fully initialized.
	ProjectPhaseReady ProjectPhase = "Ready"
)

func (*ProjectPhase) IsTerminal added in v0.4.0

func (p *ProjectPhase) IsTerminal() bool

IsTerminal returns true if the ProjectPhase is a terminal one.

type ProjectSpec added in v0.4.0

type ProjectSpec struct {
	// PromotionPolicies defines policies governing the promotion of Freight to
	// specific Stages within this Project.
	PromotionPolicies []PromotionPolicy `json:"promotionPolicies,omitempty"`
}

ProjectSpec describes a Project.

func (*ProjectSpec) DeepCopy added in v0.4.0

func (in *ProjectSpec) DeepCopy() *ProjectSpec

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

func (*ProjectSpec) DeepCopyInto added in v0.4.0

func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec)

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

type ProjectStatus added in v0.4.0

type ProjectStatus struct {
	// Phase describes the Project's current phase.
	Phase ProjectPhase `json:"phase,omitempty"`
	// Message is a display message about the Project, including any errors
	// preventing the Project from being reconciled. i.e. If the Phase field has a
	// value of CreationFailed, this field can be expected to explain why.
	Message string `json:"message,omitempty"`
}

ProjectStatus describes a Project's current status.

func (*ProjectStatus) DeepCopy added in v0.4.0

func (in *ProjectStatus) DeepCopy() *ProjectStatus

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

func (*ProjectStatus) DeepCopyInto added in v0.4.0

func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus)

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

type Promotion

type Promotion struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec describes the desired transition of a specific Stage into a specific
	// Freight.
	//
	//+kubebuilder:validation:Required
	Spec *PromotionSpec `json:"spec"`
	// Status describes the current state of the transition represented by this
	// Promotion.
	Status PromotionStatus `json:"status,omitempty"`
}

Promotion represents a request to transition a particular Stage into a particular Freight.

func GetPromotion added in v0.2.0

func GetPromotion(
	ctx context.Context,
	c client.Client,
	namespacedName types.NamespacedName,
) (*Promotion, error)

GetPromotion returns a pointer to the Promotion resource specified by the namespacedName argument. If no such resource is found, nil is returned instead.

func RefreshPromotion added in v0.3.0

func RefreshPromotion(
	ctx context.Context,
	c client.Client,
	namespacedName types.NamespacedName,
) (*Promotion, error)

RefreshPromotion forces reconciliation of a Promotion by setting an annotation on the Promotion, causing the controller to reconcile it. Currently, the annotation value is the timestamp of the request, but might in the future include additional metadata/context necessary for the request.

func (*Promotion) DeepCopy

func (in *Promotion) DeepCopy() *Promotion

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

func (*Promotion) DeepCopyInto

func (in *Promotion) DeepCopyInto(out *Promotion)

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

func (*Promotion) DeepCopyObject

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

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

func (*Promotion) GetStatus

func (p *Promotion) GetStatus() *PromotionStatus

type PromotionInfo

type PromotionInfo struct {
	// Name is the name of the Promotion
	Name string `json:"name"`
	// Freight is the freight being promoted
	Freight FreightReference `json:"freight"`
}

func (*PromotionInfo) DeepCopy

func (in *PromotionInfo) DeepCopy() *PromotionInfo

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

func (*PromotionInfo) DeepCopyInto

func (in *PromotionInfo) DeepCopyInto(out *PromotionInfo)

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

type PromotionList

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

PromotionList contains a list of Promotion

func (*PromotionList) DeepCopy

func (in *PromotionList) DeepCopy() *PromotionList

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

func (*PromotionList) DeepCopyInto

func (in *PromotionList) DeepCopyInto(out *PromotionList)

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

func (*PromotionList) DeepCopyObject

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

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

type PromotionMechanisms

type PromotionMechanisms struct {
	// GitRepoUpdates describes updates that should be applied to Git repositories
	// to incorporate Freight into the Stage. This field is optional, as such
	// actions are not required in all cases.
	GitRepoUpdates []GitRepoUpdate `json:"gitRepoUpdates,omitempty"`
	// ArgoCDAppUpdates describes updates that should be applied to Argo CD
	// Application resources to incorporate Freight into the Stage. This field is
	// optional, as such actions are not required in all cases. Note that all
	// updates specified by the GitRepoUpdates field, if any, are applied BEFORE
	// these.
	ArgoCDAppUpdates []ArgoCDAppUpdate `json:"argoCDAppUpdates,omitempty"`
}

PromotionMechanisms describes how to incorporate Freight into a Stage.

func (*PromotionMechanisms) DeepCopy

func (in *PromotionMechanisms) DeepCopy() *PromotionMechanisms

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

func (*PromotionMechanisms) DeepCopyInto

func (in *PromotionMechanisms) DeepCopyInto(out *PromotionMechanisms)

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

type PromotionPhase

type PromotionPhase string
const (
	// PromotionPhasePending denotes a Promotion that has not been executed yet.
	// i.e. It is currently waiting in a queue. Queues are stage-specific and
	// prioritized by Promotion creation time.
	PromotionPhasePending PromotionPhase = "Pending"
	// PromotionPhaseRunning denotes a Promotion that is actively being executed.
	//
	// TODO: "Active" is the operative word here. We are leaving room for the
	// possibility in the near future that an in-progress Promotion might be
	// paused/suspended pending some user action.
	PromotionPhaseRunning PromotionPhase = "Running"
	// PromotionPhaseSucceeded denotes a Promotion that has been successfully
	// executed.
	PromotionPhaseSucceeded PromotionPhase = "Succeeded"
	// PromotionPhaseFailed denotes a Promotion that has failed
	PromotionPhaseFailed PromotionPhase = "Failed"
	// PromotionPhaseErrored denotes a Promotion that has failed for technical
	// reasons. Further information about the failure can be found in the
	// Promotion's status.
	PromotionPhaseErrored PromotionPhase = "Errored"
)

func (*PromotionPhase) IsTerminal

func (p *PromotionPhase) IsTerminal() bool

IsTerminal returns true if the PromotionPhase is a terminal one.

type PromotionPolicy

type PromotionPolicy struct {
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
	Stage string `json:"stage"`
	// AutoPromotionEnabled indicates whether new Freight can automatically be
	// promoted into the Stage referenced by the Stage field. Note: There are may
	// be other conditions also required for an auto-promotion to occur. This
	// field defaults to false, but is commonly set to true for Stages that
	// subscribe to Warehouses instead of other, upstream Stages. This allows
	// users to define Stages that are automatically updated as soon as new
	// artifacts are detected.
	AutoPromotionEnabled bool `json:"autoPromotionEnabled,omitempty"`
}

PromotionPolicy defines policies governing the promotion of Freight to a specific Stage.

func (*PromotionPolicy) DeepCopy

func (in *PromotionPolicy) DeepCopy() *PromotionPolicy

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

func (*PromotionPolicy) DeepCopyInto

func (in *PromotionPolicy) DeepCopyInto(out *PromotionPolicy)

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

type PromotionSpec

type PromotionSpec struct {
	// Stage specifies the name of the Stage to which this Promotion
	// applies. The Stage referenced by this field MUST be in the same
	// namespace as the Promotion.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
	Stage string `json:"stage"`
	// Freight specifies the piece of Freight to be promoted into the Stage
	// referenced by the Stage field.
	//
	//+kubebuilder:validation:MinLength=1
	Freight string `json:"freight"`
}

PromotionSpec describes the desired transition of a specific Stage into a specific Freight.

func (*PromotionSpec) DeepCopy

func (in *PromotionSpec) DeepCopy() *PromotionSpec

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

func (*PromotionSpec) DeepCopyInto

func (in *PromotionSpec) DeepCopyInto(out *PromotionSpec)

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

type PromotionStatus

type PromotionStatus struct {
	// Phase describes where the Promotion currently is in its lifecycle.
	Phase PromotionPhase `json:"phase,omitempty"`
	// Message is a display message about the promotion, including any errors
	// preventing the Promotion controller from executing this Promotion.
	// i.e. If the Phase field has a value of Failed, this field can be expected
	// to explain why.
	Message string `json:"message,omitempty"`
	// Metadata holds arbitrary metadata set by promotion mechanisms
	// (e.g. for display purposes, or internal bookkeeping)
	Metadata map[string]string `json:"metadata,omitempty"`
}

PromotionStatus describes the current state of the transition represented by a Promotion.

func (*PromotionStatus) DeepCopy

func (in *PromotionStatus) DeepCopy() *PromotionStatus

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

func (*PromotionStatus) DeepCopyInto

func (in *PromotionStatus) DeepCopyInto(out *PromotionStatus)

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

func (*PromotionStatus) WithPhase added in v0.3.0

func (p *PromotionStatus) WithPhase(phase PromotionPhase) *PromotionStatus

WithPhase returns a copy of PromotionStatus with the given phase

type PullRequestPromotionMechanism added in v0.3.0

type PullRequestPromotionMechanism struct {
	// GitHub indicates git provider is GitHub
	GitHub *GitHubPullRequest `json:"github,omitempty"`
}

PullRequestPromotionMechanism describes how to generate a pull request against the write branch during promotion Attempts to infer the git provider from well-known git domains.

func (*PullRequestPromotionMechanism) DeepCopy added in v0.3.0

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

func (*PullRequestPromotionMechanism) DeepCopyInto added in v0.3.0

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

type RepoSubscription added in v0.2.0

type RepoSubscription struct {
	// Git describes a subscriptions to a Git repository.
	Git *GitSubscription `json:"git,omitempty"`
	// Image describes a subscription to container image repository.
	Image *ImageSubscription `json:"image,omitempty"`
	// Chart describes a subscription to a Helm chart repository.
	Chart *ChartSubscription `json:"chart,omitempty"`
}

RepoSubscription describes a subscription to ONE OF a Git repository, a container image repository, or a Helm chart repository.

func (*RepoSubscription) DeepCopy added in v0.2.0

func (in *RepoSubscription) DeepCopy() *RepoSubscription

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

func (*RepoSubscription) DeepCopyInto added in v0.2.0

func (in *RepoSubscription) DeepCopyInto(out *RepoSubscription)

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

type Stage

type Stage struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec describes sources of Freight used by the Stage and how to incorporate
	// Freight into the Stage.
	//
	//+kubebuilder:validation:Required
	Spec *StageSpec `json:"spec"`
	// Status describes the Stage's current and recent Freight, health, and more.
	Status StageStatus `json:"status,omitempty"`
}

Stage is the Kargo API's main type.

func GetStage

func GetStage(
	ctx context.Context,
	c client.Client,
	namespacedName types.NamespacedName,
) (*Stage, error)

GetStage returns a pointer to the Stage resource specified by the namespacedName argument. If no such resource is found, nil is returned instead.

func RefreshStage

func RefreshStage(
	ctx context.Context,
	c client.Client,
	namespacedName types.NamespacedName,
) (*Stage, error)

RefreshStage forces reconciliation of a Stage by setting an annotation on the Stage, causing the controller to reconcile it. Currently, the annotation value is the timestamp of the request, but might in the future include additional metadata/context necessary for the request.

func (*Stage) DeepCopy

func (in *Stage) DeepCopy() *Stage

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

func (*Stage) DeepCopyInto

func (in *Stage) DeepCopyInto(out *Stage)

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

func (*Stage) DeepCopyObject

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

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

func (*Stage) GetStatus

func (s *Stage) GetStatus() *StageStatus

type StageList

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

StageList is a list of Stage resources.

func (*StageList) DeepCopy

func (in *StageList) DeepCopy() *StageList

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

func (*StageList) DeepCopyInto

func (in *StageList) DeepCopyInto(out *StageList)

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

func (*StageList) DeepCopyObject

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

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

type StagePhase added in v0.3.0

type StagePhase string
const (
	// StagePhaseNotApplicable denotes a Stage that has no Freight.
	StagePhaseNotApplicable StagePhase = "NotApplicable"
	// StagePhaseSteady denotes a Stage that has Freight and is not currently
	// being promoted or verified.
	StagePhaseSteady StagePhase = "Steady"
	// StagePhasePromoting denotes a Stage that is currently being promoted.
	StagePhasePromoting StagePhase = "Promoting"
	// StagePhaseVerifying denotes a Stage that is currently being verified.
	StagePhaseVerifying StagePhase = "Verifying"
)

type StageSpec

type StageSpec struct {
	// Subscriptions describes the Stage's sources of Freight. This is a required
	// field.
	//
	//+kubebuilder:validation:Required
	Subscriptions *Subscriptions `json:"subscriptions"`
	// PromotionMechanisms describes how to incorporate Freight into the Stage.
	// This is an optional field as it is sometimes useful to aggregates available
	// Freight from multiple upstream Stages without performing any actions. The
	// utility of this is to allow multiple downstream Stages to subscribe to a
	// single upstream Stage where they may otherwise have subscribed to multiple
	// upstream Stages.
	PromotionMechanisms *PromotionMechanisms `json:"promotionMechanisms,omitempty"`
	// Verification describes how to verify a Stage's current Freight is fit for
	// promotion downstream.
	Verification *Verification `json:"verification,omitempty"`
}

StageSpec describes the sources of Freight used by a Stage and how to incorporate Freight into the Stage.

func (*StageSpec) DeepCopy

func (in *StageSpec) DeepCopy() *StageSpec

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

func (*StageSpec) DeepCopyInto

func (in *StageSpec) DeepCopyInto(out *StageSpec)

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

type StageStatus

type StageStatus struct {
	// Phase describes where the Stage currently is in its lifecycle.
	Phase StagePhase `json:"phase,omitempty"`
	// CurrentFreight is a simplified representation of the Stage's current
	// Freight describing what is currently deployed to the Stage.
	CurrentFreight *FreightReference `json:"currentFreight,omitempty"`
	// History is a stack of recent Freight. By default, the last ten Freight are
	// stored.
	History FreightReferenceStack `json:"history,omitempty"`
	// Health is the Stage's last observed health.
	Health *Health `json:"health,omitempty"`
	// Error describes any errors that are preventing the Stage controller
	// from assessing Stage health or from finding new Freight.
	Error string `json:"error,omitempty"`
	// ObservedGeneration represents the .metadata.generation that this Stage
	// status was reconciled against.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// CurrentPromotion is a reference to the currently Running promotion.
	CurrentPromotion *PromotionInfo `json:"currentPromotion,omitempty"`
}

StageStatus describes a Stages's current and recent Freight, health, and more.

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 StageSubscription

type StageSubscription struct {
	// Name specifies the name of a Stage.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
	Name string `json:"name"`
}

StageSubscription defines a subscription to Freight from another Stage.

func (*StageSubscription) DeepCopy

func (in *StageSubscription) DeepCopy() *StageSubscription

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

func (*StageSubscription) DeepCopyInto

func (in *StageSubscription) DeepCopyInto(out *StageSubscription)

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

type Subscriptions

type Subscriptions struct {
	// Warehouse is a subscription to a Warehouse. This field is mutually
	// exclusive with the UpstreamStages field.
	Warehouse string `json:"warehouse,omitempty"`
	// UpstreamStages identifies other Stages as potential sources of Freight
	// for this Stage. This field is mutually exclusive with the Repos field.
	UpstreamStages []StageSubscription `json:"upstreamStages,omitempty"`
}

Subscriptions describes a Stage's sources of Freight.

func (*Subscriptions) DeepCopy

func (in *Subscriptions) DeepCopy() *Subscriptions

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

func (*Subscriptions) DeepCopyInto

func (in *Subscriptions) DeepCopyInto(out *Subscriptions)

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

type Verification added in v0.3.0

type Verification struct {
	// AnalysisTemplates is a list of AnalysisTemplates from which AnalysisRuns
	// should be created to verify a Stage's current Freight is fit to be promoted
	// downstream.
	AnalysisTemplates []AnalysisTemplateReference `json:"analysisTemplates,omitempty"`
	// AnalysisRunMetadata is contains optional metadata that should be applied to
	// all AnalysisRuns.
	AnalysisRunMetadata *AnalysisRunMetadata `json:"analysisRunMetadata,omitempty"`
	// Args lists arguments that should be added to all AnalysisRuns.
	Args []AnalysisRunArgument `json:"args,omitempty"`
}

Verification describes how to verify that a Promotion has been successful using Argo Rollouts AnalysisTemplates.

func (*Verification) DeepCopy added in v0.3.0

func (in *Verification) DeepCopy() *Verification

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

func (*Verification) DeepCopyInto added in v0.3.0

func (in *Verification) DeepCopyInto(out *Verification)

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

type VerificationInfo added in v0.3.0

type VerificationInfo struct {
	// Phase describes the current phase of the Verification process. Generally,
	// this will be a reflection of the underlying AnalysisRun's phase, however,
	// there are exceptions to this, such as in the case where an AnalysisRun
	// cannot be launched successfully.
	Phase VerificationPhase `json:"phase,omitempty"`
	// Message may contain additional information about why the verification
	// process is in its current phase.
	Message string `json:"message,omitempty"`
	// AnalysisRun is a reference to the Argo Rollouts AnalysisRun that implements
	// the Verification process.
	AnalysisRun *AnalysisRunReference `json:"analysisRun,omitempty"`
}

VerificationInfo contains information about the currently running Verification process.

func (*VerificationInfo) DeepCopy added in v0.3.0

func (in *VerificationInfo) DeepCopy() *VerificationInfo

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

func (*VerificationInfo) DeepCopyInto added in v0.3.0

func (in *VerificationInfo) DeepCopyInto(out *VerificationInfo)

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

type VerificationPhase added in v0.4.0

type VerificationPhase string
const (
	// VerificationPhasePending denotes a verification process that has not yet
	// started yet.
	VerificationPhasePending VerificationPhase = "Pending"
	// VerificationPhaseRunning denotes a verification that is currently running.
	VerificationPhaseRunning VerificationPhase = "Running"
	// VerificationPhaseSuccessful denotes a verification process that has
	// completed successfully.
	VerificationPhaseSuccessful VerificationPhase = "Successful"
	// VerificationPhaseFailed denotes a verification process that has completed
	// with a failure.
	VerificationPhaseFailed VerificationPhase = "Failed"
	// VerificationPhaseError denotes a verification process that has completed
	// with an error.
	VerificationPhaseError VerificationPhase = "Error"
	// VerificationPhaseInconclusive denotes a verification process that has
	// completed with an inconclusive result.
	VerificationPhaseInconclusive VerificationPhase = "Inconclusive"
)

func (*VerificationPhase) IsTerminal added in v0.4.0

func (v *VerificationPhase) IsTerminal() bool

IsTerminal returns true if the VerificationPhase is a terminal one.

type VerifiedStage added in v0.3.0

type VerifiedStage struct{}

VerifiedStage describes a Stage in which Freight has been verified.

func (*VerifiedStage) DeepCopy added in v0.3.0

func (in *VerifiedStage) DeepCopy() *VerifiedStage

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

func (*VerifiedStage) DeepCopyInto added in v0.3.0

func (in *VerifiedStage) DeepCopyInto(out *VerifiedStage)

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

type Warehouse added in v0.2.0

type Warehouse struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec describes sources of artifacts.
	//
	//+kubebuilder:validation:Required
	Spec *WarehouseSpec `json:"spec"`
	// Status describes the Warehouse's most recently observed state.
	Status WarehouseStatus `json:"status,omitempty"`
}

Warehouse is a source of Freight.

func GetWarehouse added in v0.2.0

func GetWarehouse(
	ctx context.Context,
	c client.Client,
	namespacedName types.NamespacedName,
) (*Warehouse, error)

GetWarehouse returns a pointer to the Warehouse resource specified by the namespacedName argument. If no such resource is found, nil is returned instead.

func RefreshWarehouse added in v0.2.0

func RefreshWarehouse(
	ctx context.Context,
	c client.Client,
	namespacedName types.NamespacedName,
) (*Warehouse, error)

RefreshWarehouse forces reconciliation of a Warehouse by setting an annotation on the Warehouse, causing the controller to reconcile it. Currently, the annotation value is the timestamp of the request, but might in the future include additional metadata/context necessary for the request.

func (*Warehouse) DeepCopy added in v0.2.0

func (in *Warehouse) DeepCopy() *Warehouse

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

func (*Warehouse) DeepCopyInto added in v0.2.0

func (in *Warehouse) DeepCopyInto(out *Warehouse)

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

func (*Warehouse) DeepCopyObject added in v0.2.0

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

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

func (*Warehouse) GetStatus added in v0.2.0

func (w *Warehouse) GetStatus() *WarehouseStatus

type WarehouseList added in v0.2.0

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

WarehouseList is a list of Warehouse resources.

func (*WarehouseList) DeepCopy added in v0.2.0

func (in *WarehouseList) DeepCopy() *WarehouseList

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

func (*WarehouseList) DeepCopyInto added in v0.2.0

func (in *WarehouseList) DeepCopyInto(out *WarehouseList)

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

func (*WarehouseList) DeepCopyObject added in v0.2.0

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

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

type WarehouseSpec added in v0.2.0

type WarehouseSpec struct {
	// Subscriptions describes sources of artifacts to be included in Freight
	// produced by this Warehouse.
	//
	//+kubebuilder:validation:MinItems=1
	Subscriptions []RepoSubscription `json:"subscriptions"`
}

WarehouseSpec describes sources of versioned artifacts to be included in Freight produced by this Warehouse.

func (*WarehouseSpec) DeepCopy added in v0.2.0

func (in *WarehouseSpec) DeepCopy() *WarehouseSpec

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

func (*WarehouseSpec) DeepCopyInto added in v0.2.0

func (in *WarehouseSpec) DeepCopyInto(out *WarehouseSpec)

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

type WarehouseStatus added in v0.2.0

type WarehouseStatus struct {
	// Error describes any errors that are preventing the Warehouse controller
	// from polling repositories to discover new Freight.
	Error string `json:"error,omitempty"`
	// ObservedGeneration represents the .metadata.generation that this Warehouse
	// was reconciled against.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

WarehouseStatus describes a Warehouse's most recently observed state.

func (*WarehouseStatus) DeepCopy added in v0.2.0

func (in *WarehouseStatus) DeepCopy() *WarehouseStatus

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

func (*WarehouseStatus) DeepCopyInto added in v0.2.0

func (in *WarehouseStatus) DeepCopyInto(out *WarehouseStatus)

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