container

package
v0.0.0-...-488bbbf Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuiltinEnvContainerID   = "CONTAINER_ID"
	BuiltinEnvNamespace     = "CONTAINER_NAMESPACE"
	BuiltinEnvLabels        = "CONTAINER_LABELS"
	BuiltinEnvAnnotations   = "CONTAINER_ANNOTATIONS"
	BuiltinEnvConfigMapPath = "CONTAINER_CONFIGMAP"
	BuiltinEnvWorkDir       = "CONTAINER_WORK"
	BuiltinEnvHostIP        = "CONTAINER_HOST_IP"
	BuiltinEnvContainerIP   = "CONTAINER_IP"
)

Variables

This section is empty.

Functions

func Deploy

func Deploy(client endpoint.Client, deployment v1.Deployment)

func NewContaienr

func NewContaienr(config ContainerConfig) v1.Container

func NewDeployment

func NewDeployment(config PodConfig, _replica int) appv1.Deployment

func NewPod

func NewPod(config PodConfig) v1.Pod

Types

type ContainerConfig

type ContainerConfig struct {
	Name     string
	Image    string
	CPU      int
	MemoryMb int

	Entrypoint string
	WorkDir    string
}

type PodConfig

type PodConfig struct {
	Container   ContainerConfig
	Namespace   string
	EgressMb    int
	IngressMb   int
	RunAS       int
	Labels      map[string]string
	HostNetwork bool
}

Jump to

Keyboard shortcuts

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