v1alpha1

package
v0.26.1 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API types for the image v1alpha1 API group. The types here are concerned with automated updates to git, based on metadata from OCI image registries gathered by the image-reflector-controller.

+kubebuilder:object:generate=true +groupName=image.toolkit.fluxcd.io

Package v1alpha1 contains API Schema definitions for the image v1alpha1 API group +kubebuilder:object:generate=true +groupName=image.toolkit.fluxcd.io

Index

Constants

View Source
const (
	// GitNotAvailableReason is used for ConditionReady when the
	// automation run cannot proceed because the git repository is
	// missing or cannot be cloned.
	GitNotAvailableReason = "GitRepositoryNotAvailable"
	// NoStrategyReason is used for ConditionReady when the automation
	// run cannot proceed because there is no update strategy given in
	// the spec.
	NoStrategyReason = "MissingUpdateStrategy"
)
View Source
const ImageUpdateAutomationKind = "ImageUpdateAutomation"

Variables

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

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

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

Functions

func SetImageUpdateAutomationReadiness

func SetImageUpdateAutomationReadiness(auto *ImageUpdateAutomation, status metav1.ConditionStatus, reason, message string)

SetImageUpdateAutomationReadiness sets the ready condition with the given status, reason and message.

Types

type CommitSpec

type CommitSpec struct {
	// AuthorName gives the name to provide when making a commit
	// +required
	AuthorName string `json:"authorName"`
	// AuthorEmail gives the email to provide when making a commit
	// +required
	AuthorEmail string `json:"authorEmail"`
	// SigningKey provides the option to sign commits with a GPG key
	// +optional
	SigningKey *SigningKey `json:"signingKey,omitempty"`
	// MessageTemplate provides a template for the commit message,
	// into which will be interpolated the details of the change made.
	// +optional
	MessageTemplate string `json:"messageTemplate,omitempty"`
}

CommitSpec specifies how to commit changes to the git repository

func (*CommitSpec) DeepCopy

func (in *CommitSpec) DeepCopy() *CommitSpec

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

func (*CommitSpec) DeepCopyInto

func (in *CommitSpec) DeepCopyInto(out *CommitSpec)

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

type GitCheckoutSpec

type GitCheckoutSpec struct {
	// GitRepositoryRef refers to the resource giving access details
	// to a git repository to update files in.
	// +required
	GitRepositoryRef meta.LocalObjectReference `json:"gitRepositoryRef"`
	// Branch gives the branch to clone from the git repository. If
	// `.spec.push` is not supplied, commits will also be pushed to
	// this branch.
	// +required
	Branch string `json:"branch"`
}

func (*GitCheckoutSpec) DeepCopy

func (in *GitCheckoutSpec) DeepCopy() *GitCheckoutSpec

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

func (*GitCheckoutSpec) DeepCopyInto

func (in *GitCheckoutSpec) DeepCopyInto(out *GitCheckoutSpec)

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

type ImageUpdateAutomation

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

	Spec   ImageUpdateAutomationSpec   `json:"spec,omitempty"`
	Status ImageUpdateAutomationStatus `json:"status,omitempty"`
}

ImageUpdateAutomation is the Schema for the imageupdateautomations API

func (*ImageUpdateAutomation) DeepCopy

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

func (*ImageUpdateAutomation) DeepCopyInto

func (in *ImageUpdateAutomation) DeepCopyInto(out *ImageUpdateAutomation)

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

func (*ImageUpdateAutomation) DeepCopyObject

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

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

func (*ImageUpdateAutomation) GetStatusConditions

func (auto *ImageUpdateAutomation) GetStatusConditions() *[]metav1.Condition

type ImageUpdateAutomationList

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

ImageUpdateAutomationList contains a list of ImageUpdateAutomation

func (*ImageUpdateAutomationList) DeepCopy

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

func (*ImageUpdateAutomationList) DeepCopyInto

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

func (*ImageUpdateAutomationList) DeepCopyObject

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

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

type ImageUpdateAutomationSpec

type ImageUpdateAutomationSpec struct {
	// Checkout gives the parameters for cloning the git repository,
	// ready to make changes.
	// +required
	Checkout GitCheckoutSpec `json:"checkout"`

	// Interval gives an lower bound for how often the automation
	// run should be attempted.
	// +required
	Interval metav1.Duration `json:"interval"`

	// Update gives the specification for how to update the files in
	// the repository. This can be left empty, to use the default
	// value.
	// +kubebuilder:default={"strategy":"Setters"}
	Update *UpdateStrategy `json:"update,omitempty"`

	// Commit specifies how to commit to the git repository.
	// +required
	Commit CommitSpec `json:"commit"`

	// Push specifies how and where to push commits made by the
	// automation. If missing, commits are pushed (back) to
	// `.spec.checkout.branch`.
	// +optional
	Push *PushSpec `json:"push,omitempty"`

	// Suspend tells the controller to not run this automation, until
	// it is unset (or set to false). Defaults to false.
	// +optional
	Suspend bool `json:"suspend,omitempty"`
}

ImageUpdateAutomationSpec defines the desired state of ImageUpdateAutomation

func (*ImageUpdateAutomationSpec) DeepCopy

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

func (*ImageUpdateAutomationSpec) DeepCopyInto

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

type ImageUpdateAutomationStatus

type ImageUpdateAutomationStatus struct {
	// LastAutomationRunTime records the last time the controller ran
	// this automation through to completion (even if no updates were
	// made).
	// +optional
	LastAutomationRunTime *metav1.Time `json:"lastAutomationRunTime,omitempty"`
	// LastPushCommit records the SHA1 of the last commit made by the
	// controller, for this automation object
	// +optional
	LastPushCommit string `json:"lastPushCommit,omitempty"`
	// LastPushTime records the time of the last pushed change.
	// +optional
	LastPushTime *metav1.Time `json:"lastPushTime,omitempty"`
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// +optional
	Conditions                  []metav1.Condition `json:"conditions,omitempty"`
	meta.ReconcileRequestStatus `json:",inline"`
}

ImageUpdateAutomationStatus defines the observed state of ImageUpdateAutomation

func (*ImageUpdateAutomationStatus) DeepCopy

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

func (*ImageUpdateAutomationStatus) DeepCopyInto

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

type PushSpec added in v0.7.0

type PushSpec struct {
	// Branch specifies that commits should be pushed to the branch
	// named. The branch is created using `.spec.checkout.branch` as the
	// starting point, if it doesn't already exist.
	// +required
	Branch string `json:"branch"`
}

PushSpec specifies how and where to push commits.

func (*PushSpec) DeepCopy added in v0.7.0

func (in *PushSpec) DeepCopy() *PushSpec

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

func (*PushSpec) DeepCopyInto added in v0.7.0

func (in *PushSpec) DeepCopyInto(out *PushSpec)

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

type SigningKey added in v0.8.0

type SigningKey struct {
	// SecretRef holds the name to a secret that contains a 'git.asc' key
	// corresponding to the ASCII Armored file containing the GPG signing
	// keypair as the value. It must be in the same namespace as the
	// ImageUpdateAutomation.
	// +required
	SecretRef meta.LocalObjectReference `json:"secretRef,omitempty"`
}

SigningKey references a Kubernetes secret that contains a GPG keypair

func (*SigningKey) DeepCopy added in v0.8.0

func (in *SigningKey) DeepCopy() *SigningKey

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

func (*SigningKey) DeepCopyInto added in v0.8.0

func (in *SigningKey) DeepCopyInto(out *SigningKey)

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

type UpdateStrategy

type UpdateStrategy struct {
	// Strategy names the strategy to be used.
	// +required
	// +kubebuilder:default=Setters
	Strategy UpdateStrategyName `json:"strategy"`

	// Path to the directory containing the manifests to be updated.
	// Defaults to 'None', which translates to the root path
	// of the GitRepositoryRef.
	// +optional
	Path string `json:"path,omitempty"`
}

UpdateStrategy is a union of the various strategies for updating the Git repository. Parameters for each strategy (if any) can be inlined here.

func (*UpdateStrategy) DeepCopy

func (in *UpdateStrategy) DeepCopy() *UpdateStrategy

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

func (*UpdateStrategy) DeepCopyInto

func (in *UpdateStrategy) DeepCopyInto(out *UpdateStrategy)

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

type UpdateStrategyName added in v0.4.0

type UpdateStrategyName string

UpdateStrategyName is the type for names that go in .update.strategy. NB the value in the const immediately below. +kubebuilder:validation:Enum=Setters

const (
	// UpdateStrategySetters is the name of the update strategy that
	// uses kyaml setters. NB the value in the enum annotation for the
	// type, above.
	UpdateStrategySetters UpdateStrategyName = "Setters"
)

Jump to

Keyboard shortcuts

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