v1alpha1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the addons v1alpha1 API group +kubebuilder:object:generate=true +groupName=addons.managed.openshift.io

Index

Constants

This section is empty.

Variables

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

This section is empty.

Types

type AddonMetadata

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

	Spec   AddonMetadataSpec   `json:"spec,omitempty" validate:"required"`
	Status AddonMetadataStatus `json:"status,omitempty"`
}

AddonMetadata is the Schema for the AddonMetadata API

func (*AddonMetadata) DeepCopy

func (in *AddonMetadata) DeepCopy() *AddonMetadata

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

func (*AddonMetadata) DeepCopyInto

func (in *AddonMetadata) DeepCopyInto(out *AddonMetadata)

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

func (*AddonMetadata) DeepCopyObject

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

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

func (*AddonMetadata) FromYAML

func (a *AddonMetadata) FromYAML(data []byte) error

FromYAML - instantiates an AddonMetadata struct from yaml data

type AddonMetadataList

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

AddonMetadataList contains a list of AddonMetadata

func (*AddonMetadataList) DeepCopy

func (in *AddonMetadataList) DeepCopy() *AddonMetadataList

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

func (*AddonMetadataList) DeepCopyInto

func (in *AddonMetadataList) DeepCopyInto(out *AddonMetadataList)

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

func (*AddonMetadataList) DeepCopyObject

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

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

type AddonMetadataSpec

type AddonMetadataSpec struct {
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^[A-Za-z0-9][A-Za-z0-9-]{0,30}[A-Za-z0-9]$`
	// Unique ID of the addon
	ID string `json:"id" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^[0-9A-Z][A-Za-z0-9-_ ()]+$`
	// Friendly name for the addon, displayed in the UI
	Name string `json:"name" validate:"required"`

	// +kubebuilder:validation:Required
	// Short description for the addon
	Description string `json:"description" validate:"required"`

	// +optional
	// +kubebuilder:validation:Pattern=`^http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+$`
	// Link to the addon documentation
	Link string `json:"link"`

	// +kubebuilder:validation:Required
	// Icon to be shown in UI. Should be around 200px and base64 encoded.
	Icon string `json:"icon" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^api\.openshift\.com/addon-[0-9a-z][0-9a-z-]{0,30}[0-9a-z]$`
	// Kubernetes label for the addon. Needs to match: 'api.openshift.com/<addon-id>'.
	Label string `json:"label" validate:"required"`

	// +kubebuilder:validation:Required
	// Set to true to allow installation of the addon.
	Enabled bool `json:"enabled" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^([A-Za-z -]+ <[0-9A-Za-z_.-]+@redhat\.com>,?)+$`
	// Team or individual responsible for this addon. Needs to match: 'some name <some-email@redhat.com>'.
	AddonOwner string `json:"addonOwner" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^quay\.io/osd-addons/[a-z-]+$`
	// Quay repository for the addon operator. Needs to match: 'quay.io/osd-addons/<my-addon-repo>'.
	QuayRepo string `json:"quayRepo" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^quay\.io/[0-9A-Za-z._-]+/[0-9A-Za-z._-]+(:[A-Za-z0-9._-]+)?$`
	// Quay repository for the testHarness image. Needs to match: 'quay.io/<my-repo>/<my-test-harness>:<my-tag>'.
	TestHarness string `json:"testHarness" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum={AllNamespaces,SingleNamespace,OwnNamespace}
	// OLM InstallMode for the addon operator. One of: AllNamespaces, SingleNamespace or OwnNamespace.
	InstallMode string `json:"installMode" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^[A-Za-z0-9][A-Za-z0-9-]{0,60}[A-Za-z0-9]$`
	// Namespace where the addon operator should be installed.
	TargetNamespace string `json:"targetNamespace" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:UniqueItems=true
	// Namespaces managed by the addon-operator. Need to include the TargetNamespace.
	Namespaces []string `json:"namespaces" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^[A-Za-z0-9][A-Za-z0-9-_]{0,35}[A-Za-z0-9]$`
	// Refers to the SKU name for the addon.
	OcmQuotaName string `json:"ocmQuotaName" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum=0
	// TODO: what is this?
	OcmQuotaCost int `json:"ocmQuotaCost" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^[A-Za-z0-9][A-Za-z0-9-]{0,30}[A-Za-z0-9]$`
	// Name of the addon operator.
	OperatorName string `json:"operatorName" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum={alpha,beta,stable,edge,rc}
	// OLM channel from which to install the addon-operator. One of: alpha, beta, stable, edge or rc.
	DefaultChannel string `json:"defaultChannel" validate:"required"`

	// +kubebuilder:validation:Required
	// List of channels where the addon operator is available.
	Channels []Channel `json:"channels" validate:"required,gt=0"`

	// +kubebuilder:validation:Required
	// +kubebuilder:default:{}
	// Labels to be applied on all listed namespaces.
	NamespaceLabels map[string]string `json:"namespaceLabels" validate:"required"`

	// +kubebuilder:validation:Required
	// +kubebuilder:default:{}
	// Annotations to be applied on all listed namespaces.
	NamespaceAnnotations map[string]string `json:"namespaceAnnotations" validate:"required"`

	// +optional
	// +kubebuilder:validation:Pattern=`^quay\.io/osd-addons/[a-z-]+`
	IndexImage string `json:"indexImage"`
}

AddonMetadataSpec defines the desired state of AddonMetadata View markers: $ controller-gen -www crd TODO add missing fields from schema, only required fields from jsonschema are present

func (*AddonMetadataSpec) DeepCopy

func (in *AddonMetadataSpec) DeepCopy() *AddonMetadataSpec

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

func (*AddonMetadataSpec) DeepCopyInto

func (in *AddonMetadataSpec) DeepCopyInto(out *AddonMetadataSpec)

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

func (*AddonMetadataSpec) FromYAML added in v0.1.0

func (a *AddonMetadataSpec) FromYAML(data []byte) error

FromYAML - instantiates an AddonMetadata struct from yaml data

type AddonMetadataStatus

type AddonMetadataStatus struct {
}

AddonMetadataStatus defines the observed state of AddonMetadata

func (*AddonMetadataStatus) DeepCopy

func (in *AddonMetadataStatus) DeepCopy() *AddonMetadataStatus

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

func (*AddonMetadataStatus) DeepCopyInto

func (in *AddonMetadataStatus) DeepCopyInto(out *AddonMetadataStatus)

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

type Channel

type Channel struct {
	Name       string `json:"name"`
	CurrentCSV string `json:"currentCSV"`
}

Channel - list all channels for a given operator

func (*Channel) DeepCopy

func (in *Channel) DeepCopy() *Channel

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

func (*Channel) DeepCopyInto

func (in *Channel) DeepCopyInto(out *Channel)

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