v1alpha1

package
v0.1.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 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 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 "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 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 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 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 {
	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 GetQualifiedFreight added in v0.2.0

func GetQualifiedFreight(
	ctx context.Context,
	c client.Client,
	namespacedName types.NamespacedName,
	stages []string,
) (*Freight, error)

GetQualifiedFreight returns a pointer to the Freight resource specified by the namespacedName argument if it is found and EITHER no Stages were specified in the function call OR the Freight has qualified for ANY of the specified Stages. If all other cases, nil is returned instead.

Note: The rationale for returning the found Freight (if any) instead of nil when no Stages are specified is that the Stages provided are typically the names of Stages UPSTREAM from some other Stage. i.e. The typical use for this function is to answer whether a piece of Freight has qualified for any of a given Stage's UPSTREAM Stages. Some Stages have no upstream Stages, so any Freight that is found is implicitly qualified.

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 FreightStatus added in v0.2.0

type FreightStatus struct {
	// Qualifications describes the Stages for which this Freight has been
	// qualified.
	Qualifications map[string]Qualification `json:"qualifications,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"`
	// 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 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"`
	// 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"`
	// 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"`
	// 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+([\.-]\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 "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 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"`
}

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+([\.-]\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"`
	// 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,NewestBuild,Alphabetical,Digest}

const (
	ImageUpdateStrategySemVer       ImageUpdateStrategy = "SemVer"
	ImageUpdateStrategyNewestBuild  ImageUpdateStrategy = "NewestBuild"
	ImageUpdateStrategyAlphabetical ImageUpdateStrategy = "Alphabetical"
	ImageUpdateStrategyDigest       ImageUpdateStrategy = "Digest"
)

type ImageUpdateValueType

type ImageUpdateValueType string

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

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

type KargoRenderPromotionMechanism added in v0.2.0

type KargoRenderPromotionMechanism struct{}

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

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 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 (*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 SimpleFreight `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"
	// 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 GetPromotionPolicy added in v0.2.0

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

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

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 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"`
	// 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 Qualification added in v0.2.0

type Qualification struct{}

Qualification describes a Freight's qualification for a Stage.

func (*Qualification) DeepCopy added in v0.2.0

func (in *Qualification) DeepCopy() *Qualification

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

func (*Qualification) DeepCopyInto added in v0.2.0

func (in *Qualification) DeepCopyInto(out *Qualification)

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 SimpleFreight added in v0.2.0

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

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

func (*SimpleFreight) DeepCopy added in v0.2.0

func (in *SimpleFreight) DeepCopy() *SimpleFreight

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

func (*SimpleFreight) DeepCopyInto added in v0.2.0

func (in *SimpleFreight) DeepCopyInto(out *SimpleFreight)

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

type SimpleFreightStack added in v0.2.0

type SimpleFreightStack []SimpleFreight

func (SimpleFreightStack) DeepCopy added in v0.2.0

func (in SimpleFreightStack) DeepCopy() SimpleFreightStack

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

func (SimpleFreightStack) DeepCopyInto added in v0.2.0

func (in SimpleFreightStack) DeepCopyInto(out *SimpleFreightStack)

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

func (SimpleFreightStack) Empty added in v0.2.0

func (s SimpleFreightStack) Empty() bool

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

func (*SimpleFreightStack) Pop added in v0.2.0

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

func (*SimpleFreightStack) Push added in v0.2.0

func (s *SimpleFreightStack) Push(freight ...SimpleFreight)

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 (SimpleFreightStack) Top added in v0.2.0

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

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

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 {
	// CurrentFreight is a simplified representation of the Stage's current
	// Freight describing what is currently deployed to the Stage.
	CurrentFreight *SimpleFreight `json:"currentFreight,omitempty"`
	// History is a stack of recent Freight. By default, the last ten Freight are
	// stored.
	History SimpleFreightStack `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 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 (*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