v1alpha1

package
v0.0.0-...-74e13a2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the apache v1alpha1 API group +kubebuilder:object:generate=true +groupName=apache.org

Index

Constants

View Source
const (
	// PodStateActive represents PodStatus.State when pod is active to serve requests
	// it's connected in the Service load balancer
	PodStateActive = "ACTIVE"
	// PodStatePending represents PodStatus.State when pod is pending
	PodStatePending = "PENDING"
	// PodStateFailed represents PodStatus.State when pod has failed
	PodStateFailed = "FAILED"
)

Variables

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

type HealthCheckSpec struct {
	// String for the pod readiness health check logic
	ServerReadinessScript string `json:"serverReadinessScript"`
	// String for the pod liveness health check logic
	ServerLivenessScript string `json:"serverLivenessScript,omitempty"`
}

HealthCheckSpec has the liveness and readiness scripts for the server

func (*HealthCheckSpec) DeepCopy

func (in *HealthCheckSpec) DeepCopy() *HealthCheckSpec

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

func (*HealthCheckSpec) DeepCopyInto

func (in *HealthCheckSpec) DeepCopyInto(out *HealthCheckSpec)

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

type ImageSpec

type ImageSpec struct {
	// The name of the application image to be deployed
	ApplicationImage string `json:"applicationImage"`

	// The source code for a webapp to be built and deployed
	WebApp *WebAppSpec `json:"webApp,omitempty"`

	// Pod health checks information
	HealthCheck *HealthCheckSpec `json:"healthCheck,omitempty"`
}

ImageSpec contains the Tomcat application image information

func (*ImageSpec) DeepCopy

func (in *ImageSpec) DeepCopy() *ImageSpec

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

func (*ImageSpec) DeepCopyInto

func (in *ImageSpec) DeepCopyInto(out *ImageSpec)

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

type PodStatus

type PodStatus struct {
	Name  string `json:"name"`
	PodIP string `json:"podIP"`
	// Represent the state of the Pod, it is used especially during scale down.
	// +kubebuilder:validation:Enum=ACTIVE;PENDING;FAILED
	State string `json:"state"`
}

PodStatus defines the observed state of pods running the Tomcat application +k8s:openapi-gen=true

func (*PodStatus) DeepCopy

func (in *PodStatus) DeepCopy() *PodStatus

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

func (*PodStatus) DeepCopyInto

func (in *PodStatus) DeepCopyInto(out *PodStatus)

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

type Tomcat

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

	Spec   TomcatSpec   `json:"spec,omitempty"`
	Status TomcatStatus `json:"status,omitempty"`
}

Tomcat is the Schema for the tomcats API

func (*Tomcat) DeepCopy

func (in *Tomcat) DeepCopy() *Tomcat

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

func (*Tomcat) DeepCopyInto

func (in *Tomcat) DeepCopyInto(out *Tomcat)

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

func (*Tomcat) DeepCopyObject

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

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

type TomcatList

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

TomcatList contains a list of Tomcat

func (*TomcatList) DeepCopy

func (in *TomcatList) DeepCopy() *TomcatList

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

func (*TomcatList) DeepCopyInto

func (in *TomcatList) DeepCopyInto(out *TomcatList)

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

func (*TomcatList) DeepCopyObject

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

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

type TomcatSpec

type TomcatSpec struct {

	// The base for the names of the deployed application resources
	// +kubebuilder:validation:Pattern=^[a-z]([-a-z0-9]*[a-z0-9])?$
	ApplicationName string `json:"applicationName"`
	// The desired number of replicas for the application
	// +kubebuilder:validation:Minimum=0
	Replicas int32 `json:"replicas"`
	// (Deployment method 1) Application image
	Image *ImageSpec `json:"image,omitempty"`
}

TomcatSpec defines the desired state of Tomcat

func (*TomcatSpec) DeepCopy

func (in *TomcatSpec) DeepCopy() *TomcatSpec

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

func (*TomcatSpec) DeepCopyInto

func (in *TomcatSpec) DeepCopyInto(out *TomcatSpec)

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

type TomcatStatus

type TomcatStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// Replicas is the actual number of replicas for the application
	Replicas int32 `json:"replicas"`
	// +listType=atomic
	Pods []PodStatus `json:"pods,omitempty"`
	// +listType=set
	Hosts []string `json:"hosts,omitempty"`
	// Represents the number of pods which are in scaledown process
	// what particular pod is scaling down can be verified by PodStatus
	//
	// Read-only.
	ScalingdownPods int32 `json:"scalingdownPods"`
}

TomcatStatus defines the observed state of Tomcat +kubebuilder:subresource:status

func (*TomcatStatus) DeepCopy

func (in *TomcatStatus) DeepCopy() *TomcatStatus

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

func (*TomcatStatus) DeepCopyInto

func (in *TomcatStatus) DeepCopyInto(out *TomcatStatus)

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

type WebAppSpec

type WebAppSpec struct {
	// Name of the web application (default: ROOT)
	Name string `json:"name,omitempty"`
	// URL for the repository of the application sources
	SourceRepositoryURL string `json:"sourceRepositoryURL"`
	// Branch in the source repository
	SourceRepositoryRef string `json:"sourceRepositoryRef,omitempty"`
	// Subdirectory in the source repository
	SourceRepositoryContextDir string `json:"contextDir,omitempty"`
	// The path on which the application war will be mounted (default:/usr/local/tomcat/webapps/)
	DeployPath string `json:"deployPath,omitempty"`
	// The size that the PersistentVolumeClaim needs to be in order to contain the application war (default 1Gi)
	ApplicationSize string `json:"applicationSize,omitempty"`
	// Image of the container where the web application will be built
	BuilderImage string `json:"builderImage"`
	// The script that the BuilderImage will use to build the application war and move it to /mnt
	BuildScript string `json:"buildScript,omitempty"`
}

WebAppSpec contains all the information required to build a web application before deploying the server

func (*WebAppSpec) DeepCopy

func (in *WebAppSpec) DeepCopy() *WebAppSpec

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

func (*WebAppSpec) DeepCopyInto

func (in *WebAppSpec) DeepCopyInto(out *WebAppSpec)

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