Documentation
¶
Index ¶
- Constants
- func AddFakeConfig(clientset *fake.Clientset)
- type Image
- type ImageSecret
- type Langruntimes
- func (l *Langruntimes) GetBuildContainer(runtime, depsChecksum string, env []v1.EnvVar, installVolume v1.VolumeMount, ...) (v1.Container, error)
- func (l *Langruntimes) GetCompilationContainer(runtime, funcName string, env []v1.EnvVar, installVolume v1.VolumeMount, ...) (*v1.Container, error)
- func (l *Langruntimes) GetFunctionImage(runtime string) (string, error)
- func (l *Langruntimes) GetImageSecrets(runtime string) ([]v1.LocalObjectReference, error)
- func (l *Langruntimes) GetInitContainerSecrets(runtime, name string) ([]v1.LocalObjectReference, error)
- func (l *Langruntimes) GetLivenessProbeInfo(runtime string, port int) *v1.Probe
- func (l *Langruntimes) GetRuntimeInfo(runtime string) (RuntimeInfo, error)
- func (l *Langruntimes) GetRuntimes() []string
- func (l *Langruntimes) IsValidRuntime(runtime string) bool
- func (l *Langruntimes) ReadConfigMap()
- func (l *Langruntimes) UpdateDeployment(dpm *appsv1.Deployment, volPath, runtime string)
- type RuntimeInfo
- type RuntimeVersion
- type Secret
Constants ¶
const ( // PhaseInstallation - Installation phase name PhaseInstallation = "installation" // PhaseCompilation - Compilation phase name PhaseCompilation = "compilation" // PhaseRuntime - Runtime phase name PhaseRuntime = "runtime" )
Variables ¶
This section is empty.
Functions ¶
func AddFakeConfig ¶ added in v0.4.0
AddFakeConfig initializes configmap for unit tests with fake configuration.
Types ¶
type Image ¶ added in v1.0.0
type Image struct { Phase string `yaml:"phase"` Image string `yaml:"image"` Command string `yaml:"command,omitempty"` Env map[string]string `yaml:"env,omitempty"` Secrets []Secret `yaml:"secrets,omitempty"` }
Image represents the information about a runtime phase
type ImageSecret ¶ added in v0.4.0
type ImageSecret struct {
ImageSecret string `yaml:"imageSecret,omitempty"`
}
ImageSecret for pulling the image
type Langruntimes ¶ added in v0.4.0
type Langruntimes struct { AvailableRuntimes []RuntimeInfo // contains filtered or unexported fields }
Langruntimes struct for getting configmap
func New ¶ added in v0.4.0
func New(config *v1.ConfigMap) *Langruntimes
New initializes a langruntime object
func SetupLangRuntime ¶ added in v0.4.0
func SetupLangRuntime(clientset *fake.Clientset) *Langruntimes
SetupLangRuntime Sets up Langruntime struct
func (*Langruntimes) GetBuildContainer ¶ added in v0.4.0
func (l *Langruntimes) GetBuildContainer(runtime, depsChecksum string, env []v1.EnvVar, installVolume v1.VolumeMount, resources v1.ResourceRequirements) (v1.Container, error)
GetBuildContainer returns a Container definition based on a runtime
func (*Langruntimes) GetCompilationContainer ¶ added in v0.6.0
func (l *Langruntimes) GetCompilationContainer(runtime, funcName string, env []v1.EnvVar, installVolume v1.VolumeMount, resources v1.ResourceRequirements) (*v1.Container, error)
GetCompilationContainer returns a Container definition based on a runtime
func (*Langruntimes) GetFunctionImage ¶ added in v0.4.0
func (l *Langruntimes) GetFunctionImage(runtime string) (string, error)
GetFunctionImage returns the image ID depending on the runtime, its version and function type
func (*Langruntimes) GetImageSecrets ¶ added in v0.4.0
func (l *Langruntimes) GetImageSecrets(runtime string) ([]v1.LocalObjectReference, error)
GetImageSecrets gets the secrets to pull the runtime image
func (*Langruntimes) GetInitContainerSecrets ¶ added in v1.0.8
func (l *Langruntimes) GetInitContainerSecrets(runtime, name string) ([]v1.LocalObjectReference, error)
GetInitContainerSecrets gets the secrets of the init container with name
func (*Langruntimes) GetLivenessProbeInfo ¶ added in v1.0.0
func (l *Langruntimes) GetLivenessProbeInfo(runtime string, port int) *v1.Probe
GetLivenessProbeInfo returs the liveness probe info regarding a runtime
func (*Langruntimes) GetRuntimeInfo ¶ added in v0.4.0
func (l *Langruntimes) GetRuntimeInfo(runtime string) (RuntimeInfo, error)
GetRuntimeInfo returns all the info regarding a runtime
func (*Langruntimes) GetRuntimes ¶ added in v0.4.0
func (l *Langruntimes) GetRuntimes() []string
GetRuntimes returns the list of available runtimes as strings
func (*Langruntimes) IsValidRuntime ¶ added in v0.4.0
func (l *Langruntimes) IsValidRuntime(runtime string) bool
IsValidRuntime returns true if passed runtime name is valid runtime
func (*Langruntimes) ReadConfigMap ¶ added in v0.4.0
func (l *Langruntimes) ReadConfigMap()
ReadConfigMap reads the configmap
func (*Langruntimes) UpdateDeployment ¶ added in v0.4.0
func (l *Langruntimes) UpdateDeployment(dpm *appsv1.Deployment, volPath, runtime string)
UpdateDeployment object in case of custom runtime
type RuntimeInfo ¶
type RuntimeInfo struct { ID string `yaml:"ID"` Versions []RuntimeVersion `yaml:"versions"` LivenessProbeInfo *v1.Probe `yaml:"livenessProbeInfo,omitempty"` DepName string `yaml:"depName"` FileNameSuffix string `yaml:"fileNameSuffix"` }
RuntimeInfo describe the runtime specifics (typical file suffix and dependency file name) and the supported versions
type RuntimeVersion ¶ added in v0.4.0
type RuntimeVersion struct { Name string `yaml:"name"` Version string `yaml:"version"` Images []Image `yaml:"runtimeImage"` ImagePullSecrets []ImageSecret `yaml:"imagePullSecrets,omitempty"` }
RuntimeVersion is a struct with all the info about the images and secrets