v1alpha1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the registry v1alpha1 API group +kubebuilder:object:generate=true +groupName=registry.devfile.io

Index

Constants

View Source
const (
	InvalidRegistry  = "" /* 151-byte string literal not displayed */
	InvalidNamespace = "the namespace 'default' is forbidden for the devfile registry deployment. Retry the deployment using a non-default namespace"
)

Variables

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

func IsNamespaceValid(namespace string) error

IsNamespaceValid determines if given namespace for deployment is valid.

func IsRegistryValid

func IsRegistryValid(skipTLSVerify bool, url string) error

Types

type ClusterDevfileRegistriesList

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

	Spec   DevfileRegistriesListSpec   `json:"spec,omitempty"`
	Status DevfileRegistriesListStatus `json:"status,omitempty"`
}

ClusterDevfileRegistriesList is a custom resource where cluster admins can add a list of Devfile Registries to allow devfiles to be visible at the cluster level. In order to be added to the list, the Devfile Registries must be reachable, supports the Devfile v2.0 spec and above, and is not using the default namespace.

func (*ClusterDevfileRegistriesList) DeepCopy

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

func (*ClusterDevfileRegistriesList) DeepCopyInto

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

func (*ClusterDevfileRegistriesList) DeepCopyObject

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

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

func (*ClusterDevfileRegistriesList) Default

func (r *ClusterDevfileRegistriesList) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*ClusterDevfileRegistriesList) SetupWebhookWithManager

func (r *ClusterDevfileRegistriesList) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ClusterDevfileRegistriesList) ValidateCreate

func (r *ClusterDevfileRegistriesList) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*ClusterDevfileRegistriesList) ValidateDelete

func (r *ClusterDevfileRegistriesList) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*ClusterDevfileRegistriesList) ValidateUpdate

func (r *ClusterDevfileRegistriesList) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ClusterDevfileRegistriesListList

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

ClusterDevfileRegistriesListList contains a list of ClusterDevfileRegistriesList

func (*ClusterDevfileRegistriesListList) DeepCopy

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

func (*ClusterDevfileRegistriesListList) DeepCopyInto

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

func (*ClusterDevfileRegistriesListList) DeepCopyObject

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

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

type DevfileRegistriesList

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

	Spec   DevfileRegistriesListSpec   `json:"spec,omitempty"`
	Status DevfileRegistriesListStatus `json:"status,omitempty"`
}

DevfileRegistriesList is a custom resource where namespace users can add a list of Devfile Registries to allow devfiles to be visible at the namespace level. In order to be added to the list, the Devfile Registries must be reachable, supports the Devfile v2.0 spec and above, and is not using the default namespace.

func (*DevfileRegistriesList) DeepCopy

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

func (*DevfileRegistriesList) DeepCopyInto

func (in *DevfileRegistriesList) DeepCopyInto(out *DevfileRegistriesList)

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

func (*DevfileRegistriesList) DeepCopyObject

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

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

func (*DevfileRegistriesList) Default

func (r *DevfileRegistriesList) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*DevfileRegistriesList) SetupWebhookWithManager

func (r *DevfileRegistriesList) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*DevfileRegistriesList) ValidateCreate

func (r *DevfileRegistriesList) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*DevfileRegistriesList) ValidateDelete

func (r *DevfileRegistriesList) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*DevfileRegistriesList) ValidateUpdate

func (r *DevfileRegistriesList) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type DevfileRegistriesListList

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

DevfileRegistriesListList contains a list of DevfileRegistriesList

func (*DevfileRegistriesListList) DeepCopy

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

func (*DevfileRegistriesListList) DeepCopyInto

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

func (*DevfileRegistriesListList) DeepCopyObject

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

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

type DevfileRegistriesListSpec

type DevfileRegistriesListSpec struct {

	// DevfileRegistries is a list of devfile registry services
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	DevfileRegistries []DevfileRegistryService `json:"devfileRegistries"`
}

DevfileRegistriesListSpec defines the desired state of DevfileRegistriesList

func (*DevfileRegistriesListSpec) DeepCopy

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

func (*DevfileRegistriesListSpec) DeepCopyInto

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

type DevfileRegistriesListStatus

type DevfileRegistriesListStatus struct {

	// Conditions shows the state of this CR's devfile registry list.  If registries are no longer reachable, they will be listed here
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

DevfileRegistriesListStatus defines the observed state of DevfileRegistriesList

func (*DevfileRegistriesListStatus) DeepCopy

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

func (*DevfileRegistriesListStatus) DeepCopyInto

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

type DevfileRegistry

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

	Spec   DevfileRegistrySpec   `json:"spec,omitempty"`
	Status DevfileRegistryStatus `json:"status,omitempty"`
}

DevfileRegistry is a custom resource allows you to create and manage your own index server and registry viewer. In order to be added, the Devfile Registry must be reachable, supports the Devfile v2.0 spec and above, and is not using the default namespace. +kubebuilder:resource:path=devfileregistries,shortName=devreg;dr +kubebuilder:subresource:status +kubebuilder:printcolumn:name="URL",type="string",JSONPath=".status.url",description="The URL for the Devfile Registry"

func (*DevfileRegistry) DeepCopy

func (in *DevfileRegistry) DeepCopy() *DevfileRegistry

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

func (*DevfileRegistry) DeepCopyInto

func (in *DevfileRegistry) DeepCopyInto(out *DevfileRegistry)

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

func (*DevfileRegistry) DeepCopyObject

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

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

func (*DevfileRegistry) Default

func (r *DevfileRegistry) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*DevfileRegistry) SetupWebhookWithManager

func (r *DevfileRegistry) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*DevfileRegistry) ValidateCreate

func (r *DevfileRegistry) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*DevfileRegistry) ValidateDelete

func (r *DevfileRegistry) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*DevfileRegistry) ValidateUpdate

func (r *DevfileRegistry) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type DevfileRegistryList

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

DevfileRegistryList contains a list of DevfileRegistry

func (*DevfileRegistryList) DeepCopy

func (in *DevfileRegistryList) DeepCopy() *DevfileRegistryList

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

func (*DevfileRegistryList) DeepCopyInto

func (in *DevfileRegistryList) DeepCopyInto(out *DevfileRegistryList)

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

func (*DevfileRegistryList) DeepCopyObject

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

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

type DevfileRegistryService

type DevfileRegistryService struct {
	// Name is the unique Name of the devfile registry.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name string `json:"name"`
	// URL is the unique URL of the devfile registry.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	URL string `json:"url"`
	// SkipTLSVerify defaults to false.  Set to true in a non-production environment to bypass certificate checking
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	SkipTLSVerify bool `json:"skipTLSVerify"`
}

DevfileRegistryService represents the properties used to identify a devfile registry service.

func (*DevfileRegistryService) DeepCopy

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

func (*DevfileRegistryService) DeepCopyInto

func (in *DevfileRegistryService) DeepCopyInto(out *DevfileRegistryService)

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

type DevfileRegistrySpec

type DevfileRegistrySpec struct {
	// Sets the devfile index container spec to be deployed on the Devfile Registry
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	DevfileIndex DevfileRegistrySpecContainer `json:"devfileIndex,omitempty"`
	// Sets the OCI registry container spec to be deployed on the Devfile Registry
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	OciRegistry DevfileRegistrySpecContainer `json:"ociRegistry,omitempty"`
	// Sets the registry viewer container spec to be deployed on the Devfile Registry
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	RegistryViewer DevfileRegistrySpecContainer `json:"registryViewer,omitempty"`

	// Sets the container image containing devfile stacks to be deployed on the Devfile Registry
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	// +deprecated
	DevfileIndexImage string `json:"devfileIndexImage,omitempty"`

	// Overrides the container image used for the OCI registry.
	// Recommended to leave blank and default to the image specified by the operator.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	// +deprecated
	OciRegistryImage string `json:"ociRegistryImage,omitempty"`
	// Overrides the container image used for the registry viewer.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	// +deprecated
	RegistryViewerImage string `json:"registryViewerImage,omitempty"`

	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Storage DevfileRegistrySpecStorage `json:"storage,omitempty"`
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	TLS DevfileRegistrySpecTLS `json:"tls,omitempty"`
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	K8s DevfileRegistrySpecK8sOnly `json:"k8s,omitempty"`
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Telemetry DevfileRegistrySpecTelemetry `json:"telemetry,omitempty"`
	// Sets the registry server deployment to run under headless mode
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Headless *bool `json:"headless,omitempty"`
}

DevfileRegistrySpec defines the desired state of DevfileRegistry

func (*DevfileRegistrySpec) DeepCopy

func (in *DevfileRegistrySpec) DeepCopy() *DevfileRegistrySpec

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

func (*DevfileRegistrySpec) DeepCopyInto

func (in *DevfileRegistrySpec) DeepCopyInto(out *DevfileRegistrySpec)

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

type DevfileRegistrySpecContainer

type DevfileRegistrySpecContainer struct {
	// Sets the container image
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Image string `json:"image,omitempty"`
	// Sets the image pull policy for the container
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
}

DevfileRegistrySpecContainer defines the desired state of a container for the DevfileRegistry

func (*DevfileRegistrySpecContainer) DeepCopy

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

func (*DevfileRegistrySpecContainer) DeepCopyInto

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

type DevfileRegistrySpecK8sOnly

type DevfileRegistrySpecK8sOnly struct {
	// Ingress domain for a Kubernetes cluster. This MUST be explicitly specified on Kubernetes. There are no defaults
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	IngressDomain string `json:"ingressDomain,omitempty"`
}

DevfileRegistrySpecK8sOnly defines the desired state of the kubernetes-only fields of the DevfileRegistry

func (*DevfileRegistrySpecK8sOnly) DeepCopy

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

func (*DevfileRegistrySpecK8sOnly) DeepCopyInto

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

type DevfileRegistrySpecStorage

type DevfileRegistrySpecStorage struct {
	// Instructs the operator to deploy the DevfileRegistry with persistent storage
	// Disabled by default.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Enabled *bool `json:"enabled,omitempty"`

	// Configures the size of the devfile registry's persistent volume, if enabled.
	// Defaults to 1Gi.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	RegistryVolumeSize string `json:"registryVolumeSize,omitempty"`
}

DevfileRegistrySpecStorage defines the desired state of the storage for the DevfileRegistry

func (*DevfileRegistrySpecStorage) DeepCopy

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

func (*DevfileRegistrySpecStorage) DeepCopyInto

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

type DevfileRegistrySpecTLS

type DevfileRegistrySpecTLS struct {
	// Instructs the operator to deploy the DevfileRegistry with TLS enabled.
	// Enabled by default. Disabling is only recommended for development or test.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Enabled *bool `json:"enabled,omitempty"`

	// Name of an optional, pre-existing TLS secret to use for TLS termination on ingress/route resources.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	SecretName string `json:"secretName,omitempty"`
}

DevfileRegistrySpecTLS defines the desired state for TLS in the DevfileRegistry

func (*DevfileRegistrySpecTLS) DeepCopy

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

func (*DevfileRegistrySpecTLS) DeepCopyInto

func (in *DevfileRegistrySpecTLS) DeepCopyInto(out *DevfileRegistrySpecTLS)

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

type DevfileRegistrySpecTelemetry

type DevfileRegistrySpecTelemetry struct {
	// The registry name (can be any string) that is used as identifier for devfile telemetry.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	RegistryName string `json:"registryName"`

	// Specify a telemetry key to allow devfile specific data to be sent to a client's own Segment analytics source.
	// If the write key is specified then telemetry will be enabled
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Key string `json:"key,omitempty"`

	// Specify a telemetry write key for the registry viewer component to allow data to be sent to a client's own Segment analytics source.
	// If the write key is specified then telemetry for the registry viewer component will be enabled
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	RegistryViewerWriteKey string `json:"registryViewerWriteKey,omitempty"`
}

Telemetry defines the desired state for telemetry in the DevfileRegistry

func (*DevfileRegistrySpecTelemetry) DeepCopy

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

func (*DevfileRegistrySpecTelemetry) DeepCopyInto

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

type DevfileRegistryStatus

type DevfileRegistryStatus struct {
	// URL is the exposed URL for the Devfile Registry, and is set in the status after the registry has become available.
	// +operator-sdk:csv:customresourcedefinitions:type=status
	URL string `json:"url"`

	// Conditions shows the state devfile registries.
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

DevfileRegistryStatus defines the observed state of DevfileRegistry

func (*DevfileRegistryStatus) DeepCopy

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

func (*DevfileRegistryStatus) DeepCopyInto

func (in *DevfileRegistryStatus) DeepCopyInto(out *DevfileRegistryStatus)

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