v1beta1

package
v1.0.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: Apache-2.0 Imports: 8 Imported by: 6

Documentation

Overview

Package v1beta1 contains API Schema definitions for the Halkyon Component v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=halkyon.io

Index

Constants

View Source
const (
	// CapabilityParameterNamePrefix is a string prefixed to all capability parameters needed to pass information to capability
	// implementations
	CapabilityParameterNamePrefix = "halkyon."
	// TargetComponentDefaultParameterName is the parameter name of the parameter recording which component is requesting the
	// capability
	TargetComponentDefaultParameterName = CapabilityParameterNamePrefix + "target.component"
	// TargetDeploymentDefaultParameterName is the parameter name of the parameter recording the name of the deployment
	// associated to the component requesting the capability
	TargetDeploymentDefaultParameterName = CapabilityParameterNamePrefix + "target.deployment"
	// TargetPortDefaultParameterName is the parameter name of the parameter recording the port of the service associated to
	// the component requesting the capability
	TargetPortDefaultParameterName = CapabilityParameterNamePrefix + "target.port"
)
View Source
const (
	// PushReady means that component is ready to accept pushed code but might not be ready to accept requests yet
	PushReady = "PushReady"
	// Building means that the Build mode has been configured and that a build task is running
	Building = "Building"
)
View Source
const Kind string = "Component"
View Source
const PodNameAttributeKey = "PodName"

Variables

View Source
var (
	// SchemeGroupVersion is the group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: api.GroupName, Version: api.V1Beta1Version}

	// AddToScheme is a function which adds this version to a scheme
	AddToScheme = schemeBuilder.AddToScheme
)
View Source
var PodGVK = schema.GroupVersionKind{
	Group:   "",
	Version: "v1",
	Kind:    "Pod",
}

Functions

func AddCapabilityParameterIfNeeded

func AddCapabilityParameterIfNeeded(parameter common.NameValuePair, toCapability *v1beta1.Capability) (updated bool)

AddCapabilityParameterIfNeeded adds the specified parameter to the specified capability, returning whether the capability was updated as a result

func AddDefaultCapabilityParameters

func AddDefaultCapabilityParameters(toCapability *v1beta1.Capability, fromComponent *Component) (updated bool)

AddDefaultCapabilityParameters adds default parameters to the specified capability based on the information provided by the specified component, returning whether the capability was updated as a result. Default parameter names use constants ending with `DefaultParameterName`.

Types

type BuildConfig

type BuildConfig struct {
	// Type is the mode that we would like to use to perform a container image build.
	// Optional. By default it is equal to s2i.
	Type string `json:"type,omitempty"`
	// URL is the Http or Web address of the Git repo to be cloned from the platforms such as : github, bitbucket, gitlab, ...
	// The syntax of the URL is : HTTPS://<git_server>/<git_org>/project.git
	URL string `json:"url"`
	// Ref is the git reference of the repo.
	// Optional. By default it is equal to "master".
	Ref string `json:"ref"`
	// moduleDirName is the name of the maven module / directory where build should be done.
	// Optional. By default, it is equal to "."
	ModuleDirName string `json:"moduleDirName,omitempty"`
	// contextPath is the directory relative to the git repository where the s2i build must take place.
	// Optional. By default, it is equal to "."
	ContextPath string `json:"contextPath,omitempty"`
	// Container image to be used as Base or From to build the final image
	BaseImage string `json:"baseImage,omitempty"`
}

func (*BuildConfig) DeepCopy

func (in *BuildConfig) DeepCopy() *BuildConfig

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

func (*BuildConfig) DeepCopyInto

func (in *BuildConfig) DeepCopyInto(out *BuildConfig)

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

type CapabilitiesConfig

type CapabilitiesConfig struct {
	Requires []RequiredCapabilityConfig `json:"requires,omitempty"`
	Provides []CapabilityConfig         `json:"provides,omitempty"`
}

func (*CapabilitiesConfig) DeepCopy

func (in *CapabilitiesConfig) DeepCopy() *CapabilitiesConfig

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

func (*CapabilitiesConfig) DeepCopyInto

func (in *CapabilitiesConfig) DeepCopyInto(out *CapabilitiesConfig)

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

type CapabilityConfig

type CapabilityConfig struct {
	Name string                 `json:"name"`
	Spec v1beta1.CapabilitySpec `json:"spec"`
}

func (*CapabilityConfig) DeepCopy

func (in *CapabilityConfig) DeepCopy() *CapabilityConfig

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

func (*CapabilityConfig) DeepCopyInto

func (in *CapabilityConfig) DeepCopyInto(out *CapabilityConfig)

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 +k8s:openapi-gen=true +genclient

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) DeploymentName

func (in *Component) DeploymentName() string

func (*Component) DeploymentNameFor

func (in *Component) DeploymentNameFor(mode DeploymentMode) string

func (*Component) GetGroupVersionKind

func (in *Component) GetGroupVersionKind() schema.GroupVersionKind

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 ComponentSpec

type ComponentSpec struct {
	// DeploymentMode indicates the strategy to be adopted to install the resources into a namespace
	// and next to create a pod. 2 strategies are currently supported; inner and outer loop
	// where outer loop refers to a build of the code and the packaging of the application into a container's image
	// while the inner loop will install a pod's running a supervisord daemon used to trigger actions such as : assemble, run, ...
	DeploymentMode DeploymentMode `json:"deploymentMode,omitempty"`
	// Runtime is the framework/language used to start with a linux's container an application.
	// It corresponds to one of the following values: spring-boot, vertx, thorntail, nodejs, python, php, ruby
	// It will be used to select the appropriate runtime image and logic
	Runtime string `json:"runtime,omitempty"`
	// Runtime's version
	Version string `json:"version,omitempty"`
	// To indicate if we want to expose the service out side of the cluster as a route
	ExposeService bool `json:"exposeService,omitempty"`
	// Port is the HTTP/TCP port number used within the pod by the runtime
	Port int32 `json:"port,omitempty"`
	// Storage allows to specify the capacity and mode of the volume to be mounted for the pod
	Storage Storage `json:"storage,omitempty"`
	// Array of env variables containing extra/additional info to be used to configure the runtime
	Envs     []common.NameValuePair `json:"envs,omitempty"`
	Revision string                 `json:"revision,omitempty"`
	// Build configuration used to execute a TekTon Build task
	BuildConfig  BuildConfig        `json:"buildConfig,omitempty"`
	Capabilities CapabilitiesConfig `json:"capabilities,omitempty"`
}

ComponentSpec defines the desired state of Component +k8s:openapi-gen=true

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 ComponentStatus

type ComponentStatus struct {
	common.Status `json:",inline"`
}

ComponentStatus defines the observed state of Component +k8s:openapi-gen=true

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.

func (ComponentStatus) GetAssociatedPodName

func (in ComponentStatus) GetAssociatedPodName() string

func (ComponentStatus) IsPushReady

func (in ComponentStatus) IsPushReady() bool

type DeploymentMode

type DeploymentMode string
const (
	DevDeploymentMode   DeploymentMode = "dev"
	BuildDeploymentMode DeploymentMode = "build"
)

func (DeploymentMode) Equals

func (dm DeploymentMode) Equals(other DeploymentMode) bool

func (DeploymentMode) String

func (dm DeploymentMode) String() string

type RequiredCapabilityConfig

type RequiredCapabilityConfig struct {
	CapabilityConfig `json:",inline"`
	BoundTo          string `json:"boundTo,omitempty"`
	AutoBindable     bool   `json:"autoBindable,omitempty"`
}

func (*RequiredCapabilityConfig) DeepCopy

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

func (*RequiredCapabilityConfig) DeepCopyInto

func (in *RequiredCapabilityConfig) DeepCopyInto(out *RequiredCapabilityConfig)

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

type Storage

type Storage struct {
	Name     string `json:"name,omitempty"`
	Capacity string `json:"capacity,omitempty"`
	Mode     string `json:"mode,omitempty"`
}

func (*Storage) DeepCopy

func (in *Storage) DeepCopy() *Storage

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

func (*Storage) DeepCopyInto

func (in *Storage) DeepCopyInto(out *Storage)

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