v1alpha1

package
v0.1.0-rc.23 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 13 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 (
	LabelProjectKey = "kargo.akuity.io/project"

	LabelTrueValue = "true"

	AnnotationKeyRefresh = "kargo.akuity.io/refresh"
)

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 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.

Types

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 newly observed materials 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 materials 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 "Image", which replaces the
	// value of the specified key with the entire <image name>:<tag>, or "Tag"
	// which replaces the value of the specified with just the new tag. 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 []string `json:"images"`
}

ArgoCDKustomize describes updates to an Argo CD Application source's Kustomize-specific attributes to incorporate newly observed materials 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 ArgoCDSourceUpdate

type ArgoCDSourceUpdate struct {
	// RepoURL identifies which of the Argo CD Application's sources this update
	// is intended for. Note: As of Argo CD 2.6, Application's can use multiple
	// sources.
	//
	//+kubebuilder:validation:MinLength=1
	RepoURL string `json:"repoURL"`
	// Chart specifies a chart within a Helm chart registry if RepoURL points to a
	// Helm chart registry. Application sources that point directly at a chart do
	// so through a combination of their own RepoURL (registry) and Chart fields,
	// so BOTH of those are used as criteria in selecting an Application source to
	// update. This field MUST always be used when RepoURL points at a Helm chart
	// registry. This field MUST never be used when RepoURL points at a Git
	// repository.
	//
	//+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 BookkeeperPromotionMechanism

type BookkeeperPromotionMechanism struct{}

BookkeeperPromotionMechanism describes how to use Bookkeeper to incorporate newly observed materials into a Stage.

func (*BookkeeperPromotionMechanism) DeepCopy

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

func (*BookkeeperPromotionMechanism) DeepCopyInto

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 remote registry in which this chart is located.
	RegistryURL string `json:"registryURL,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 {
	// RegistryURL specifies the URL of a Helm chart registry. It may be a classic
	// chart registry (using HTTP/S) OR an OCI registry. This field is required.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=`^(((https?)|(oci))://)([\w\d\.]+)(:[\d]+)?(/.*)*$`
	RegistryURL string `json:"registryURL"`
	// Name specifies a Helm chart to subscribe to within the Helm chart registry
	// specified by the RegistryURL field. This field is required.
	//
	//+kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// 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.
	//
	//+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 Freight

type Freight struct {
	// ID is a unique, system-assigned identifier for this Freight.
	ID string `json:"id,omitempty"`
	// FirstSeen represents the date/time when this Freight first entered the
	// system. This is useful and important information because it enables the
	// controller to block auto-promotion of Freight that are older than a
	// Stages's current Freight, which is a case that can arise if a Stage has
	// ROLLED BACK to an older Freight whilst a downstream Stage is already on to
	// a newer Freight.
	FirstSeen *metav1.Time `json:"firstSeen,omitempty"`
	// Provenance describes the proximate source of this Freight. i.e. Did it come
	// directly from upstream repositories? Or an upstream Stage.
	Provenance string `json:"provenance,omitempty"`
	// Commits describes specific Git repository commits that were used in this
	// Freight.
	Commits []GitCommit `json:"commits,omitempty"`
	// Images describes container images and versions thereof that were used
	// in this Freight.
	Images []Image `json:"images,omitempty"`
	// Charts describes Helm charts that were used in this Freight.
	Charts []Chart `json:"charts,omitempty"`
	// Qualified denotes whether this Freight is suitable for promotion to a
	// downstream Stage. This field becomes true when it is the current Freight of
	// a Stage and that Stage is observed to be synced and healthy. Subsequent
	// failures in Stage health evaluation do not disqualify a Freight that is
	// already qualified.
	Qualified bool `json:"qualified,omitempty"`
}

Freight is a "bill of materials" describing what is, was, or can be deployed to a Stage.

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) UpdateFreightID

func (f *Freight) UpdateFreightID()

type FreightStack

type FreightStack []Freight

func (FreightStack) DeepCopy

func (in FreightStack) DeepCopy() FreightStack

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

func (FreightStack) DeepCopyInto

func (in FreightStack) DeepCopyInto(out *FreightStack)

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

func (FreightStack) Empty

func (f FreightStack) Empty() bool

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

func (*FreightStack) Pop

func (f *FreightStack) Pop() (Freight, bool)

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

func (*FreightStack) Push

func (f *FreightStack) Push(freight ...Freight)

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 (FreightStack) Top

func (f FreightStack) Top() (Freight, bool)

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

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"`
	// 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 Bookkeeper 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 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\d\.]+)(:[\d]+)?/(.*)$`
	RepoURL string `json:"repoURL"`
	// 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"`
	// Bookkeeper describes how to use Bookkeeper to incorporate newly observed
	// materials into the Stage. This is mutually exclusive with the Kustomize and
	// Helm fields.
	Bookkeeper *BookkeeperPromotionMechanism `json:"bookkeeper,omitempty"`
	// Kustomize describes how to use Kustomize to incorporate newly observed
	// materials into the Stage. This is mutually exclusive with the Bookkeeper
	// and Helm fields.
	Kustomize *KustomizePromotionMechanism `json:"kustomize,omitempty"`
	// Helm describes how to use Helm to incorporate newly observed materials into
	// the Stage. This is mutually exclusive with the Bookkeeper 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 newly observed materials 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\d\.]+)(:[\d]+)?/(.*)$`
	RepoURL string `json:"repoURL"`
	// Branch references a particular branch of the repository. This field is
	// optional. When not specified, the subscription is implicitly to the
	// repository's default branch.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=`^\w+([-/]\w+)*$`
	Branch string `json:"branch,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 {
	// RegistryURL along with Name identify a subchart of the umbrella chart at
	// ChartPath whose version should be updated.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=`^(((https?)|(oci))://)([\w\d\.]+)(:[\d]+)?(/.*)*$`
	RegistryURL string `json:"registryURL"`
	// Name along with RegistryURL identify a subchart of the umbrella chart at
	// ChartPath whose version should be updated.
	//
	//+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\d\.-]+)(:[\d]+)?/)?[a-z0-9-]+(/[a-z0-9-]+)*$`
	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 "Image", which replaces the value of the
	// specified key with the entire <image name>:<tag>, or "Tag" which replaces
	// the value of the specified with just the new tag. 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 newly observed materials 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"`
}

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 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\d\.-]+)(:[\d]+)?/)?[a-z0-9-]+(/[a-z0-9-]+)*$`
	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\d\.]+)(:[\d]+)?/(.*))?$`
	GitRepoURL string `json:"gitRepoURL,omitempty"`
	// UpdateStrategy 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
	UpdateStrategy ImageUpdateStrategy `json:"updateStrategy,omitempty"`
	// SemverConstraint specifies constraints on what new image versions are
	// permissible. This value in this field only has any effect when the
	// UpdateStrategy is SemVer or left unspecified (which is implicitly the same
	// as SemVer). This field is also optional. When left unspecified, (and the
	// UpdateStrategy 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.
	//
	//+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 ImageUpdateStrategy

type ImageUpdateStrategy string

+kubebuilder:validation:Enum={SemVer,Latest,Name,Digest}

const (
	ImageUpdateStrategySemVer ImageUpdateStrategy = "SemVer"
	ImageUpdateStrategyLatest ImageUpdateStrategy = "Latest"
	ImageUpdateStrategyName   ImageUpdateStrategy = "Name"
	ImageUpdateStrategyDigest ImageUpdateStrategy = "Digest"
)

type ImageUpdateValueType

type ImageUpdateValueType string

+kubebuilder:validation:Enum={Image,Tag}

const (
	ImageUpdateValueTypeImage ImageUpdateValueType = "Image"
	ImageUpdateValueTypeTag   ImageUpdateValueType = "Tag"
)

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"`
}

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 newly observed materials 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 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 (*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 Freight `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 newly observed materials 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 newly observed materials 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 newly observed materials 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"
	// PromotionPhaseErrored denotes a Promotion that has failed for technical
	// reasons. Further information about the failure can be found in the
	// Promotion's status.
	//
	// TODO: "For technical reasons" is the operative phrase here. We are leaving
	// room for the possibility in the near future that a Promotion might fail
	// as a result of some user action.
	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 {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Stage references a Stage in the same project as this PromotionPolicy to
	// which this PromotionPolicy applies.
	//
	//+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,"`
	// EnableAutoPromotion indicates whether new Freight can automatically be
	// promoted into the Stage referenced by the Stage field. Note: There are
	// other conditions also required for an auto-promotion to occur.
	// Specifically, there must be a single source of new Freight, so regardless
	// of the value of this field, an auto-promotion could never occur for a Stage
	// subscribed to MULTIPLE upstream Stages. This field defaults to false, but
	// is commonly set to true for Stages that subscribe to repositories instead
	// of other, upstream Stages. This allows users to define Stages that are
	// automatically updated as soon as new materials are detected.
	EnableAutoPromotion bool `json:"enableAutoPromotion,omitempty"`
}

PromotionPolicy specifies whether a given Stage is eligible for auto-promotion to newly discovered Freight.

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.

func (*PromotionPolicy) DeepCopyObject

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

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

type PromotionPolicyList

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

PromotionPolicyList contains a list of PromotionPolicies

func (*PromotionPolicyList) DeepCopy

func (in *PromotionPolicyList) DeepCopy() *PromotionPolicyList

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

func (*PromotionPolicyList) DeepCopyInto

func (in *PromotionPolicyList) DeepCopyInto(out *PromotionPolicyList)

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

func (*PromotionPolicyList) DeepCopyObject

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

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

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 specific Freight into which the Stage referenced by
	// the Stage field should be transitioned. The Freight MUST be among the Stage's
	// Status.AvailableFreight or the Promotion will ultimately fail.
	//
	//
	//+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"`
	// Error describes any errors that are 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.
	Error string `json:"error,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.

type RepoSubscriptions

type RepoSubscriptions struct {
	// Git describes subscriptions to Git repositories.
	Git []GitSubscription `json:"git,omitempty"`
	// Images describes subscriptions to container image repositories.
	Images []ImageSubscription `json:"images,omitempty"`
	// Charts describes subscriptions to Helm charts.
	Charts []ChartSubscription `json:"charts,omitempty"`
}

RepoSubscriptions describes various sorts of repositories a Stage uses as sources of material.

func (*RepoSubscriptions) DeepCopy

func (in *RepoSubscriptions) DeepCopy() *RepoSubscriptions

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

func (*RepoSubscriptions) DeepCopyInto

func (in *RepoSubscriptions) DeepCopyInto(out *RepoSubscriptions)

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 the sources of material used by the Stage and how
	// to incorporate newly observed materials into the Stage.
	//
	//+kubebuilder:validation:Required
	Spec *StageSpec `json:"spec"`
	// Status describes the most recently observed Freight as well as the Stage's
	// current and recent Freight.
	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 StageSpec

type StageSpec struct {
	// Subscriptions describes the Stage's sources of material. This is a
	// required field.
	//
	//+kubebuilder:validation:Required
	Subscriptions *Subscriptions `json:"subscriptions"`
	// PromotionMechanisms describes how to incorporate newly observed materials
	// 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 be able to subscribe to a single upstream Stage where they may
	// otherwise have subscribed to multiple upstream Stages.
	PromotionMechanisms *PromotionMechanisms `json:"promotionMechanisms,omitempty"`
}

StageSpec describes the sources of material used by a Stage and how to incorporate newly observed materials 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 {
	// AvailableFreight is a stack of available Freight, where each Freight is
	// essentially a "bill of materials" describing what can be automatically or
	// manually deployed to the Stage.
	AvailableFreight FreightStack `json:"availableFreight,omitempty"`
	// CurrentFreight is the Stage's current Freight -- a "bill of materials"
	// describing what is currently deployed to the Stage.
	CurrentFreight *Freight `json:"currentFreight,omitempty"`
	// History is a stack of recent Freight, where each Freight is essentially a
	// "bill of materials" describing what was deployed to the Stage. By default,
	// the last ten Freight are stored.
	History FreightStack `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 polling repositories or upstream
	// Stages to discover 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 most recently observed Freight as well current and recent Freight.

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 {
	// Repos describes various sorts of repositories a Stage uses as sources of
	// material. This field is mutually exclusive with the UpstreamStages field.
	Repos *RepoSubscriptions `json:"repos,omitempty"`
	// UpstreamStages identifies other Stages as potential sources of material
	// for this Stage. This field is mutually exclusive with the Repos field.
	UpstreamStages []StageSubscription `json:"upstreamStages,omitempty"`
}

Subscriptions describes a Stage's sources of material.

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.

Jump to

Keyboard shortcuts

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