v1alpha1

package
v0.0.0-...-031a9af Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group +kubebuilder:object:generate=true +groupName=apps.console.dev

Index

Constants

View Source
const (
	StatusFieldApplicationURL string = "ApplicationURL"
)

Variables

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

type BuildConfiguration struct {
	// BuilderImage is the builder image to use for building the application
	// +kubebuilder:validation:Optional
	BuilderImage BuilderImage `json:"builderImage,omitempty"`

	// BuildOption is the build option to use for building the application
	// +kubebuilder:default=BuildConfig
	// +kubebuilder:validation:Optional
	BuildOption BuildOption `json:"buildOption,omitempty"`

	// Env is the environment variables to set during the build
	// +kubebuilder:validation:Optional
	// +kubebuilder:default={}
	Env []corev1.EnvVar `json:"env,omitempty"`
}

BuildConfiguration defines the build configuration

func (*BuildConfiguration) DeepCopy

func (in *BuildConfiguration) DeepCopy() *BuildConfiguration

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

func (*BuildConfiguration) DeepCopyInto

func (in *BuildConfiguration) DeepCopyInto(out *BuildConfiguration)

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

type BuildOption

type BuildOption string

BuildOption defines the type of build option +kubebuilder:validation:Enum=BuildConfig

const (
	// BuildOptionBuildConfig is used for building applications using OpenShift BuildConfig(v1) Resource
	BuildOptionBuildConfig BuildOption = "BuildConfig"
)

type BuilderImage

type BuilderImage struct {
	// Image is the builder image to use for building the application
	// +kubebuilder:validation:Required
	Image string `json:"image,omitempty"`

	// Tag is the tag of the builder image to use for building the application
	// +kubebuilder:validation:Required
	Tag string `json:"tag,omitempty"`
}

BuilderImage defines the builder image details to use for building the application when ImportStrategyType is "BuilderImage"

func (*BuilderImage) DeepCopy

func (in *BuilderImage) DeepCopy() *BuilderImage

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

func (*BuilderImage) DeepCopyInto

func (in *BuilderImage) DeepCopyInto(out *BuilderImage)

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

type ConditionReason

type ConditionReason string

ConditionReason is a static/programmatic representation of the cause of a status condition.

const (
	// ReasonOperatorResourceNotAvailable indicates the operator resource is not available
	ReasonOperatorResourceNotAvailable ConditionReason = "OperatorResourceNotAvailable"

	// ReasonSecretResourceNotFound indicates the secret resource is not found
	ReasonSecretResourceNotFound ConditionReason = "SecretResourceNotFound"

	// ReasonInit indicates the resource is initializing
	ReasonInit ConditionReason = "Init"

	// ReasonRequirementsNotMet indicates the reconciliation failed
	ReasonRequirementsNotMet ConditionReason = "RequirementsNotMet"
	//ReasonRequirementsBeingMet indicates the reconciliation is in progress
	ReasonRequirementsBeingMet ConditionReason = "RequirementsBeingMet"
	// ReasonRequirementsMet indicates the reconciliation completed
	ReasonRequirementsMet ConditionReason = "RequirementsMet"

	// ReasonAllResourcesReady indicates all resources are ready
	ReasonAllResourcesReady ConditionReason = "AllResourcesReady"
)

ConditionReason is used to define the reason for the status of the operator.

func (ConditionReason) String

func (r ConditionReason) String() string

String casts the value to string.

type ConditionType

type ConditionType string

ConditionType defines what condition type this is.

const (
	// ConditionOperatorDegraded is True if the operator is in a degraded state
	ConditionOperatorDegraded ConditionType = "OperatorDegraded"
	// ConditionProgressing is True when the operator is progressing
	ConditionProgressing ConditionType = "Progressing"
	// ConditionGitRepoReachable is True if the Git repository is reachable
	ConditionGitRepoReachable ConditionType = "GitRepoReachable"
	// ConditionReady is True when the application is ready
	ConditionReady ConditionType = "Ready"
)

ConditionType is used to define the type of status of the operator.

func (ConditionType) String

func (c ConditionType) String() string

String casts the value to string.

type ConsoleApplication

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

	Spec   ConsoleApplicationSpec   `json:"spec,omitempty"`
	Status ConsoleApplicationStatus `json:"status,omitempty"`
}

ConsoleApplication is the Schema for the consoleapplications API

func (*ConsoleApplication) DeepCopy

func (in *ConsoleApplication) DeepCopy() *ConsoleApplication

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

func (*ConsoleApplication) DeepCopyInto

func (in *ConsoleApplication) DeepCopyInto(out *ConsoleApplication)

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

func (*ConsoleApplication) DeepCopyObject

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

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

type ConsoleApplicationList

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

ConsoleApplicationList contains a list of ConsoleApplication

func (*ConsoleApplicationList) DeepCopy

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

func (*ConsoleApplicationList) DeepCopyInto

func (in *ConsoleApplicationList) DeepCopyInto(out *ConsoleApplicationList)

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

func (*ConsoleApplicationList) DeepCopyObject

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

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

type ConsoleApplicationSpec

type ConsoleApplicationSpec struct {
	// ApplicationName is the name of the application. This is used to group the resources created for the application.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default="console-application"
	ApplicationName string `json:"applicationName,omitempty"`

	// Git is the git repository details
	// +kubebuilder:validation:Required
	Git Git `json:"git,omitempty"`

	// ImportStrategy is the import strategy to use for importing the application
	// +kubebuilder:validation:Required
	ImportStrategy ImportStrategyType `json:"importStrategy,omitempty"`

	// BuildConfiguration is the build configuration
	// +kubebuilder:validation:Required
	BuildConfiguration BuildConfiguration `json:"buildConfig,omitempty"`

	// ResourceConfiguration is the deployment configuration
	// +kubebuilder:validation:Required
	ResourceConfiguration ResourceConfiguration `json:"resourceConfig,omitempty"`
}

ConsoleApplicationSpec defines the desired state of ConsoleApplication

func (*ConsoleApplicationSpec) DeepCopy

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

func (*ConsoleApplicationSpec) DeepCopyInto

func (in *ConsoleApplicationSpec) DeepCopyInto(out *ConsoleApplicationSpec)

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

type ConsoleApplicationStatus

type ConsoleApplicationStatus struct {
	Conditions     []metav1.Condition `json:"conditions,omitempty"`
	ApplicationURL string             `json:"applicationURL,omitempty"`
}

ConsoleApplicationStatus defines the observed state of ConsoleApplication

func (*ConsoleApplicationStatus) DeepCopy

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

func (*ConsoleApplicationStatus) DeepCopyInto

func (in *ConsoleApplicationStatus) DeepCopyInto(out *ConsoleApplicationStatus)

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

type Expose

type Expose struct {
	// TargetPort is the port where the application is running
	// +kubebuilder:validation:Required
	// +kubebuilder:default=8080
	TargetPort *int32 `json:"targetPort,omitempty"`

	// CreateRoute is a flag to create a route for the application
	// +kubebuilder:default=true
	// +kubebuilder:validation:Optional
	CreateRoute bool `json:"createRoute,omitempty"`
}

Expose defines the OpenShift Route configuration

func (*Expose) DeepCopy

func (in *Expose) DeepCopy() *Expose

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

func (*Expose) DeepCopyInto

func (in *Expose) DeepCopyInto(out *Expose)

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

type Git

type Git struct {
	// URL is the git repository URL
	// +kubebuilder:validation:Required
	Url string `json:"url,omitempty"`

	// ContextDir is the directory within the git repository to use as the context for the build
	// +kubebuilder:default=/
	// +kubebuilder:validation:Optional
	ContextDir string `json:"contextDir,omitempty"`

	// Reference is the branch, tag, or commit
	// +kubebuilder:default=main
	// +kubebuilder:validation:Optional
	Reference string `json:"reference,omitempty"`

	// SourceSecretRef is the reference to the secret containing the git credentials
	// +kubebuilder:validation:Optional
	SourceSecretRef string `json:"sourceSecretRef,omitempty"`
}

Git defines the git repository details

func (*Git) DeepCopy

func (in *Git) DeepCopy() *Git

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

func (*Git) DeepCopyInto

func (in *Git) DeepCopyInto(out *Git)

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

type ImportStrategyType

type ImportStrategyType string

ImportStrategyType defines the type of import strategy +kubebuilder:validation:Enum=BuilderImage;Dockerfile

const (
	// ImportStrategyBuilderImage is used for building applications using a builder image
	ImportStrategyBuilderImage ImportStrategyType = "BuilderImage"

	// ImportStrategyDockerfile is used for building applications using a Dockerfile
	ImportStrategyDockerfile ImportStrategyType = "Dockerfile"
)

type ResourceConfiguration

type ResourceConfiguration struct {
	// ResourceType is the type of resource to deploy the application
	// +kubebuilder:validation:Required
	ResourceType ResourceType `json:"resourceType,omitempty"`

	// Env is the environment variables to set during the deployment
	// +kubebuilder:validation:Optional
	// +kubebuilder:default={}
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Expose is the OpenShift Route configuration
	// +kubebuilder:validation:Required
	Expose Expose `json:"expose,omitempty"`

	// Replicas is the number of replicas to deploy
	// +kubebuilder:default=1
	// +kubebuilder:validation:Optional
	Replicas *int32 `json:"replicas,omitempty"`
}

ResourceConfiguration defines the deployment configuration

func (*ResourceConfiguration) DeepCopy

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

func (*ResourceConfiguration) DeepCopyInto

func (in *ResourceConfiguration) DeepCopyInto(out *ResourceConfiguration)

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

type ResourceType

type ResourceType string

ResourceType defines the type of resource to deploy the application +kubebuilder:validation:Enum=Deployment

const (
	// ResourceTypeDeployment is used for deploying applications as a Kubernetes Deployment
	ResourceTypeDeployment ResourceType = "Deployment"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL