Documentation
¶
Overview ¶
Package v1beta1 contains API Schema definitions for the source v1beta1 API group +kubebuilder:object:generate=true +groupName=source.extensions.fluxcd.io
Index ¶
- Constants
- Variables
- func HashObservedSources(sources map[string]ObservedSource) string
- type ArtifactGenerator
- func (in *ArtifactGenerator) DeepCopy() *ArtifactGenerator
- func (in *ArtifactGenerator) DeepCopyInto(out *ArtifactGenerator)
- func (in *ArtifactGenerator) DeepCopyObject() runtime.Object
- func (in *ArtifactGenerator) GetConditions() []metav1.Condition
- func (in *ArtifactGenerator) GetRequeueAfter() time.Duration
- func (in *ArtifactGenerator) HasArtifactInInventory(name, namespace, digest string) bool
- func (in *ArtifactGenerator) IsDisabled() bool
- func (in *ArtifactGenerator) SetConditions(conditions []metav1.Condition)
- func (in *ArtifactGenerator) SetLastHandledReconcileAt(value string)
- type ArtifactGeneratorList
- type ArtifactGeneratorSpec
- type ArtifactGeneratorStatus
- type CopyOperation
- type ExternalArtifactReference
- type ObservedSource
- type OutputArtifact
- type SourceReference
Constants ¶
const ( ArtifactGeneratorKind = "ArtifactGenerator" Finalizer = "source.extensions.fluxcd.io/finalizer" ArtifactGeneratorLabel = "source.extensions.fluxcd.io/generator" ArtifactOriginRevisionAnnotation = "org.opencontainers.image.revision" ReconcileAnnotation = "source.extensions.fluxcd.io/reconcile" ReconciliationDisabledReason = "ReconciliationDisabled" AccessDeniedReason = "AccessDenied" ValidationFailedReason = "ValidationFailed" SourceFetchFailedReason = "SourceFetchFailed" OverwriteStrategy = "Overwrite" MergeStrategy = "Merge" EnabledValue = "enabled" DisabledValue = "disabled" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "source.extensions.fluxcd.io", Version: "v1beta1"} // 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 HashObservedSources ¶
func HashObservedSources(sources map[string]ObservedSource) string
HashObservedSources computes a hash of the ObservedSource map. It sorts the formatted source strings to ensure consistent hashing. The resulting hash is a SHA-256 digest represented as a hexadecimal string.
Types ¶
type ArtifactGenerator ¶
type ArtifactGenerator struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ArtifactGeneratorSpec `json:"spec,omitempty"`
Status ArtifactGeneratorStatus `json:"status,omitempty"`
}
ArtifactGenerator is the Schema for the artifactgenerators API.
func (*ArtifactGenerator) DeepCopy ¶
func (in *ArtifactGenerator) DeepCopy() *ArtifactGenerator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactGenerator.
func (*ArtifactGenerator) DeepCopyInto ¶
func (in *ArtifactGenerator) DeepCopyInto(out *ArtifactGenerator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArtifactGenerator) DeepCopyObject ¶
func (in *ArtifactGenerator) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ArtifactGenerator) GetConditions ¶
func (in *ArtifactGenerator) GetConditions() []metav1.Condition
GetConditions returns the status conditions of the object.
func (*ArtifactGenerator) GetRequeueAfter ¶
func (in *ArtifactGenerator) GetRequeueAfter() time.Duration
GetRequeueAfter returns the duration after which the ArtifactGenerator must be reconciled again.
func (*ArtifactGenerator) HasArtifactInInventory ¶
func (in *ArtifactGenerator) HasArtifactInInventory(name, namespace, digest string) bool
HasArtifactInInventory returns true if the artifact with the given kind, name, namespace, and digest exists in the inventory.
func (*ArtifactGenerator) IsDisabled ¶
func (in *ArtifactGenerator) IsDisabled() bool
IsDisabled returns true if the object has the reconcile annotation set to 'disabled'.
func (*ArtifactGenerator) SetConditions ¶
func (in *ArtifactGenerator) SetConditions(conditions []metav1.Condition)
SetConditions sets the status conditions on the object.
func (*ArtifactGenerator) SetLastHandledReconcileAt ¶
func (in *ArtifactGenerator) SetLastHandledReconcileAt(value string)
SetLastHandledReconcileAt sets the last handled reconcile time in the status.
type ArtifactGeneratorList ¶
type ArtifactGeneratorList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ArtifactGenerator `json:"items"`
}
ArtifactGeneratorList contains a list of ArtifactGenerator.
func (*ArtifactGeneratorList) DeepCopy ¶
func (in *ArtifactGeneratorList) DeepCopy() *ArtifactGeneratorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactGeneratorList.
func (*ArtifactGeneratorList) DeepCopyInto ¶
func (in *ArtifactGeneratorList) DeepCopyInto(out *ArtifactGeneratorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArtifactGeneratorList) DeepCopyObject ¶
func (in *ArtifactGeneratorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ArtifactGeneratorSpec ¶
type ArtifactGeneratorSpec struct {
// Sources is a list of references to the Flux source-controller
// resources that will be used to generate the artifact.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=1000
// +required
Sources []SourceReference `json:"sources"`
// OutputArtifacts is a list of output artifacts to be generated.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=1000
// +required
OutputArtifacts []OutputArtifact `json:"artifacts"`
}
ArtifactGeneratorSpec defines the desired state of ArtifactGenerator.
func (*ArtifactGeneratorSpec) DeepCopy ¶
func (in *ArtifactGeneratorSpec) DeepCopy() *ArtifactGeneratorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactGeneratorSpec.
func (*ArtifactGeneratorSpec) DeepCopyInto ¶
func (in *ArtifactGeneratorSpec) DeepCopyInto(out *ArtifactGeneratorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ArtifactGeneratorStatus ¶
type ArtifactGeneratorStatus struct {
gotkmeta.ReconcileRequestStatus `json:",inline"`
// Conditions holds the conditions for the ArtifactGenerator.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Inventory contains the list of generated ExternalArtifact references.
// +optional
Inventory []ExternalArtifactReference `json:"inventory,omitempty"`
// ObservedSourcesDigest is a hash representing the current state of
// all the sources referenced by the ArtifactGenerator.
// +optional
ObservedSourcesDigest string `json:"observedSourcesDigest,omitempty"`
}
ArtifactGeneratorStatus defines the observed state of ArtifactGenerator.
func (*ArtifactGeneratorStatus) DeepCopy ¶
func (in *ArtifactGeneratorStatus) DeepCopy() *ArtifactGeneratorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactGeneratorStatus.
func (*ArtifactGeneratorStatus) DeepCopyInto ¶
func (in *ArtifactGeneratorStatus) DeepCopyInto(out *ArtifactGeneratorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CopyOperation ¶
type CopyOperation struct {
// From specifies the source (by alias) and the glob pattern to match files.
// The format is "@<alias>/<glob-pattern>".
// +kubebuilder:validation:Pattern="^@([a-z0-9]([a-z0-9_-]*[a-z0-9])?)/(.*)$"
// +kubebuilder:validation:MaxLength=1024
// +required
From string `json:"from"`
// To specifies the destination path within the artifact.
// The format is "@artifact/path", the alias "artifact"
// refers to the root path of the generated artifact.
// +kubebuilder:validation:Pattern="^@(artifact)/(.*)$"
// +kubebuilder:validation:MaxLength=1024
// +required
To string `json:"to"`
// Exclude specifies a list of glob patterns to exclude
// files and dirs matched by the 'From' field.
// +kubebuilder:validation:MaxItems=100
// +optional
Exclude []string `json:"exclude,omitempty"`
// Strategy specifies the copy strategy to use.
// 'Overwrite' will overwrite existing files in the destination.
// 'Merge' is for merging YAML files using Helm values merge strategy.
// If not specified, defaults to 'Overwrite'.
// +optional
// +kubebuilder:validation:Enum=Overwrite;Merge
Strategy string `json:"strategy,omitempty"`
}
func (*CopyOperation) DeepCopy ¶
func (in *CopyOperation) DeepCopy() *CopyOperation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CopyOperation.
func (*CopyOperation) DeepCopyInto ¶
func (in *CopyOperation) DeepCopyInto(out *CopyOperation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExternalArtifactReference ¶
type ExternalArtifactReference struct {
// Name of the referent artifact.
// +required
Name string `json:"name"`
// Namespace of the referent artifact.
// +required
Namespace string `json:"namespace"`
// Digest of the referent artifact.
// +required
Digest string `json:"digest"`
// Filename is the name of the artifact file.
// +required
Filename string `json:"filename"`
}
ExternalArtifactReference contains the reference to a generated ExternalArtifact along with its digest.
func (*ExternalArtifactReference) DeepCopy ¶
func (in *ExternalArtifactReference) DeepCopy() *ExternalArtifactReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalArtifactReference.
func (*ExternalArtifactReference) DeepCopyInto ¶
func (in *ExternalArtifactReference) DeepCopyInto(out *ExternalArtifactReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObservedSource ¶
type ObservedSource struct {
// Digest is the artifact digest of the upstream source.
// +required
Digest string `json:"digest"`
// Revision is the artifact revision of the upstream source.
// +required
Revision string `json:"revision"`
// OriginRevision holds the origin revision of the upstream source,
// extracted from the 'org.opencontainers.image.revision' annotation,
// if available in the source artifact metadata.
// +optional
OriginRevision string `json:"originRevision,omitempty"`
// URL is the artifact URL of the upstream source.
// +required
URL string `json:"url"`
}
ObservedSource contains the observed state of an artifact source. This is used to track the state of the sources used to generate an artifact in the ArtifactGeneratorStatus.ObservedSourcesDigest field.
func (*ObservedSource) DeepCopy ¶
func (in *ObservedSource) DeepCopy() *ObservedSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservedSource.
func (*ObservedSource) DeepCopyInto ¶
func (in *ObservedSource) DeepCopyInto(out *ObservedSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ObservedSource) String ¶
func (os ObservedSource) String() string
String returns a formatted string representation of the ObservedSource.
type OutputArtifact ¶
type OutputArtifact struct {
// Name is the name of the generated artifact.
// +kubebuilder:validation:Pattern="^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"
// +kubebuilder:validation:MaxLength=253
// +required
Name string `json:"name"`
// Revision is the revision of the generated artifact.
// If specified, it must point to an existing source alias in the format "@<alias>".
// If not specified, the revision is automatically set to the digest of the artifact content.
// +kubebuilder:validation:Pattern="^@([a-z0-9]([a-z0-9_-]*[a-z0-9])?)$"
// +kubebuilder:validation:MaxLength=64
// +optional
Revision string `json:"revision,omitempty"`
// OriginRevision is used to set the 'org.opencontainers.image.revision'
// annotation on the generated artifact metadata.
// If specified, it must point to an existing source alias in the format "@<alias>".
// If the referenced source has an origin revision (e.g. a Git commit SHA),
// it will be used to set the annotation on the generated artifact.
// If the referenced source does not have an origin revision, the field is ignored.
// +kubebuilder:validation:Pattern="^@([a-z0-9]([a-z0-9_-]*[a-z0-9])?)$"
// +kubebuilder:validation:MaxLength=64
// +optional
OriginRevision string `json:"originRevision,omitempty"`
// Copy defines a list of copy operations to perform from the sources to the generated artifact.
// The copy operations are performed in the order they are listed with existing files
// being overwritten by later copy operations.
// +kubebuilder:validation:MinItems=1
// +required
Copy []CopyOperation `json:"copy"`
}
OutputArtifact defines the desired state of an ExternalArtifact generated by the ArtifactGenerator.
func (*OutputArtifact) DeepCopy ¶
func (in *OutputArtifact) DeepCopy() *OutputArtifact
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutputArtifact.
func (*OutputArtifact) DeepCopyInto ¶
func (in *OutputArtifact) DeepCopyInto(out *OutputArtifact)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SourceReference ¶
type SourceReference struct {
// Alias of the source within the ArtifactGenerator context.
// The alias must be unique per ArtifactGenerator, and must consist
// of lower case alphanumeric characters, underscores, and hyphens.
// It must start and end with an alphanumeric character.
// +kubebuilder:validation:Pattern="^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$"
// +kubebuilder:validation:MaxLength=63
// +required
Alias string `json:"alias"`
// Name of the source.
// +kubebuilder:validation:Pattern="^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"
// +kubebuilder:validation:MaxLength=253
// +required
Name string `json:"name"`
// Namespace of the source.
// If not provided, defaults to the same namespace as the ArtifactGenerator.
// +kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
// +optional
Namespace string `json:"namespace,omitempty"`
// Kind of the source.
// +kubebuilder:validation:Enum=Bucket;GitRepository;OCIRepository
// +required
Kind string `json:"kind"`
}
SourceReference contains the reference to a Flux source-controller resource.
func (*SourceReference) DeepCopy ¶
func (in *SourceReference) DeepCopy() *SourceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceReference.
func (*SourceReference) DeepCopyInto ¶
func (in *SourceReference) DeepCopyInto(out *SourceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.