pod

package
v0.0.0-...-9516177 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Name        string
	Image       string
	Command     []string
	Args        []string
	Env         map[string]string
	Mounts      map[string]string
	Privileges  Privileges
	Annotations map[string]string
}

Container represents a container

type Pod

type Pod struct {
	Name       string
	Containers []Container
	Ports      map[int]int
	Privileges Privileges
}

Pod represents a pod

func NewPod

func NewPod(name string, containers []Container, ports map[int]int, privileges Privileges) Pod

NewPod returns a pod with name, containers, ports and privileges

func (*Pod) SHA1Sum

func (pod *Pod) SHA1Sum() (string, error)

SHA1Sum returns the SHA-1 of the textual YAML representation of this pod

type Privileges

type Privileges int

Privileges represents the privileges that a pod sandbox and a container has

const (
	// PrivilegesUnprivileged represents a pod sandbox or a container
	// with no special privileges
	PrivilegesUnprivileged Privileges = 0
	// PrivilegesPrivileged represents a pod sandbox or a container with
	// privileged access
	PrivilegesPrivileged Privileges = 1
	// PrivilegesNetworkPrivileged represents a pod sandbox or a
	// privileged container with node network. Implies
	// PrivilegesPrivileged.
	PrivilegesNetworkPrivileged Privileges = 3
)

Jump to

Keyboard shortcuts

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