v1alpha1

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the delivery v1alpha1 API group +kubebuilder:object:generate=true +groupName=delivery.ocm.software

Package v1alpha1 contains API Schema definitions for the delivery v1alpha1 API group +kubebuilder:object:generate=true +groupName=delivery.ocm.software

Index

Constants

View Source
const (
	// AuthenticationFailedReason is used when we couldn't authenticate the OCM context.
	AuthenticationFailedReason = "AuthenticationFailed"

	// PullingLatestVersionFailedReason is used when we couldn't pull the latest version for a controller.
	PullingLatestVersionFailedReason = "PullingLatestVersionFailed"

	// SemverConversionFailedReason is used when we couldn't convert a version to semver.
	SemverConversionFailedReason = "SemverConversionFailed"

	// GetComponentDescriptorFailedReason is used when the component descriptor cannot be retrieved.
	GetComponentDescriptorFailedReason = "GetComponentDescriptorFailed"

	// TransferFailedReason is used when we fail to transfer a component.
	TransferFailedReason = "TransferFailed"

	// ComponentSigningFailedReason is used when we can't sign the component that will be transferred.
	ComponentSigningFailedReason = "ComponentSigningFailed"
)
View Source
const (
	// InternalSignatureName is the internal name used for a signature.
	InternalSignatureName = "replication-controller-signed"
)
View Source
const (
	// LevelDebug defines the log level debug messages are put out at.
	LevelDebug = 4
)
View Source
const (
	// ProductDescriptionType defines the type of the ProductDescription resource in the component version.
	ProductDescriptionType = "productdescription.mpas.ocm.software"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "delivery.ocm.software", 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

This section is empty.

Types

type Component added in v0.2.1

type Component struct {
	// Name specifies the component name.
	Name string `json:"name"`

	// Version specifies the component version.
	Version string `json:"version"`

	// Version specifies the component registry.
	Registry Registry `json:"registry"`
}

Component holds information about a reconciled component.

func (*Component) DeepCopy added in v0.2.1

func (in *Component) DeepCopy() *Component

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

func (*Component) DeepCopyInto added in v0.2.1

func (in *Component) DeepCopyInto(out *Component)

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

type ComponentSubscription

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

	Spec   ComponentSubscriptionSpec   `json:"spec,omitempty"`
	Status ComponentSubscriptionStatus `json:"status,omitempty"`
}

ComponentSubscription is the Schema for the componentsubscriptions API.

func (*ComponentSubscription) DeepCopy

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

func (*ComponentSubscription) DeepCopyInto

func (in *ComponentSubscription) DeepCopyInto(out *ComponentSubscription)

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

func (*ComponentSubscription) DeepCopyObject

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

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

func (ComponentSubscription) GetComponentVersion added in v0.2.1

func (in ComponentSubscription) GetComponentVersion() Component

GetComponentVersion returns a constructed component version with name, version and reconciled location.

func (*ComponentSubscription) GetConditions

func (in *ComponentSubscription) GetConditions() []metav1.Condition

GetConditions returns the conditions of the ComponentVersion.

func (ComponentSubscription) GetRequeueAfter

func (in ComponentSubscription) GetRequeueAfter() time.Duration

GetRequeueAfter returns the duration after which the ComponentVersion must be reconciled again.

func (*ComponentSubscription) GetVID added in v0.9.0

func (in *ComponentSubscription) GetVID() map[string]string

func (*ComponentSubscription) SetConditions

func (in *ComponentSubscription) SetConditions(conditions []metav1.Condition)

SetConditions sets the conditions of the ComponentVersion.

func (*ComponentSubscription) SetObservedGeneration added in v0.9.0

func (in *ComponentSubscription) SetObservedGeneration(v int64)

type ComponentSubscriptionList

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

ComponentSubscriptionList contains a list of ComponentSubscription.

func (*ComponentSubscriptionList) DeepCopy

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

func (*ComponentSubscriptionList) DeepCopyInto

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

func (*ComponentSubscriptionList) DeepCopyObject

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

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

type ComponentSubscriptionSpec

type ComponentSubscriptionSpec struct {
	// Component specifies the name of the Component that should be replicated.
	// +required
	Component string `json:"component"`

	// Semver specifies an optional semver constraint that is used to evaluate the component
	// versions that should be replicated.
	//+optional
	Semver string `json:"semver,omitempty"`

	// Source holds the OCM Repository details for the replication source.
	// +required
	Source OCMRepository `json:"source"`

	// Destination holds the destination or target OCM Repository details. The ComponentVersion
	// will be transferred into this repository.
	// +optional
	Destination *OCMRepository `json:"destination,omitempty"`

	// Interval is the reconciliation interval, i.e. at what interval shall a reconciliation happen.
	// This is used to requeue objects for reconciliation in case of success as well as already reconciling objects.
	// +required
	Interval metav1.Duration `json:"interval"`

	// ServiceAccountName can be used to configure access to both destination and source repositories.
	// If service account is defined, it's usually redundant to define access to either source or destination, but
	// it is still allowed to do so.
	// https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// Verify specifies a list signatures that must be verified before a ComponentVersion
	// is replicated.
	// +optional
	Verify []v1alpha1.Signature `json:"verify,omitempty"`
}

ComponentSubscriptionSpec defines the desired state of ComponentSubscription. It specifies the parameters that the replication controller will use to replicate a desired Component from a source OCM repository to a destination OCM repository.

func (*ComponentSubscriptionSpec) DeepCopy

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

func (*ComponentSubscriptionSpec) DeepCopyInto

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

type ComponentSubscriptionStatus

type ComponentSubscriptionStatus struct {
	// LastAttemptedVersion defines the latest version encountered while checking component versions.
	// This might be different from last applied version which should be the latest applied/replicated version.
	// The difference might be caused because of semver constraint or failures during replication.
	// +optional
	LastAttemptedVersion string `json:"lastAttemptedVersion,omitempty"`

	// ObservedGeneration is the last reconciled generation.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// LastAppliedVersion defines the final version that has been applied to the destination component version.
	// +optional
	LastAppliedVersion string `json:"lastAppliedVersion,omitempty"`

	// ReplicatedRepositoryURL defines the final location of the reconciled Component.
	// +optional
	ReplicatedRepositoryURL string `json:"replicatedRepositoryURL,omitempty"`

	// Signature defines a set of internal keys that were used to sign the Component once transferred to the Destination.
	// +optional
	Signature []v1alpha1.Signature `json:"signature,omitempty"`

	// +optional
	// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description=""
	// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description=""
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

ComponentSubscriptionStatus defines the observed state of ComponentSubscription.

func (*ComponentSubscriptionStatus) DeepCopy

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

func (*ComponentSubscriptionStatus) DeepCopyInto

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

type OCMRepository

type OCMRepository struct {
	// URL specifies the URL of the OCI registry.
	// +required
	URL string `json:"url"`

	// SecretRef specifies the credentials used to access the OCI registry.
	// +optional
	SecretRef *v1.LocalObjectReference `json:"secretRef,omitempty"`
}

OCMRepository specifies access details for an OCI based OCM Repository.

func (*OCMRepository) DeepCopy

func (in *OCMRepository) DeepCopy() *OCMRepository

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

func (*OCMRepository) DeepCopyInto

func (in *OCMRepository) DeepCopyInto(out *OCMRepository)

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

type Registry added in v0.2.1

type Registry struct {
	URL string `json:"url"`
}

Registry defines information about the location of a component.

func (*Registry) DeepCopy added in v0.2.1

func (in *Registry) DeepCopy() *Registry

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

func (*Registry) DeepCopyInto added in v0.2.1

func (in *Registry) DeepCopyInto(out *Registry)

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