kubernetes

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

Types

type Containers

type Containers struct {
	Name            string          `yaml:"name,omitempty"`
	Command         []string        `yaml:"command,omitempty"`
	Image           string          `yaml:"image,omitempty"`
	Resources       Resources       `yaml:"resources,omitempty"`
	WorkingDir      string          `yaml:"workingDir,omitempty"`
	SecurityContext SecurityContext `yaml:"securityContext,omitempty"`
	VolumeMounts    []VolumeMounts  `yaml:"volumeMounts,omitempty"`
	Env             []EnvVar        `yaml:"env,omitempty"`
	Ports           []Port          `yaml:"ports,omitempty"`
	Lifecycle       Lifecycle       `yaml:"lifecycle,omitempty"`
}

type EnvVar

type EnvVar struct {
	Name  interface{} `yaml:"name,omitempty"`
	Value interface{} `yaml:"value,omitempty"`
}

type Exec

type Exec struct {
	Command []string `yaml:"command,omitempty"`
}

type Handler

type Handler struct {
	Exec Exec `yaml:"exec,omitempty"`
}

type Kubernetes

type Kubernetes struct {
	Services    []KubesService
	Deployments []KubesDeployment
}

func (Kubernetes) MarshalToFile

func (k Kubernetes) MarshalToFile(path string) error

func (Kubernetes) UnmarshalFromFile

func (k Kubernetes) UnmarshalFromFile(path string) error

type KubesDeployment

type KubesDeployment struct {
	ApiVersion string   `yaml:"apiVersion,omitempty"`
	Kind       string   `yaml:"kind,omitempty"`
	Metadata   Metadata `yaml:"metadata,omitempty"`
	Spec       Spec     `yaml:"spec,omitempty"`
}

type KubesService

type KubesService struct {
	ApiVersion string   `yaml:"apiVersion,omitempty"`
	Kind       string   `yaml:"kind,omitempty"`
	Metadata   Metadata `yaml:"metadata,omitempty"`
	Spec       Spec     `yaml:"spec,omitempty"`
}

type Lifecycle

type Lifecycle struct {
	PostStart Handler `yaml:"postStart,omitempty"`
	PreStop   Handler `yaml:"preStop,omitempty"`
}

type Limits

type Limits struct {
	Cpu    int    `yaml:"cpu,omitempty"`
	Memory string `yaml:"memory,omitempty"`
}

type Metadata

type Metadata struct {
	Name   string            `yaml:"name,omitempty"`
	Labels map[string]string `yaml:"labels,omitempty"`
}

type PodSpec

type PodSpec struct {
	Containers                    []Containers `yaml:"containers,omitempty"`
	TerminationGracePeriodSeconds int          `yaml:"terminationGracePeriodSeconds,omitempty"`
}

type Port

type Port struct {
	Name          string `yaml:"name,omitempty"`
	Port          int    `yaml:"port,omitempty"`
	Protocol      string `yaml:"protocol,omitempty"`
	TargetPort    int    `yaml:"targetPort,omitempty"`
	ContainerPort int    `yaml:"containerPort,omitempty"`
	NodePort      int    `yaml:"nodePort,omitempty"`
}

type Resources

type Resources struct {
	Limits Limits `yaml:"limits,omitempty"`
}

type SecurityContext

type SecurityContext struct {
	Priviliged bool `yaml:"priviliged,omitempty"`
}

type Spec

type Spec struct {
	Ports    []Port   `yaml:"ports,omitempty"`
	Template Template `yaml:"template,omitempty"`
	Type     string   `yaml:"type,omitempty"`
}

type Template

type Template struct {
	Metadata Metadata `yaml:"metadata,omitempty"`
	PodSpec  PodSpec  `yaml:"spec,omitempty"`
}

type VolumeMounts

type VolumeMounts struct {
	MountPath string `yaml:"mountPath,omitempty"`
	Name      string `yaml:"name,omitempty"`
	ReadOnly  bool   `yaml:"readOnly,omitempty"`
}

Jump to

Keyboard shortcuts

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