v1alpha1

package
v0.1.0-rc.13 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 11 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

This section is empty.

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

This section is empty.

Types

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
	// is defaulted to that of the Environment.
	//
	//+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 an Environment.

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

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

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 AuthorizedPromoter

type AuthorizedPromoter struct {
	// SubjectType identifies the type of subject being authorized to create
	// Promotion resources referencing a particular Environment.
	//
	//+kubebuilder:validation:Required
	SubjectType AuthorizedPromoterSubjectType `json:"subjectType"`
	// Name is the name of a subject authorized to create Promotion
	// resources referencing a particular Environment. This could be a username,
	// group name, ServiceAccount name, or Role name.
	//
	//+kubebuilder:validation:Required
	Name string `json:"name"`
}

AuthorizedPromoter identifies a single subject that is authorized to create Promotion resources referencing a particular Environment.

func (*AuthorizedPromoter) DeepCopy

func (in *AuthorizedPromoter) DeepCopy() *AuthorizedPromoter

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

func (*AuthorizedPromoter) DeepCopyInto

func (in *AuthorizedPromoter) DeepCopyInto(out *AuthorizedPromoter)

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

type AuthorizedPromoterSubjectType

type AuthorizedPromoterSubjectType string

+kubebuilder:validation:Enum={Group,Role,ServiceAccount,User}

const (
	AuthorizedPromoterSubjectTypeGroup          AuthorizedPromoterSubjectType = "Group"
	AuthorizedPromoterSubjectTypeRole           AuthorizedPromoterSubjectType = "Role"
	AuthorizedPromoterSubjectTypeServiceAccount AuthorizedPromoterSubjectType = "ServiceAccount"
	AuthorizedPromoterSubjectTypeUser           AuthorizedPromoterSubjectType = "User"
)

type BookkeeperPromotionMechanism

type BookkeeperPromotionMechanism struct{}

BookkeeperPromotionMechanism describes how to use Bookkeeper to incorporate newly observed materials into an Environment.

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 Environment

type Environment struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec describes the sources of material used by the Environment and how
	// to incorporate newly observed materials into the Environment.
	//
	//+kubebuilder:validation:Required
	Spec *EnvironmentSpec `json:"spec"`
	// Status describes the most recently observed versions of this Environment's
	// sources of material as well as the environment's current and recent states.
	Status EnvironmentStatus `json:"status,omitempty"`
}

Environment is the Kargo API's main type.

func GetEnv

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

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

func (*Environment) DeepCopy

func (in *Environment) DeepCopy() *Environment

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

func (*Environment) DeepCopyInto

func (in *Environment) DeepCopyInto(out *Environment)

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

func (*Environment) DeepCopyObject

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

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

type EnvironmentList

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

EnvironmentList is a list of Environment resources.

func (*EnvironmentList) DeepCopy

func (in *EnvironmentList) DeepCopy() *EnvironmentList

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

func (*EnvironmentList) DeepCopyInto

func (in *EnvironmentList) DeepCopyInto(out *EnvironmentList)

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

func (*EnvironmentList) DeepCopyObject

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

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

type EnvironmentSpec

type EnvironmentSpec struct {
	// Subscriptions describes the Environment'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 Environment. This is a required field.
	//
	//+kubebuilder:validation:Required
	PromotionMechanisms *PromotionMechanisms `json:"promotionMechanisms"`
}

EnvironmentSpec describes the sources of material used by an Environment and how to incorporate newly observed materials into the Environment.

func (*EnvironmentSpec) DeepCopy

func (in *EnvironmentSpec) DeepCopy() *EnvironmentSpec

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

func (*EnvironmentSpec) DeepCopyInto

func (in *EnvironmentSpec) DeepCopyInto(out *EnvironmentSpec)

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

type EnvironmentState

type EnvironmentState struct {
	// ID is a unique, system-assigned identifier for this state.
	ID string `json:"id,omitempty"`
	// FirstSeen represents the date/time when this EnvironmentState first entered
	// the system. This is useful and important information because it enables the
	// controller to block auto-promotion of EnvironmentStates that are older than
	// an Environment's current state, which is a case that can arise if an
	// Environment has ROLLED BACK to an older state whilst a downstream
	// Environment is already on to a newer state.
	FirstSeen *metav1.Time `json:"firstSeen,omitempty"`
	// Provenance describes the proximate source of this EnvironmentState. i.e.
	// Did it come directly from upstream repositories? Or an upstream
	// environment.
	Provenance string `json:"provenance,omitempty"`
	// Commits describes specific Git repository commits that were used in this
	// state.
	Commits []GitCommit `json:"commits,omitempty"`
	// Images describes container images and versions thereof that were used
	// in this state.
	Images []Image `json:"images,omitempty"`
	// Charts describes Helm charts that were used in this state.
	Charts []Chart `json:"charts,omitempty"`
	// Health is the state's last observed health. If this state is the
	// Environment's current state, this will be continuously re-assessed and
	// updated. If this state is a past state of the Environment, this field will
	// denote the last observed health state before transitioning into a different
	// state.
	Health *Health `json:"health,omitempty"`
}

EnvironmentState is a "bill of materials" describing what was deployed to an Environment.

func (*EnvironmentState) DeepCopy

func (in *EnvironmentState) DeepCopy() *EnvironmentState

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

func (*EnvironmentState) DeepCopyInto

func (in *EnvironmentState) DeepCopyInto(out *EnvironmentState)

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

func (*EnvironmentState) UpdateStateID

func (e *EnvironmentState) UpdateStateID()

type EnvironmentStateStack

type EnvironmentStateStack []EnvironmentState

func (EnvironmentStateStack) DeepCopy

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

func (EnvironmentStateStack) DeepCopyInto

func (in EnvironmentStateStack) DeepCopyInto(out *EnvironmentStateStack)

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

func (EnvironmentStateStack) Empty

func (e EnvironmentStateStack) Empty() bool

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

func (*EnvironmentStateStack) Pop

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

func (*EnvironmentStateStack) Push

func (e *EnvironmentStateStack) Push(states ...EnvironmentState)

Push pushes one or more EnvironmentStates onto the EnvironmentStateStack. 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 (EnvironmentStateStack) Top

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

type EnvironmentStatus

type EnvironmentStatus struct {
	// AvailableStates is a stack of available Environment states, where each
	// state is essentially a "bill of materials" describing what can be
	// automatically or manually deployed to the Environment.
	AvailableStates EnvironmentStateStack `json:"availableStates,omitempty"`
	// CurrentState is the Environment's current state -- a "bill of materials"
	// describing what is currently deployed to the Environment.
	CurrentState *EnvironmentState `json:"currentState,omitempty"`
	// History is a stack of recent Environment states, where each state is
	// essentially a "bill of materials" describing what was deployed to the
	// Environment. By default, the last ten states are stored.
	History EnvironmentStateStack `json:"history,omitempty"`
	// Error describes any errors that are preventing the Environment controller
	// from assessing Environment health, polling repositories or upstream
	// environments to discover new states, or promoting the environment to a new
	// state.
	Error string `json:"error,omitempty"`
}

EnvironmentStatus describes the most recently observed versions of an Environment's sources of material as well as its current and recent states.

func (*EnvironmentStatus) DeepCopy

func (in *EnvironmentStatus) DeepCopy() *EnvironmentStatus

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

func (*EnvironmentStatus) DeepCopyInto

func (in *EnvironmentStatus) DeepCopyInto(out *EnvironmentStatus)

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

type EnvironmentSubscription

type EnvironmentSubscription struct {
	// Name specifies the name of an Environment.
	//
	//+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"`
	// Namespace specifies the namespace of the Environment. If left unspecified,
	// the namespace of the upstream repository will be defaulted to that of this
	// Environment.
	//
	//+kubebuilder:validation:Optional
	//+kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
	Namespace string `json:"namespace,omitempty"`
}

EnvironmentSubscription defines a subscription to states from another Environment.

func (*EnvironmentSubscription) DeepCopy

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

func (*EnvironmentSubscription) DeepCopyInto

func (in *EnvironmentSubscription) DeepCopyInto(out *EnvironmentSubscription)

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 Environment health will used this value (instead of ID) when
	// determining if applicable sources of Argo CD Application resources
	// associated with the environment 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"`
}

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. In cases where an
	// EnvironmentState 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 an Environment has no subscription to that
	// repository.
	//
	//+kubebuilder:validation:Optional
	//+kubebuilder:validation:Pattern=`^(\w+([-/]\w+)*)?$`
	ReadBranch string `json:"readBranch"`
	// 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 Environment. 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 Environment. 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 Environment. 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 an Environment.

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 is a required
	// field.
	//
	//+kubebuilder:validation:MinLength=1
	//+kubebuilder:validation:Pattern=`^\w+([-/]\w+)*$`
	Branch string `json:"branch"`
}

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 Environment.
	Status HealthState `json:"status,omitempty"`
	// Issues clarifies why an Environment in any state other than Healthy is in
	// that state. This field will always be the empty when an Environment is
	// Healthy.
	Issues []string `json:"issues,omitempty"`
}

Health describes the health of an Environment.

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"
	HealthStateUnknown   HealthState = "Unknown"
)

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

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"`
	// 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"`
	// 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 an Environment.

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 Environment into a
	// specific EnvironmentState.
	//
	//+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 Environment into a particular state.

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.

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 Environment. 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
	// Environment. 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 an Environment.

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    PromotionPhase = "Pending"
	PromotionPhaseInProgress PromotionPhase = "Promoting"
	PromotionPhaseComplete   PromotionPhase = "Completed"
	PromotionPhaseFailed     PromotionPhase = "Failed"
)

type PromotionPolicy

type PromotionPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Environment references an Environment in the same namespace 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])?)*$
	Environment string `json:"environment"`
	// AuthorizedPromoters enumerates subjects (such as users, groups,
	// ServiceAccounts, or RBAC Roles) that are authorized to create Promotions
	// for the Environment referenced by the Environment field.
	AuthorizedPromoters []AuthorizedPromoter `json:"authorizedPromoters,omitempty"`
	// EnableAutoPromotion indicates whether new EnvironmentStates can
	// automatically be promoted into the Environment referenced by the
	// Environment field. Note: There are other conditions also required for an
	// auto-promotion to occur. Specifically, there must be a single source of new
	// EnvironmentStates, so regardless of the value of this field, an
	// auto-promotion could never occur for an Environment subscribed to MULTIPLE
	// upstream environments. This field defaults to false, but is commonly set to
	// true for Environments that subscribe to repositories instead of other,
	// upstream Environments. This allows users to define Environments that are
	// automatically updated as soon as new materials are detected.
	EnableAutoPromotion bool `json:"enableAutoPromotion,omitempty"`
}

PromotionPolicy provides fine-grained access control beyond what Kubernetes RBAC is capable of. A PromotionPolicy names an Environment and enumerates subjects (such as users, groups, ServiceAccounts, or RBAC Roles) that are authorized to create Promotions for that Environment. It is through PromotionPolicies that multiple users may be permitted to create Promotion resources in a given namespace, but creation of Promotion resources for specific Environments may be restricted.

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 {
	// Environment specifies the name of the Environment to which this Promotion
	// applies. The Environment referenced by this field MUST be in the same
	// namespace as the Promotion.
	//
	// TODO: Use a webhook to make this immutable
	//
	//+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])?)*$
	Environment string `json:"environment"`
	// State specifies the specific EnvironmentState into which the Environment
	// referenced by the Environment field should be transitioned. The State MUST
	// be among the Environment's Status.AvailableStates or the Promotion will
	// ultimately fail.
	//
	// TODO: Use a webhook to make this immutable
	//
	//+kubebuilder:validation:MinLength=1
	State string `json:"state"`
}

PromotionSpec describes the desired transition of a specific Environment into a specific EnvironmentState.

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 an Environment 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 Subscriptions

type Subscriptions struct {
	// Repos describes various sorts of repositories an Environment uses as
	// sources of material. This field is mutually exclusive with the UpstreamEnvs
	// field.
	Repos *RepoSubscriptions `json:"repos,omitempty"`
	// UpstreamEnvs identifies other environments as potential sources of material
	// for the Environment. This field is mutually exclusive with the Repos field.
	UpstreamEnvs []EnvironmentSubscription `json:"upstreamEnvs,omitempty"`
}

Subscriptions describes an Environment'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