v1

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CapsuleSpecToRolloutConfig added in v1.9.0

func CapsuleSpecToRolloutConfig(spec *platformv1.CapsuleSpec) (*capsule.RolloutConfig, 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) *v1alpha2.CronJob

func CronJobSpecConversion added in v1.9.4

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

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) *v1alpha2.HorizontalScale

func HorizontalScaleSpecConversion added in v1.9.4

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

func InterfaceConversion added in v1.9.0

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

func InterfaceSpecConversion added in v1.9.4

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

func RolloutConfigToCapsuleSpec added in v1.9.0

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

Types

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 (*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 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 (*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 {
	metav1.TypeMeta `json:",inline"`

	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 []v1alpha2.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 EnvironmentVariables `json:"env" protobuf:"12"`

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

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

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

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.

func (*CapsuleSpec) DeepCopyObject added in v1.9.0

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

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

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 string                `json:"name" protobuf:"1"`
	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 {
	Direct  map[string]string   `json:"direct" protobuf:"1"`
	Sources []EnvironmentSource `json:"sources" protobuf:"2"`
}

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"`
}

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

Jump to

Keyboard shortcuts

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