v1.0.8 Latest Latest

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 12 Imported by: 6




View Source
const (
	// PhaseInstallation - Installation phase name
	PhaseInstallation = "installation"
	// PhaseCompilation - Compilation phase name
	PhaseCompilation = "compilation"
	// PhaseRuntime - Runtime phase name
	PhaseRuntime = "runtime"


This section is empty.


func AddFakeConfig added in v0.4.0

func AddFakeConfig(clientset *fake.Clientset)

AddFakeConfig initializes configmap for unit tests with fake configuration.


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

type Secret added in v1.0.8

type Secret struct {
	Name string `yaml:"name,omitempty"`

Secret is a reference to a secret.

Jump to

Keyboard shortcuts

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