v1

package
v1.12.7 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 29 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

+kubebuilder:object:generate=true +groupName=rig.platform

+kubebuilder:object:generate=true +groupName=rig.platform

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "platform.rig.dev", Version: "v1"}

	// 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

	CapsuleKind    = "Capsule"
	CapsuleSetKind = "CapsuleSet"
)

Functions

func CapsuleCRDToProto added in v1.12.3

func CapsuleCRDToProto(capsule *Capsule, scheme *runtime.Scheme) (*platformv1.Capsule, error)

func CapsuleSetCRDToProto added in v1.12.3

func CapsuleSetCRDToProto(capsule *CapsuleSet, scheme *runtime.Scheme) (*platformv1.CapsuleSet, error)

func CapsuleSetYAMLToProto added in v1.12.3

func CapsuleSetYAMLToProto(bytes []byte) (*platformv1.CapsuleSet, error)

func CapsuleSpecCRDToProto added in v1.12.3

func CapsuleSpecCRDToProto(spec CapsuleSpec, scheme *runtime.Scheme) (*platformv1.CapsuleSpec, error)

func CapsuleSpecToRolloutConfig added in v1.9.0

func CapsuleSpecToRolloutConfig(spec *platformv1.CapsuleSpec) (*capsule.RolloutConfig, error)

func CapsuleSpecYAMLToProto added in v1.12.3

func CapsuleSpecYAMLToProto(bytes []byte) (*platformv1.CapsuleSpec, error)

func CapsuleYAMLToProto added in v1.12.3

func CapsuleYAMLToProto(bytes []byte) (*platformv1.Capsule, error)

func ChangesFromSpecPair added in v1.9.4

func ChangesFromSpecPair(curSpec, newSpec *platformv1.CapsuleSpec) ([]*capsule.Change, error)

func ConfigFileSpecConversion added in v1.9.4

func ConfigFileSpecConversion(c *platformv1.File) *capsule.ConfigFile

func ContainerSettingsSpecConversion added in v1.9.4

func ContainerSettingsSpecConversion(spec *platformv1.CapsuleSpec) (*capsule.ContainerSettings, error)

func CronJobConversion added in v1.9.0

func CronJobConversion(j *capsule.CronJob) *platformv1.CronJob

func CronJobSpecConversion added in v1.9.4

func CronJobSpecConversion(j *platformv1.CronJob) *capsule.CronJob

func DefaultCapsuleSpec added in v1.12.3

func DefaultCapsuleSpec() *platformv1.CapsuleSpec

func EnvironmentSourceConversion added in v1.9.0

func EnvironmentSourceConversion(source *capsule.EnvironmentSource) (*platformv1.EnvironmentSource, error)

func EnvironmentSourceSpecConversion added in v1.9.4

func EnvironmentSourceSpecConversion(source *platformv1.EnvironmentSource) *capsule.EnvironmentSource

func FeedContainerSettings added in v1.9.0

func FeedContainerSettings(spec *platformv1.CapsuleSpec, containerSettings *capsule.ContainerSettings) error

func HorizontalScaleConversion added in v1.9.0

func HorizontalScaleConversion(horizontal *capsule.HorizontalScale, replicas uint32) *platformv1.HorizontalScale

func HorizontalScaleSpecConversion added in v1.9.4

func HorizontalScaleSpecConversion(spec *platformv1.HorizontalScale) *capsule.HorizontalScale

func InitialiseProto added in v1.12.3

func InitialiseProto(msg proto.Message)

func InterfaceConversion added in v1.9.0

func InterfaceConversion(i *capsule.Interface) (*platformv1.CapsuleInterface, error)

func InterfaceSpecConversion added in v1.9.4

func InterfaceSpecConversion(i *platformv1.CapsuleInterface) *capsule.Interface

func MergeCapsuleSpecs added in v1.10.5

func MergeCapsuleSpecs(patch, into *platformv1.CapsuleSpec) (*platformv1.CapsuleSpec, error)

nolint:lll MergeCapsuleSpec merges a CapsuleSpec into another CapsuleSpec and returns a new object with the merged result It uses StrategicMergePatch (https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/)

func MergeProjectEnv added in v1.10.5

nolint:lll MergeProjectEnv merges a ProjEnvCapsuleBase into a CapsuleSpec and returns a new object with the merged result It uses StrategicMergePatch (https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/)

func NewCapsuleProto added in v1.12.3

func NewCapsuleProto(projectID, environmentID, capsuleID string, spec *platformv1.CapsuleSpec) *platformv1.Capsule

func NewCapsuleSetProto added in v1.12.3

func NewCapsuleSetProto(projectID, capsuleID string, spec *platformv1.CapsuleSpec) *platformv1.CapsuleSet

func ProtoToYAML added in v1.12.3

func ProtoToYAML(m proto.Message) (string, error)

ProtoToYAML converts a proto message to YAML in such a way that it empty structs, maps and lists are not included in the YAML. E.g. it will produce

field1: value1 field2: value2

and not

field1: value1 field2: value2 someList: [] someObj:

child1: {}
child2: []

func RolloutConfigToCapsuleSpec added in v1.9.0

func RolloutConfigToCapsuleSpec(rc *capsule.RolloutConfig) (*platformv1.CapsuleSpec, error)

func ValidString added in v1.10.2

func ValidString(bs []byte) bool

func YAMLToProto added in v1.12.3

func YAMLToProto[T interface{ GetKind() string }](bs []byte, o T, expectedKind string) error

Types

type CPUTarget added in v1.11.6

type CPUTarget struct {
	// Utilization specifies the average CPU target. If the average
	// exceeds this number new instances will be added.
	//+kubebuilder:validation:Minimum=1
	//+kubebuilder:validation:Maximum=100
	Utilization *uint32 `json:"utilization,omitempty" protobuf:"1"`
}

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

func (*CPUTarget) DeepCopy added in v1.11.6

func (in *CPUTarget) DeepCopy() *CPUTarget

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

func (*CPUTarget) DeepCopyInto added in v1.11.6

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

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

func (*CPUTarget) ToK8s added in v1.11.6

func (c *CPUTarget) ToK8s() *v1alpha2.CPUTarget

type Capsule added in v1.9.0

type Capsule struct {
	metav1.TypeMeta `json:",inline"`
	// Name,Project,Environment is unique
	// Project,Name referes to an existing Capsule type with the given name and project
	// Will throw an error (in the platform) if the Capsule does not exist
	Name string `json:"name" protobuf:"3"`
	// Project references an existing Project type with the given name
	// Will throw an error (in the platform) if the Project does not exist
	Project string `json:"project" protobuf:"4"`
	// Environment references an existing Environment type with the given name
	// Will throw an error (in the platform) if the Environment does not exist
	// The environment also needs to be present in the parent Capsule
	Environment string      `json:"environment" protobuf:"5"`
	Spec        CapsuleSpec `json:"spec" protobuf:"6"`
}

+kubebuilder:object:root=true

func CapsuleProtoToCRD added in v1.12.3

func CapsuleProtoToCRD(capsule *platformv1.Capsule, scheme *runtime.Scheme) (*Capsule, error)

func CapsuleProtoToK8s added in v1.10.5

func CapsuleProtoToK8s(spec *platformv1.Capsule, scheme *runtime.Scheme) (*Capsule, error)

func (*Capsule) DeepCopy added in v1.9.0

func (in *Capsule) DeepCopy() *Capsule

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

func (*Capsule) DeepCopyInto added in v1.9.0

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 added in v1.9.0

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

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

type CapsuleInterface added in v1.11.6

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

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

	// Liveness specifies that this interface should be used for
	// liveness probing. Only one of the Capsule interfaces can be
	// used as liveness probe.
	Liveness *InterfaceLivenessProbe `json:"liveness,omitempty" protobuf:"3"`

	// Readiness specifies that this interface should be used for
	// readiness probing. Only one of the Capsule interfaces can be
	// used as readiness probe.
	Readiness *InterfaceReadinessProbe `json:"readiness,omitempty" protobuf:"4"`

	// Host routes that are mapped to this interface.
	Routes []HostRoute `json:"routes,omitempty" protobuf:"6"`
}

CapsuleInterface defines an interface for a capsule

func (*CapsuleInterface) DeepCopy added in v1.11.6

func (in *CapsuleInterface) DeepCopy() *CapsuleInterface

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

func (*CapsuleInterface) DeepCopyInto added in v1.11.6

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

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

func (CapsuleInterface) ToK8s added in v1.11.6

type CapsuleSet added in v1.9.0

type CapsuleSet struct {
	metav1.TypeMeta `json:",inline"`
	// Name,Project is unique
	Name string `json:"name" protobuf:"3"`
	// Project references an existing Project type with the given name
	// Will throw an error (in the platform) if the Project does not exist
	Project string `json:"project" protobuf:"4"`
	// Capsule-level defaults
	Spec            CapsuleSpec            `json:"spec" protobuf:"5"`
	Environments    map[string]CapsuleSpec `json:"environments" protobuf:"6"`
	EnvironmentRefs []string               `json:"environmentRefs" protobuf:"7"`
}

func CapsuleSetProtoToCRD added in v1.12.3

func CapsuleSetProtoToCRD(capsuleSet *platformv1.CapsuleSet, scheme *runtime.Scheme) (*CapsuleSet, error)

func (*CapsuleSet) DeepCopy added in v1.9.0

func (in *CapsuleSet) DeepCopy() *CapsuleSet

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

func (*CapsuleSet) DeepCopyInto added in v1.9.0

func (in *CapsuleSet) DeepCopyInto(out *CapsuleSet)

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

func (*CapsuleSet) DeepCopyObject added in v1.9.0

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

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

type CapsuleSpec added in v1.9.0

type CapsuleSpec struct {
	Annotations map[string]string `json:"annotations" protobuf:"11"`

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

	// 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" protobuf:"4"`

	// 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" protobuf:"5" patchStrategy:"replace"`

	// 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.
	// nolint:lll
	Interfaces []CapsuleInterface `json:"interfaces,omitempty" protobuf:"6" patchMergeKey:"port" patchStrategy:"merge"`

	// Files is a list of files to mount in the container. These can either be
	// based on ConfigMaps or Secrets.
	Files []File `json:"files" protobuf:"7" patchMergeKey:"path" patchStrategy:"merge"`

	// Env defines the environment variables set in the Capsule
	Env EnvironmentVariables `json:"env" protobuf:"12"`

	// Scale specifies the scaling of the Capsule.
	Scale Scale `json:"scale,omitempty" protobuf:"8"`

	CronJobs []CronJob `json:"cronJobs,omitempty" protobuf:"10" patchMergeKey:"name" patchStrategy:"replace"`

	// TODO Move to plugin
	AutoAddRigServiceAccounts bool `json:"autoAddRigServiceAccounts" protobuf:"13"`

	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Type=object
	// Extensions are extra, typed fields defined by the platform for custom behaviour implemented through plugins
	Extensions map[string]json.RawMessage `json:"extensions,omitempty" protobuf:"14"`
}

func CapsuleSpecProtoToCRD added in v1.12.3

func CapsuleSpecProtoToCRD(spec *platformv1.CapsuleSpec, scheme *runtime.Scheme) (CapsuleSpec, error)

func (*CapsuleSpec) DeepCopy added in v1.9.0

func (in *CapsuleSpec) DeepCopy() *CapsuleSpec

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

func (*CapsuleSpec) DeepCopyInto added in v1.9.0

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

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

type CronJob added in v1.11.6

type CronJob struct {
	// +kubebuilder:validation:Required
	Name string `json:"name" protobuf:"1"`
	// +kubebuilder:validation:Required
	Schedule string `json:"schedule" protobuf:"2"`

	URL     *URL        `json:"url,omitempty" protobuf:"3"`
	Command *JobCommand `json:"command,omitempty" protobuf:"4"`
	// Defaults to 6
	MaxRetries     *uint `json:"maxRetries,omitempty" protobuf:"5"`
	TimeoutSeconds *uint `json:"timeoutSeconds,omitempty" protobuf:"6"`
}

func (*CronJob) DeepCopy added in v1.11.6

func (in *CronJob) DeepCopy() *CronJob

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

func (*CronJob) DeepCopyInto added in v1.11.6

func (in *CronJob) DeepCopyInto(out *CronJob)

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

func (CronJob) ToK8s added in v1.11.6

func (c CronJob) ToK8s() v1alpha2.CronJob

type CustomMetric added in v1.11.6

type CustomMetric struct {
	// InstanceMetric defines a custom instance-based metric (pod-metric in Kubernetes lingo)
	InstanceMetric *InstanceMetric `json:"instanceMetric,omitempty" protobuf:"1"`
	// ObjectMetric defines a custom object-based metric
	ObjectMetric *ObjectMetric `json:"objectMetric,omitempty" protobuf:"2"`
}

CustomMetric defines a custom metrics emitted by the custom.metrics.k8s.io API which the autoscaler should scale on Exactly one of InstanceMetric and ObjectMetric must be provided

func (*CustomMetric) DeepCopy added in v1.11.6

func (in *CustomMetric) DeepCopy() *CustomMetric

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

func (*CustomMetric) DeepCopyInto added in v1.11.6

func (in *CustomMetric) DeepCopyInto(out *CustomMetric)

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

func (CustomMetric) ToK8s added in v1.11.6

type Environment

type Environment struct {
	metav1.TypeMeta `json:",inline"`
	// Name is unique
	Name              string `json:"name" protobuf:"3"`
	NamespaceTemplate string `json:"namespaceTemplate" protobuf:"4"`
	OperatorVersion   string `json:"operatorVersion" protobuf:"5"`
	Cluster           string `json:"cluster" protobuf:"6"`
	// Environment level defaults
	Spec           ProjEnvCapsuleBase `json:"spec" protobuf:"7"`
	Ephemeral      bool               `json:"ephemeral" protobuf:"8"`
	ActiveProjects []string           `json:"activeProjects" protobuf:"9"`
	Global         bool               `json:"global" protobuf:"10"`
}

func (*Environment) DeepCopy

func (in *Environment) DeepCopy() *Environment

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

func (*Environment) DeepCopyInto

func (in *Environment) DeepCopyInto(out *Environment)

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

func (*Environment) DeepCopyObject

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

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

type EnvironmentSource

type EnvironmentSource struct {
	// Name is the name of the kubernetes object containing the environment source.
	Name string `json:"name" protobuf:"1"`
	// Kind is the kind of source, either ConfigMap or Secret.
	Kind EnvironmentSourceKind `json:"kind" protobuf:"2"`
}

func (*EnvironmentSource) DeepCopy

func (in *EnvironmentSource) DeepCopy() *EnvironmentSource

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

func (*EnvironmentSource) DeepCopyInto

func (in *EnvironmentSource) DeepCopyInto(out *EnvironmentSource)

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

type EnvironmentSourceKind

type EnvironmentSourceKind string
var (
	EnvironmentSourceKindConfigMap EnvironmentSourceKind = "ConfigMap"
	EnvironmentSourceKindSecret    EnvironmentSourceKind = "Secret"
)

type EnvironmentVariables added in v1.9.0

type EnvironmentVariables struct {
	// Raw is a list of environment variables as key-value pairs.
	Raw map[string]string `json:"raw" protobuf:"1"`
	// Sources is a list of source files which will be injected as environment variables.
	// They can be references to either ConfigMaps or Secrets.
	Sources []EnvironmentSource `json:"sources" protobuf:"2"`
}

EnvironmentVariables defines the environment variables injected into a Capsule.

func (*EnvironmentVariables) DeepCopy added in v1.9.0

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

func (*EnvironmentVariables) DeepCopyInto added in v1.9.0

func (in *EnvironmentVariables) DeepCopyInto(out *EnvironmentVariables)

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

type File added in v1.9.0

type File struct {
	Path     string         `json:"path,omitempty" protobuf:"1"`
	AsSecret bool           `json:"asSecret,omitempty" protobuf:"3"`
	Bytes    *[]byte        `json:"bytes,omitempty" protobuf:"4"`
	String   *string        `json:"string,omitempty" protobuf:"5"`
	Ref      *FileReference `json:"ref,omitempty" protobuf:"6"`
}

func (*File) DeepCopy added in v1.9.0

func (in *File) DeepCopy() *File

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

func (*File) DeepCopyInto added in v1.9.0

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

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

type FileReference added in v1.11.7

type FileReference struct {
	// Kind of reference. Can be either ConfigMap or Secret.
	Kind string `json:"kind" protobuf:"1"`

	// Name of reference.
	Name string `json:"name" protobuf:"2"`

	// Key in reference which holds file contents.
	Key string `json:"key" protobuf:"3"`
}

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

func (*FileReference) DeepCopy added in v1.11.7

func (in *FileReference) DeepCopy() *FileReference

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

func (*FileReference) DeepCopyInto added in v1.11.7

func (in *FileReference) DeepCopyInto(out *FileReference)

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

type HTTPPathRoute added in v1.11.6

type HTTPPathRoute struct {
	// Path of the route.
	Path string `json:"path" protobuf:"1"`
	// The method of matching. By default, `PathPrefix` is used.
	// +kubebuilder:validation:Enum=PathPrefix;Exact;RegularExpression
	Match PathMatchType `json:"match,omitempty" protobuf:"2"`
}

A HTTP path routing.

func (*HTTPPathRoute) DeepCopy added in v1.11.6

func (in *HTTPPathRoute) DeepCopy() *HTTPPathRoute

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

func (*HTTPPathRoute) DeepCopyInto added in v1.11.6

func (in *HTTPPathRoute) DeepCopyInto(out *HTTPPathRoute)

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

func (HTTPPathRoute) ToK8s added in v1.11.6

type HorizontalScale added in v1.10.5

type HorizontalScale struct {
	// Min specifies the minimum amount of instances to run.
	Min uint32 `json:"min" protobuf:"4"`

	// Max specifies the maximum amount of instances to run. Omit to
	// disable autoscaling.
	Max *uint32 `json:"max,omitempty" protobuf:"5"`

	// Instances specifies minimum and maximum amount of Capsule
	// instances.
	// Deprecated; use `min` and `max` instead.
	Instances *Instances `json:"instances,omitempty" protobuf:"1"`

	// CPUTarget specifies that this Capsule should be scaled using CPU
	// utilization.
	CPUTarget *CPUTarget `json:"cpuTarget,omitempty" protobuf:"2"`
	// CustomMetrics specifies custom metrics emitted by the custom.metrics.k8s.io API
	// which the autoscaler should scale on
	CustomMetrics []CustomMetric `json:"customMetrics,omitempty" protobuf:"3" patchStrategy:"replace"`
}

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 added in v1.10.5

func (in *HorizontalScale) DeepCopy() *HorizontalScale

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

func (*HorizontalScale) DeepCopyInto added in v1.10.5

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

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

type HostCapsule added in v1.10.3

type HostCapsule struct {
	metav1.TypeMeta `json:",inline"`
	// Name,Project,Environment is unique
	// Project,Name referes to an existing Capsule type with the given name and project
	// Will throw an error (in the platform) if the Capsule does not exist
	Name string `json:"name" protobuf:"3"`
	// Project references an existing Project type with the given name
	// Will throw an error (in the platform) if the Project does not exist
	Project string `json:"project" protobuf:"4"`
	// Environment references an existing Environment type with the given name
	// Will throw an error (in the platform) if the Environment does not exist
	// The environment also needs to be present in the parent Capsule
	Environment string `json:"environment" protobuf:"5"`

	// Network mapping between the host network and the Kubernetes cluster network. When activated,
	// traffic between the two networks will be tunneled according to the rules specified here.
	Network HostNetwork `json:"network" protobuf:"6"`
}

+kubebuilder:object:root=true

func (*HostCapsule) DeepCopy added in v1.10.3

func (in *HostCapsule) DeepCopy() *HostCapsule

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

func (*HostCapsule) DeepCopyInto added in v1.10.3

func (in *HostCapsule) DeepCopyInto(out *HostCapsule)

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

func (*HostCapsule) DeepCopyObject added in v1.10.3

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

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

type HostNetwork added in v1.10.3

type HostNetwork struct {
	// HostInterfaces are interfaces activated on the local machine (the host) and forwarded
	// to the Kubernetes cluster capsules.
	HostInterfaces []ProxyInterface `json:"hostInterfaces" protobuf:"1"`

	// CapsuleInterfaces are interfaces activated on the Capsule within the Kubernetes cluster
	// and forwarded to the local machine (the host). The traffic is directed to a single target,
	// e.g. `localhost:8080`.
	CapsuleInterface []ProxyInterface `json:"capsuleInterfaces" protobuf:"2"`

	// TunnelPort for which the proxy-capsule should listen on. This is automatically set by the tooling.
	TunnelPort uint32 `json:"tunnelPort,omitempty" protobuf:"3"`
}

func (*HostNetwork) DeepCopy added in v1.10.3

func (in *HostNetwork) DeepCopy() *HostNetwork

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

func (*HostNetwork) DeepCopyInto added in v1.10.3

func (in *HostNetwork) DeepCopyInto(out *HostNetwork)

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

type HostRoute added in v1.11.6

type HostRoute struct {
	// ID of the route. This field is required and cannot be empty, and must be unique for the interface.
	// If this field is changed, it may result in downtime, as it is used to generate resources.
	ID string `json:"id" protobuf:"1"`
	// Host of the route. This field is required and cannot be empty.
	Host string `json:"host" protobuf:"2"`
	// HTTP paths of the host that maps to the interface. If empty, all paths are
	// automatically matched.
	Paths []HTTPPathRoute `json:"paths,omitempty" protobuf:"3"`
	// Options for all paths of this host.
	RouteOptions `json:",inline"`
}

HostRoute is the configuration of a route to the network interface it's configured on.

func (*HostRoute) DeepCopy added in v1.11.6

func (in *HostRoute) DeepCopy() *HostRoute

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

func (*HostRoute) DeepCopyInto added in v1.11.6

func (in *HostRoute) DeepCopyInto(out *HostRoute)

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

func (HostRoute) ToK8s added in v1.11.6

func (h HostRoute) ToK8s() v1alpha2.HostRoute

type InstanceMetric added in v1.11.6

type InstanceMetric struct {
	// +kubebuilder:validation:Required
	// MetricName is the name of the metric
	MetricName string `json:"metricName" protobuf:"1"`
	// MatchLabels is a set of key, value pairs which filters the metric series
	MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"2"`
	// +kubebuilder:validation:Required
	// AverageValue defines the average value across all instances which the autoscaler scales towards
	AverageValue string `json:"averageValue" protobuf:"3"`
}

InstanceMetric defines a custom instance-based metric (pod-metric in Kubernetes lingo)

func (*InstanceMetric) DeepCopy added in v1.11.6

func (in *InstanceMetric) DeepCopy() *InstanceMetric

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

func (*InstanceMetric) DeepCopyInto added in v1.11.6

func (in *InstanceMetric) DeepCopyInto(out *InstanceMetric)

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

func (*InstanceMetric) ToK8s added in v1.11.6

type Instances added in v1.11.6

type Instances struct {
	// Min specifies the minimum amount of instances to run.
	Min uint32 `json:"min" protobuf:"1"`

	// Max specifies the maximum amount of instances to run. Omit to
	// disable autoscaling.
	Max *uint32 `json:"max,omitempty" protobuf:"2"`
}

Instances specifies the minimum and maximum amount of capsule instances.

func (*Instances) DeepCopy added in v1.11.6

func (in *Instances) DeepCopy() *Instances

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

func (*Instances) DeepCopyInto added in v1.11.6

func (in *Instances) DeepCopyInto(out *Instances)

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

func (*Instances) ToK8s added in v1.11.6

func (i *Instances) ToK8s() *v1alpha2.Instances

type InterfaceGRPCProbe added in v1.11.6

type InterfaceGRPCProbe struct {
	// Service specifies the gRPC health probe service to probe. This is a
	// used as service name as per standard gRPC health/v1.
	Service string `json:"service" protobuf:"1"`

	// Enabled controls if the gRPC health check is activated.
	Enabled bool `json:"enabled,omitempty" protobuf:"2"`
}

InterfaceGRPCProbe specifies a GRPC probe.

func (*InterfaceGRPCProbe) DeepCopy added in v1.11.6

func (in *InterfaceGRPCProbe) DeepCopy() *InterfaceGRPCProbe

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

func (*InterfaceGRPCProbe) DeepCopyInto added in v1.11.6

func (in *InterfaceGRPCProbe) DeepCopyInto(out *InterfaceGRPCProbe)

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

func (*InterfaceGRPCProbe) ToK8s added in v1.11.6

type InterfaceLivenessProbe added in v1.11.8

type InterfaceLivenessProbe struct {
	// Path is the HTTP path of the probe. Path is mutually
	// exclusive with the TCP and GCRP fields.
	Path string `json:"path,omitempty" protobuf:"1"`

	// TCP specifies that this is a simple TCP listen probe.
	TCP bool `json:"tcp,omitempty" protobuf:"2"`

	// GRPC specifies that this is a GRCP probe.
	GRPC *InterfaceGRPCProbe `json:"grpc,omitempty" protobuf:"3"`

	// For slow-starting containers, the startup delay allows liveness
	// checks to fail for a set duration before restarting the instance.
	StartupDelay uint32 `json:"startupDelay,omitempty" protobuf:"4"`
}

InterfaceLivenessProbe specifies an interface probe for liveness checks.

func (*InterfaceLivenessProbe) DeepCopy added in v1.11.8

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

func (*InterfaceLivenessProbe) DeepCopyInto added in v1.11.8

func (in *InterfaceLivenessProbe) DeepCopyInto(out *InterfaceLivenessProbe)

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

func (*InterfaceLivenessProbe) ToK8s added in v1.11.8

type InterfaceOptions added in v1.10.3

type InterfaceOptions struct {
	// TCP enables layer-4 proxying in favor of layer-7 HTTP proxying.
	TCP bool `json:"tcp,omitempty" protobuf:"1"`
	// AllowOrigin sets the `Access-Control-Allow-Origin` Header on responses to
	// the provided value, allowing local by-pass of CORS rules.
	// Ignored if TCP is enabled.
	AllowOrigin string `json:"allowOrigin,omitempty" protobuf:"2"`
	// ChangeOrigin changes the Host header to match the given target. If not set,
	// the Host header will be that of the original request.
	// This does not impact the Origin header - use `Headers` to set that.
	// Ignored if TCP is enabled.
	ChangeOrigin bool `json:"changeOrigin,omitempty" protobuf:"3"`
	// Headers to set on the proxy-requests.
	// Ignored if TCP is enabled.
	Headers map[string]string `json:"headers,omitempty" protobuf:"4"`
}

func (*InterfaceOptions) DeepCopy added in v1.10.3

func (in *InterfaceOptions) DeepCopy() *InterfaceOptions

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

func (*InterfaceOptions) DeepCopyInto added in v1.10.3

func (in *InterfaceOptions) DeepCopyInto(out *InterfaceOptions)

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

type InterfaceReadinessProbe added in v1.11.8

type InterfaceReadinessProbe struct {
	// Path is the HTTP path of the probe. Path is mutually
	// exclusive with the TCP and GCRP fields.
	Path string `json:"path,omitempty" protobuf:"1"`

	// TCP specifies that this is a simple TCP listen probe.
	TCP bool `json:"tcp,omitempty" protobuf:"2"`

	// GRPC specifies that this is a GRCP probe.
	GRPC *InterfaceGRPCProbe `json:"grpc,omitempty" protobuf:"3"`
}

InterfaceReadinessProbe specifies an interface probe for readiness checks.

func (*InterfaceReadinessProbe) DeepCopy added in v1.11.8

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

func (*InterfaceReadinessProbe) DeepCopyInto added in v1.11.8

func (in *InterfaceReadinessProbe) DeepCopyInto(out *InterfaceReadinessProbe)

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

func (*InterfaceReadinessProbe) ToK8s added in v1.11.8

type JobCommand added in v1.11.6

type JobCommand struct {
	// +kubebuilder:validation:Required
	Command string   `json:"command" protobuf:"1"`
	Args    []string `json:"args,omitempty" protobuf:"2"`
}

func (*JobCommand) DeepCopy added in v1.11.6

func (in *JobCommand) DeepCopy() *JobCommand

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

func (*JobCommand) DeepCopyInto added in v1.11.6

func (in *JobCommand) DeepCopyInto(out *JobCommand)

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

func (*JobCommand) ToK8s added in v1.11.6

func (j *JobCommand) ToK8s() *v1alpha2.JobCommand

type ObjectMetric added in v1.11.6

type ObjectMetric struct {
	// +kubebuilder:validation:Required
	// MetricName is the name of the metric
	MetricName string `json:"metricName" protobuf:"1"`
	// MatchLabels is a set of key, value pairs which filters the metric series
	MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"2"`
	// AverageValue scales the number of instances towards making the value returned by the metric
	// divided by the number of instances reach AverageValue
	// Exactly one of 'Value' and 'AverageValue' must be set
	AverageValue string `json:"averageValue,omitempty" protobuf:"3"`
	// Value scales the number of instances towards making the value returned by the metric 'Value'
	// Exactly one of 'Value' and 'AverageValue' must be set
	Value string `json:"value,omitempty" protobuf:"4"`
	// +kubebuilder:validation:Required
	// DescribedObject is a reference to the object in the same namespace which is described by the metric
	DescribedObject autoscalingv2.CrossVersionObjectReference `json:"objectReference" protobuf:"5"`
}

ObjectMetric defines a custom object metric for the autoscaler

func (*ObjectMetric) DeepCopy added in v1.11.6

func (in *ObjectMetric) DeepCopy() *ObjectMetric

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

func (*ObjectMetric) DeepCopyInto added in v1.11.6

func (in *ObjectMetric) DeepCopyInto(out *ObjectMetric)

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

func (*ObjectMetric) ToK8s added in v1.11.6

func (o *ObjectMetric) ToK8s() *v1alpha2.ObjectMetric

type PathMatchType added in v1.11.6

type PathMatchType string

PathMatchType specifies the semantics of how HTTP paths should be compared.

const (
	// Exact match type, for when the path should match exactly.
	Exact PathMatchType = "Exact"
	// Path prefix, for when only the prefix needs to match.
	PathPrefix PathMatchType = "PathPrefix"
	// Path regular expression, for when the path should match a regular expression.
	RegularExpression PathMatchType = "RegularExpression"
)

type ProjEnvCapsuleBase

type ProjEnvCapsuleBase struct {
	Files []File               `json:"files,omitempty" protobuf:"1"`
	Env   EnvironmentVariables `json:"env,omitempty" protobuf:"2"`
}

func (*ProjEnvCapsuleBase) DeepCopy

func (in *ProjEnvCapsuleBase) DeepCopy() *ProjEnvCapsuleBase

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

func (*ProjEnvCapsuleBase) DeepCopyInto

func (in *ProjEnvCapsuleBase) DeepCopyInto(out *ProjEnvCapsuleBase)

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

type Project

type Project struct {
	metav1.TypeMeta `json:",inline"`
	// Name is unique
	Name string `json:"name" protobuf:"3"`
	// Project level defaults
	Spec ProjEnvCapsuleBase `json:"spec" protobuf:"4"`
}

func (*Project) DeepCopy

func (in *Project) DeepCopy() *Project

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

func (*Project) DeepCopyInto

func (in *Project) DeepCopyInto(out *Project)

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

func (*Project) DeepCopyObject

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

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

type ProxyInterface added in v1.10.3

type ProxyInterface struct {
	// Port to accept traffic from.
	Port uint32 `json:"port" protobuf:"1"`
	// Target is the address:port to forward traffic to.
	Target string `json:"target" protobuf:"2"`
	// Options to further configure the proxying aspects of the interface.
	Options InterfaceOptions `json:"options,omitempty" protobuf:"3"`
}

func (*ProxyInterface) DeepCopy added in v1.10.3

func (in *ProxyInterface) DeepCopy() *ProxyInterface

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

func (*ProxyInterface) DeepCopyInto added in v1.10.3

func (in *ProxyInterface) DeepCopyInto(out *ProxyInterface)

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

type ResourceLimits added in v1.11.6

type ResourceLimits struct {
	// Request specifies the resource request.
	Request *resource.Quantity `json:"request,omitempty" protobuf:"1"`
	// Limit specifies the resource limit.
	Limit *resource.Quantity `json:"limit,omitempty" protobuf:"2"`
}

ResourceLimits specifies the request and limit of a resource.

func (*ResourceLimits) DeepCopy added in v1.11.6

func (in *ResourceLimits) DeepCopy() *ResourceLimits

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

func (*ResourceLimits) DeepCopyInto added in v1.11.6

func (in *ResourceLimits) DeepCopyInto(out *ResourceLimits)

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

func (*ResourceLimits) ToK8s added in v1.11.6

type ResourceRequest added in v1.11.6

type ResourceRequest struct {
	// Request specifies the request of a resource.
	Request resource.Quantity `json:"request,omitempty" protobuf:"1"`
}

ResourceRequest specifies the request of a resource.

func (*ResourceRequest) DeepCopy added in v1.11.6

func (in *ResourceRequest) DeepCopy() *ResourceRequest

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

func (*ResourceRequest) DeepCopyInto added in v1.11.6

func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest)

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

func (*ResourceRequest) ToK8s added in v1.11.6

type RouteOptions added in v1.11.6

type RouteOptions struct {
	// Annotations of the route option. This can be plugin-specific configuration
	// that allows custom plugins to add non-standard behavior.
	Annotations map[string]string `json:"annotations,omitempty" protobuf:"4"`
}

Route options.

func (*RouteOptions) DeepCopy added in v1.11.6

func (in *RouteOptions) DeepCopy() *RouteOptions

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

func (*RouteOptions) DeepCopyInto added in v1.11.6

func (in *RouteOptions) DeepCopyInto(out *RouteOptions)

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

func (RouteOptions) ToK8s added in v1.11.6

type Scale added in v1.10.5

type Scale struct {
	// Horizontal specifies the horizontal scaling of the Capsule.
	Horizontal HorizontalScale `json:"horizontal,omitempty" protobuf:"1"`

	// Vertical specifies the vertical scaling of the Capsule.
	Vertical *VerticalScale `json:"vertical,omitempty" protobuf:"2"`
}

func (*Scale) DeepCopy added in v1.10.5

func (in *Scale) DeepCopy() *Scale

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

func (*Scale) DeepCopyInto added in v1.10.5

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

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

type URL added in v1.11.6

type URL struct {
	// +kubebuilder:validation:Required
	Port uint16 `json:"port" protobuf:"1"`
	// +kubebuilder:validation:Required
	Path            string            `json:"path" protobuf:"2"`
	QueryParameters map[string]string `json:"queryParameters,omitempty" protobuf:"3"`
}

func (*URL) DeepCopy added in v1.11.6

func (in *URL) DeepCopy() *URL

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

func (*URL) DeepCopyInto added in v1.11.6

func (in *URL) DeepCopyInto(out *URL)

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

func (*URL) ToK8s added in v1.11.6

func (u *URL) ToK8s() *v1alpha2.URL

type VerticalScale added in v1.11.6

type VerticalScale struct {
	// CPU specifies the CPU resource request and limit
	CPU *ResourceLimits `json:"cpu,omitempty" protobuf:"1"`

	// Memory specifies the Memory resource request and limit
	Memory *ResourceLimits `json:"memory,omitempty" protobuf:"2"`

	// GPU specifies the GPU resource request and limit
	GPU *ResourceRequest `json:"gpu,omitempty" protobuf:"3"`
}

VerticalScale specifies the vertical scaling of the Capsule.

func (*VerticalScale) DeepCopy added in v1.11.6

func (in *VerticalScale) DeepCopy() *VerticalScale

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

func (*VerticalScale) DeepCopyInto added in v1.11.6

func (in *VerticalScale) DeepCopyInto(out *VerticalScale)

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

func (*VerticalScale) ToK8s added in v1.11.6

func (v *VerticalScale) ToK8s() *v1alpha2.VerticalScale

Jump to

Keyboard shortcuts

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