v1alpha1

package
v1.8.17 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

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

type CPUTarget struct {
	// AverageUtilizationPercentage sets the utilization which when exceeded
	// will trigger autoscaling.
	//+kubebuilder:validation:Minimum=0
	//+kubebuilder:validation:Maximum=100
	AverageUtilizationPercentage uint32 `json:"averageUtilizationPercentage"`
}

CPUTarget defines an autoscaler target for the CPU metric If empty, no autoscaling will be done

func (*CPUTarget) DeepCopy

func (in *CPUTarget) DeepCopy() *CPUTarget

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

func (*CPUTarget) DeepCopyInto

func (in *CPUTarget) DeepCopyInto(out *CPUTarget)

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

type Capsule

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

	// Spec holds the specification of the Capsule.
	Spec CapsuleSpec `json:"spec,omitempty"`

	// Status holds the status of the Capsule
	Status CapsuleStatus `json:"status,omitempty"`

	// Scale holds metadata for the HorizontalPodAutoscaler
	Scale Scale `json:"scale,omitempty"`
}

Capsule is the Schema for the capsules API

func (*Capsule) ConvertFrom added in v1.5.0

func (c *Capsule) ConvertFrom(srcRaw conversion.Hub) error

ConvertFrom converts from the Hub version (v1) to this version.

func (*Capsule) ConvertTo added in v1.5.0

func (c *Capsule) ConvertTo(dstRaw conversion.Hub) error

func (*Capsule) DeepCopy

func (in *Capsule) DeepCopy() *Capsule

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

func (*Capsule) DeepCopyInto

func (in *Capsule) DeepCopyInto(out *Capsule)

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

func (*Capsule) DeepCopyObject

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

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

func (*Capsule) SetupWebhookWithManager

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

type CapsuleInterface

type CapsuleInterface struct {
	// Name specifies a descriptive name of the interface.
	Name string `json:"name"`

	// Port specifies what port the interface should have.
	//+kubebuilder:validation:Minimum=1
	//+kubebuilder:validation:Maximum=65535
	Port int32 `json:"port"`

	// Public specifies if and how the interface should be published.
	Public *CapsulePublicInterface `json:"public,omitempty"`
}

CapsuleInterface defines an interface for a capsule

func (*CapsuleInterface) DeepCopy

func (in *CapsuleInterface) DeepCopy() *CapsuleInterface

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

func (*CapsuleInterface) DeepCopyInto

func (in *CapsuleInterface) DeepCopyInto(out *CapsuleInterface)

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

type CapsuleInterfaceIngress

type CapsuleInterfaceIngress struct {
	// Host specifies the DNS name of the Ingress resource
	Host string `json:"host"`
}

CapsuleInterfaceIngress defines that the interface should be exposed as http ingress

func (*CapsuleInterfaceIngress) DeepCopy

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

func (*CapsuleInterfaceIngress) DeepCopyInto

func (in *CapsuleInterfaceIngress) DeepCopyInto(out *CapsuleInterfaceIngress)

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

type CapsuleInterfaceLoadBalancer

type CapsuleInterfaceLoadBalancer struct {
	// Port is the external port on the LoadBalancer
	//+kubebuilder:validation:Minimum=1
	//+kubebuilder:validation:Maximum=65535
	Port int32 `json:"port"`

	// NodePort specifies a NodePort that the Service will use instead of
	// acting as a LoadBalancer.
	NodePort int32 `json:"nodePort,omitempty"`
}

CapsuleInterfaceLoadBalancer defines that the interface should be exposed as a L4 loadbalancer

func (*CapsuleInterfaceLoadBalancer) DeepCopy

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

func (*CapsuleInterfaceLoadBalancer) DeepCopyInto

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

type CapsuleList

type CapsuleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []Capsule `json:"items"`
}

CapsuleList contains a list of Capsule

func (*CapsuleList) DeepCopy

func (in *CapsuleList) DeepCopy() *CapsuleList

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

func (*CapsuleList) DeepCopyInto

func (in *CapsuleList) DeepCopyInto(out *CapsuleList)

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

func (*CapsuleList) DeepCopyObject

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

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

type CapsulePublicInterface

type CapsulePublicInterface struct {
	// Ingress specifies that this interface should be exposed through an
	// Ingress resource. The Ingress field is mutually exclusive with the
	// LoadBalancer field.
	Ingress *CapsuleInterfaceIngress `json:"ingress,omitempty"`

	// LoadBalancer specifies that this interface should be exposed through a
	// LoadBalancer Service. The LoadBalancer field is mutually exclusive with
	// the Ingress field.
	LoadBalancer *CapsuleInterfaceLoadBalancer `json:"loadBalancer,omitempty"`
}

CapsulePublicInterface defines how to publicly expose the interface

func (*CapsulePublicInterface) DeepCopy

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

func (*CapsulePublicInterface) DeepCopyInto

func (in *CapsulePublicInterface) DeepCopyInto(out *CapsulePublicInterface)

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

type CapsuleSpec

type CapsuleSpec struct {
	// Replicas specifies how many replicas the Capsule should have.
	Replicas *int32 `json:"replicas,omitempty"`

	// Image specifies what image the Capsule should run.
	Image string `json:"image"`

	// Command is run as a command in the shell. If left unspecified, the
	// container will run using what is specified as ENTRYPOINT in the
	// Dockerfile.
	Command string `json:"command,omitempty"`

	// Args is a list of arguments either passed to the Command or if Command
	// is left empty the arguments will be passed to the ENTRYPOINT of the
	// docker image.
	Args []string `json:"args,omitempty"`

	// Interfaces specifies the list of interfaces the the container should
	// have. Specifying interfaces will create the corresponding kubernetes
	// Services and Ingresses depending on how the interface is configured.
	Interfaces []CapsuleInterface `json:"interfaces,omitempty"`

	// Env specifies configuration for how the container should obtain
	// environment variables.
	Env *Env `json:"env,omitempty"`

	// Files is a list of files to mount in the container. These can either be
	// based on ConfigMaps or Secrets.
	Files []File `json:"files,omitempty"`

	// Resources describes what resources the Capsule should have access to.
	Resources *v1.ResourceRequirements `json:"resources,omitempty"`

	// ImagePullSecret is a reference to a secret holding docker credentials
	// for the registry of the image.
	ImagePullSecret *v1.LocalObjectReference `json:"imagePullSecret,omitempty"`

	// HorizontalScale describes how the Capsule should scale out
	HorizontalScale HorizontalScale `json:"horizontalScale,omitempty"`

	// ServiceAccountName specifies the name of an existing ServiceAccount
	// which the Capsule should run as.
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// NodeSelector is a selector for what nodes the Capsule should live on.
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}

CapsuleSpec defines the desired state of Capsule

func (*CapsuleSpec) DeepCopy

func (in *CapsuleSpec) DeepCopy() *CapsuleSpec

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

func (*CapsuleSpec) DeepCopyInto

func (in *CapsuleSpec) DeepCopyInto(out *CapsuleSpec)

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

type CapsuleStatus

type CapsuleStatus struct {
	Replicas           uint32           `json:"replicas,omitempty"`
	ObservedGeneration int64            `json:"observedGeneration,omitempty"`
	OwnedResources     []OwnedResource  `json:"ownedResources,omitempty"`
	Deployment         DeploymentStatus `json:"deploymentStatus,omitempty"`
}

CapsuleStatus defines the observed state of Capsule

func (*CapsuleStatus) DeepCopy

func (in *CapsuleStatus) DeepCopy() *CapsuleStatus

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

func (*CapsuleStatus) DeepCopyInto

func (in *CapsuleStatus) DeepCopyInto(out *CapsuleStatus)

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

type DeploymentStatus added in v1.2.5

type DeploymentStatus struct {
	// +kubebuilder:validation:Enum=created;failed
	State   string `json:"state,omitempty"`
	Message string `json:"message,omitempty"`
}

func (*DeploymentStatus) DeepCopy added in v1.2.5

func (in *DeploymentStatus) DeepCopy() *DeploymentStatus

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

func (*DeploymentStatus) DeepCopyInto added in v1.2.5

func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus)

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

type Env added in v1.4.0

type Env struct {
	// Automatic sets wether the capsule should automatically use existing
	// secrets and configmaps which share the same name as the capsule as
	// environment variables.
	Automatic *bool `json:"automatic,omitempty"`

	// From holds a list of references to secrets and configmaps which should
	// be mounted as environment variables.
	From []EnvSource `json:"from,omitempty"`
}

Env defines what secrets and configmaps should be used for environment variables in the capsule.

func (*Env) DeepCopy added in v1.4.0

func (in *Env) DeepCopy() *Env

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

func (*Env) DeepCopyInto added in v1.4.0

func (in *Env) DeepCopyInto(out *Env)

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

type EnvSource added in v1.4.0

type EnvSource struct {
	// ConfigMapName is the name of a ConfigMap in the same namespace as the Capsule
	ConfigMapName string `json:"configMapName,omitempty"`

	// SecretName is the name of a Secret in the same namespace as the Capsule
	SecretName string `json:"secretName,omitempty"`
}

EnvSource holds a reference to either a ConfigMap or a Secret

func (*EnvSource) DeepCopy added in v1.4.0

func (in *EnvSource) DeepCopy() *EnvSource

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

func (*EnvSource) DeepCopyInto added in v1.4.0

func (in *EnvSource) DeepCopyInto(out *EnvSource)

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

type File

type File struct {
	// Path specifies the full path where the File should be mounted including
	// the file name.
	Path string `json:"path"`

	// ConfigMap specifies that this file is based on a key in a ConfigMap. The
	// ConfigMap field is mutually exclusive with Secret.
	ConfigMap *FileContentRef `json:"configMap,omitempty"`

	// Secret specifies that this file is based on a key in a Secret. The
	// Secret field is mutually exclusive with ConfigMap.
	Secret *FileContentRef `json:"secret,omitempty"`
}

File defines a mounted file and where to retrieve the contents from

func (*File) DeepCopy

func (in *File) DeepCopy() *File

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

func (*File) DeepCopyInto

func (in *File) DeepCopyInto(out *File)

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

type FileContentRef

type FileContentRef struct {
	// Name specifies the name of the Secret or ConfigMap.
	Name string `json:"name"`

	// Key specifies the key holding the file contents.
	Key string `json:"key"`
}

FileContentRef defines the name of a config resource and the key from which to retrieve the contents

func (*FileContentRef) DeepCopy

func (in *FileContentRef) DeepCopy() *FileContentRef

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

func (*FileContentRef) DeepCopyInto

func (in *FileContentRef) DeepCopyInto(out *FileContentRef)

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

type HorizontalScale

type HorizontalScale struct {
	// MinReplicas is the minimum amount of replicas that the Capsule should
	// have.
	MinReplicas *uint32 `json:"minReplicas,omitempty"`

	// MaxReplicas is the maximum amount of replicas that the Capsule should
	// have.
	MaxReplicas *uint32 `json:"maxReplicas,omitempty"`

	// CPUTarget specifies that this Capsule should be scaled using CPU
	// utilization.
	CPUTarget CPUTarget `json:"cpuTarget,omitempty"`
}

HorizontalScale defines the policy for the number of replicas of the capsule It can both be configured with autoscaling and with a static number of replicas

func (*HorizontalScale) DeepCopy

func (in *HorizontalScale) DeepCopy() *HorizontalScale

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

func (*HorizontalScale) DeepCopyInto

func (in *HorizontalScale) DeepCopyInto(out *HorizontalScale)

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

type OwnedResource added in v1.2.5

type OwnedResource struct {
	Ref *v1.TypedLocalObjectReference `json:"ref"`
	// +kubebuilder:validation:Enum=created;failed
	State   string `json:"state,omitempty"`
	Message string `json:"message,omitempty"`
}

func (*OwnedResource) DeepCopy added in v1.2.5

func (in *OwnedResource) DeepCopy() *OwnedResource

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

func (*OwnedResource) DeepCopyInto added in v1.2.5

func (in *OwnedResource) DeepCopyInto(out *OwnedResource)

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

type Scale

type Scale struct {
	Replicas uint32 `json:"replicas"`
}

func (*Scale) DeepCopy

func (in *Scale) DeepCopy() *Scale

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

func (*Scale) DeepCopyInto

func (in *Scale) DeepCopyInto(out *Scale)

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