bpm

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Processes           []Process `yaml:"processes,omitempty" json:"processes,omitempty"`
	Ports               []Port    `yaml:"ports,omitempty" json:"ports,omitempty"`
	UnsupportedTemplate bool      `json:"unsupported_template"`
}

Config represent a BPM configuration

func NewConfig

func NewConfig(data []byte) (Config, error)

NewConfig creates a new Config object from the yaml

func (Config) MergeProcesses added in v1.0.0

func (c Config) MergeProcesses(presetProcesses []Process) ([]Process, error)

MergeProcesses adds and updates the preset processes and returns a new list

func (Config) ValidateProcesses added in v1.0.0

func (c Config) ValidateProcesses() error

ValidateProcesses checks if all processes have an executable

type Configs added in v0.2.2

type Configs map[string]Config

Configs holds a collection of BPM configurations by their according job

type Hooks

type Hooks struct {
	PreStart string `yaml:"pre_start,omitempty" json:"pre_start,omitempty"`
}

Hooks from a BPM config

type Limits

type Limits struct {
	Memory    string `yaml:"memory,omitempty" json:"memory,omitempty"`
	OpenFiles int    `yaml:"open_files,omitempty" json:"open_files,omitempty"`
	Processes int    `yaml:"processes,omitempty" json:"processes,omitempty"`
}

Limits from a BPM config

type Port added in v1.0.0

type Port struct {
	Name     string `json:"name"`
	Protocol string `json:"protocol"`
	Internal int    `json:"internal"`
}

Port represents the port to be opened up for this job only for tracing changes.

type Process

type Process struct {
	Name              string              `yaml:"name,omitempty" json:"name,omitempty"`
	Executable        string              `yaml:"executable,omitempty" json:"executable,omitempty"`
	Args              []string            `yaml:"args,omitempty" json:"args,omitempty"`
	Env               map[string]string   `yaml:"env,omitempty" json:"env,omitempty"`
	Workdir           string              `yaml:"workdir,omitempty" json:"workdir,omitempty"`
	Hooks             Hooks               `yaml:"hooks,omitempty" json:"hooks,omitempty"`
	Capabilities      []string            `yaml:"capabilities,omitempty" json:"capabilities,omitempty"`
	Limits            Limits              `yaml:"limits,omitempty" json:"limits,omitempty"`
	Requests          corev1.ResourceList `json:"requests,omitempty" protobuf:"bytes,2,rep,name=requests,casttype=ResourceList,castkey=ResourceName"`
	EphemeralDisk     bool                `yaml:"ephemeral_disk,omitempty" json:"ephemeral_disk,omitempty"`
	PersistentDisk    bool                `yaml:"persistent_disk,omitempty" json:"persistent_disk,omitempty"`
	AdditionalVolumes []Volume            `yaml:"additional_volumes,omitempty" json:"additional_volumes,omitempty"`
	Unsafe            Unsafe              `yaml:"unsafe,omitempty" json:"unsafe,omitempty"`
}

Process from a BPM config

func (*Process) NewEnvs added in v1.0.0

func (p *Process) NewEnvs(overrides []corev1.EnvVar) []corev1.EnvVar

NewEnvs returns a list of k8s env vars, based on the bpm envs, overwritten by the overrides list passed to the function.

func (*Process) UpdateEnv added in v1.0.0

func (p *Process) UpdateEnv(overrides []corev1.EnvVar)

UpdateEnv adds the overrides env vars to the env list of the bpm process

type Unsafe

type Unsafe struct {
	Privileged          bool     `yaml:"privileged,omitempty" json:"privileged,omitempty"`
	UnrestrictedVolumes []Volume `yaml:"unrestricted_volumes,omitempty" json:"unrestricted_volumes,omitempty"`
}

Unsafe from a BPM config

type Volume

type Volume struct {
	Path            string `yaml:"path,omitempty" json:"path,omitempty"`
	Writable        bool   `yaml:"writable,omitempty" json:"writable,omitempty"`
	AllowExecutions bool   `yaml:"allow_executions,omitempty" json:"allow_executions,omitempty"`
	MountOnly       bool   `yaml:"mount_only,omitempty" json:"mount_only,omitempty"`
}

Volume from a BPM config

Jump to

Keyboard shortcuts

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