v1alpha1

package
v0.0.0-...-8019b93 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the appstudio v1alpha1 API group +kubebuilder:object:generate=true +groupName=appstudio.redhat.com

Index

Constants

This section is empty.

Variables

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

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

	Spec   ApplicationSpec   `json:"spec,omitempty"`
	Status ApplicationStatus `json:"status,omitempty"`
}

Application is the Schema for the applications API +kubebuilder:resource:path=applications,shortName=hasapp;ha;app +kubebuilder:subresource:status

func (*Application) DeepCopy

func (in *Application) DeepCopy() *Application

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

func (*Application) DeepCopyInto

func (in *Application) DeepCopyInto(out *Application)

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

func (*Application) DeepCopyObject

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

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

func (*Application) Default

func (r *Application) Default()

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

func (*Application) SetupWebhookWithManager

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

func (*Application) ValidateCreate

func (r *Application) ValidateCreate() error

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

func (*Application) ValidateDelete

func (r *Application) ValidateDelete() error

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

func (*Application) ValidateUpdate

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

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

type ApplicationGitRepository

type ApplicationGitRepository struct {
	// URL refers to the repository URL that should be used.
	// +required
	URL string `json:"url"`

	// Branch corresponds to the branch in the repository that should be used
	Branch string `json:"branch,omitempty"`

	// Context corresponds to the context within the repository that should be used
	Context string `json:"context,omitempty"`
}

ApplicationGitRepository defines a git repository for a given Application resource (either appmodel or gitops)

func (*ApplicationGitRepository) DeepCopy

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

func (*ApplicationGitRepository) DeepCopyInto

func (in *ApplicationGitRepository) DeepCopyInto(out *ApplicationGitRepository)

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

type ApplicationList

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

ApplicationList contains a list of Application

func (*ApplicationList) DeepCopy

func (in *ApplicationList) DeepCopy() *ApplicationList

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

func (*ApplicationList) DeepCopyInto

func (in *ApplicationList) DeepCopyInto(out *ApplicationList)

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

func (*ApplicationList) DeepCopyObject

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

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

type ApplicationSpec

type ApplicationSpec struct {

	// DisplayName refers to the name that an application will be deployed with in App Studio.
	DisplayName string `json:"displayName"`

	// AppModelRepository refers to the git repository that will store the application model (a devfile)
	// Can be the same as GitOps repository.
	// A repository will be generated if this field is left blank.
	AppModelRepository ApplicationGitRepository `json:"appModelRepository,omitempty"`

	// GitOpsRepository refers to the git repository that will store the gitops resources.
	// Can be the same as App Model Repository.
	// A repository will be generated if this field is left blank.
	GitOpsRepository ApplicationGitRepository `json:"gitOpsRepository,omitempty"`

	// Description refers to a brief description of the application.
	Description string `json:"description,omitempty"`
}

ApplicationSpec defines the desired state of Application

func (*ApplicationSpec) DeepCopy

func (in *ApplicationSpec) DeepCopy() *ApplicationSpec

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

func (*ApplicationSpec) DeepCopyInto

func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec)

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

type ApplicationStatus

type ApplicationStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	Conditions []metav1.Condition `json:"conditions"`

	// Devfile corresponds to the devfile representation of the Application resource
	Devfile string `json:"devfile,omitempty"`
}

ApplicationStatus defines the observed state of Application

func (*ApplicationStatus) DeepCopy

func (in *ApplicationStatus) DeepCopy() *ApplicationStatus

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

func (*ApplicationStatus) DeepCopyInto

func (in *ApplicationStatus) DeepCopyInto(out *ApplicationStatus)

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

type Build

type Build struct {
	// The container image that is created during the component build.
	ContainerImage string `json:"containerImage"`
}

Build describes the various build artifacts associated with a given component

func (*Build) DeepCopy

func (in *Build) DeepCopy() *Build

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

func (*Build) DeepCopyInto

func (in *Build) DeepCopyInto(out *Build)

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

type Component

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

	Spec   ComponentSpec   `json:"spec,omitempty"`
	Status ComponentStatus `json:"status,omitempty"`
}

Component is the Schema for the components API +kubebuilder:resource:path=components,shortName=hascmp;hc;comp

func (*Component) DeepCopy

func (in *Component) DeepCopy() *Component

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

func (*Component) DeepCopyInto

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

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

func (*Component) DeepCopyObject

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

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

func (*Component) Default

func (r *Component) Default()

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

func (*Component) SetupWebhookWithManager

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

func (*Component) ValidateCreate

func (r *Component) ValidateCreate() error

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

func (*Component) ValidateDelete

func (r *Component) ValidateDelete() error

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

func (*Component) ValidateUpdate

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

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

type ComponentDetectionDescription

type ComponentDetectionDescription struct {

	// DevfileFound tells if a devfile is found in the component
	DevfileFound bool `json:"devfileFound,omitempty"`

	// Language specifies the language of the component detected
	Language string `json:"language,omitempty"`

	// ProjectType specifies the type of project for the component detected
	ProjectType string `json:"projectType,omitempty"`

	// ComponentStub is a stub of the component detected with all the info gathered from the devfile or service detection
	ComponentStub ComponentSpec `json:"componentStub,omitempty"`
}

ComponentDetectionDescription holds all the information about the component being detected

func (*ComponentDetectionDescription) DeepCopy

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

func (*ComponentDetectionDescription) DeepCopyInto

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

type ComponentDetectionMap

type ComponentDetectionMap map[string]ComponentDetectionDescription

ComponentDetectionMap is a map containing all the components and their detected information

func (ComponentDetectionMap) DeepCopy

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

func (ComponentDetectionMap) DeepCopyInto

func (in ComponentDetectionMap) DeepCopyInto(out *ComponentDetectionMap)

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

type ComponentDetectionQuery

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

	Spec   ComponentDetectionQuerySpec   `json:"spec,omitempty"`
	Status ComponentDetectionQueryStatus `json:"status,omitempty"`
}

ComponentDetectionQuery is the Schema for the componentdetectionqueries API +kubebuilder:resource:path=componentdetectionqueries,shortName=hcdq;compdetection

func (*ComponentDetectionQuery) DeepCopy

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

func (*ComponentDetectionQuery) DeepCopyInto

func (in *ComponentDetectionQuery) DeepCopyInto(out *ComponentDetectionQuery)

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

func (*ComponentDetectionQuery) DeepCopyObject

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

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

type ComponentDetectionQueryList

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

ComponentDetectionQueryList contains a list of ComponentDetectionQuery

func (*ComponentDetectionQueryList) DeepCopy

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

func (*ComponentDetectionQueryList) DeepCopyInto

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

func (*ComponentDetectionQueryList) DeepCopyObject

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

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

type ComponentDetectionQuerySpec

type ComponentDetectionQuerySpec struct {

	// Git Source for a Component
	GitSource GitSource `json:"git"`

	// IsMultiComponent specifies if the component specified has multiple services
	IsMultiComponent bool `json:"isMultiComponent,omitempty"`
}

ComponentDetectionQuerySpec defines the desired state of ComponentDetectionQuery

func (*ComponentDetectionQuerySpec) DeepCopy

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

func (*ComponentDetectionQuerySpec) DeepCopyInto

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

type ComponentDetectionQueryStatus

type ComponentDetectionQueryStatus struct {

	// Condition about the Component CR
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// ComponentDetected gives a list of components and the info from detection
	ComponentDetected ComponentDetectionMap `json:"componentDetected,omitempty"`
}

ComponentDetectionQueryStatus defines the observed state of ComponentDetectionQuery

func (*ComponentDetectionQueryStatus) DeepCopy

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

func (*ComponentDetectionQueryStatus) DeepCopyInto

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

type ComponentList

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

ComponentList contains a list of Component

func (*ComponentList) DeepCopy

func (in *ComponentList) DeepCopy() *ComponentList

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

func (*ComponentList) DeepCopyInto

func (in *ComponentList) DeepCopyInto(out *ComponentList)

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

func (*ComponentList) DeepCopyObject

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

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

type ComponentSource

type ComponentSource struct {
	ComponentSourceUnion `json:",inline"`
}

ComponentSource describes the Component source

func (*ComponentSource) DeepCopy

func (in *ComponentSource) DeepCopy() *ComponentSource

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

func (*ComponentSource) DeepCopyInto

func (in *ComponentSource) DeepCopyInto(out *ComponentSource)

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

type ComponentSourceUnion

type ComponentSourceUnion struct {
	// Git Source for a Component
	GitSource *GitSource `json:"git,omitempty"`

	// Image Source for a Component
	ImageSource *ImageSource `json:"image,omitempty"`
}

+union

func (*ComponentSourceUnion) DeepCopy

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

func (*ComponentSourceUnion) DeepCopyInto

func (in *ComponentSourceUnion) DeepCopyInto(out *ComponentSourceUnion)

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

type ComponentSpec

type ComponentSpec struct {

	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
	// +kubebuilder:validation:MaxLength=63
	// ComponentName is name of the component to be added to the HASApplication
	ComponentName string `json:"componentName"`

	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
	// Application to add the component to
	Application string `json:"application"`

	// Release strategies to apply when releasing this component
	ReleaseStrategies []string `json:"releaseStrategies,omitempty"`

	// Source describes the Component source
	Source ComponentSource `json:"source"`

	// A relative path inside the git repo containing the component
	Context string `json:"context,omitempty"`

	// Compute Resources required by this component
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// The number of replicas to deploy the component with
	Replicas int `json:"replicas,omitempty"`

	// The port to expose the component over
	TargetPort int `json:"targetPort,omitempty"`

	// The route to expose the component with
	Route string `json:"route,omitempty"`

	// An array of environment variables to add to the component
	Env []corev1.EnvVar `json:"env,omitempty"`

	// The build artifacts associated with the component
	Build Build `json:"build,omitempty"`
}

ComponentSpec defines the desired state of Component

func (*ComponentSpec) DeepCopy

func (in *ComponentSpec) DeepCopy() *ComponentSpec

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

func (*ComponentSpec) DeepCopyInto

func (in *ComponentSpec) DeepCopyInto(out *ComponentSpec)

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

type ComponentSrcType

type ComponentSrcType string

ComponentSrcType describes the type of the src for the Component. Only one of the following location type may be specified. +kubebuilder:validation:Enum=Git;Image

const (
	GitComponentSrcType   ComponentSrcType = "Git"
	ImageComponentSrcType ComponentSrcType = "Image"
)

type ComponentStatus

type ComponentStatus struct {

	// Condition about the Component CR
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Webhook URL generated by Builds
	Webhook string `json:"webhook,omitempty"`

	// ContainerImage stores the associated built container image for the component
	ContainerImage string `json:"containerImage,omitempty"`

	// The devfile model for the Component CR
	Devfile string `json:"devfile,omitempty"`

	// GitOps specific status for the Component CR
	GitOps GitOpsStatus `json:"gitops,omitempty"`
}

ComponentStatus defines the observed state of Component

func (*ComponentStatus) DeepCopy

func (in *ComponentStatus) DeepCopy() *ComponentStatus

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

func (*ComponentStatus) DeepCopyInto

func (in *ComponentStatus) DeepCopyInto(out *ComponentStatus)

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

type GitOpsStatus

type GitOpsStatus struct {
	// RepositoryURL is the gitops repository URL for the component
	RepositoryURL string `json:"repositoryURL,omitempty"`

	// Branch is the branch used for the gitops repository
	Branch string `json:"branch,omitempty"`

	// Context is the path within the gitops repository used for the gitops resources
	Context string `json:"context,omitempty"`
}

GitOpsStatus contains GitOps repository-specific status for the component

func (*GitOpsStatus) DeepCopy

func (in *GitOpsStatus) DeepCopy() *GitOpsStatus

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

func (*GitOpsStatus) DeepCopyInto

func (in *GitOpsStatus) DeepCopyInto(out *GitOpsStatus)

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

type GitSource

type GitSource struct {
	// If importing from git, the repository to create the component from
	URL string `json:"url"`

	// Secret containing a Person Access Token to clone a sample, if using private repository
	Secret string `json:"secret,omitempty"`

	// If specified, the devfile at the URL will be used for the component.
	DevfileURL string `json:"devfileUrl,omitempty"`
}

func (*GitSource) DeepCopy

func (in *GitSource) DeepCopy() *GitSource

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

func (*GitSource) DeepCopyInto

func (in *GitSource) DeepCopyInto(out *GitSource)

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

type ImageSource

type ImageSource struct {
	// If importing from git, container image to create the component from
	ContainerImage string `json:"containerImage"`
}

func (*ImageSource) DeepCopy

func (in *ImageSource) DeepCopy() *ImageSource

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

func (*ImageSource) DeepCopyInto

func (in *ImageSource) DeepCopyInto(out *ImageSource)

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