types

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	// The container repository
	Repository string `json:"repository,omitempty"`
	// The container tag
	Tag string `json:"tag,omitempty"`

	PullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"`
}

Image represents the container image of a pod

func (Image) Name

func (in Image) Name() string

Name returns the actual docker image name in the format <repository>:<tag>

type PodConfig

type PodConfig struct {

	// Labels defines the labels to attach to the broker pod
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations defines the annotations to attach to the pod
	Annotations map[string]string `json:"annotations,omitempty"`

	// Compute Resources required by this container.
	// This field cannot be updated once the pod is created
	Resources v1.ResourceRequirements `json:"resources,omitempty"`

	// List of environment variables to set in the container.
	// This field cannot be updated once the pod is created
	EnvVar []v1.EnvVar `json:"env,omitempty"`

	// List of sources to populate environment variables in the container.
	// The keys defined within a source must be a C_IDENTIFIER. All invalid keys
	// will be reported as an event when the container is starting. When a key exists in multiple
	// sources, the value associated with the last source will take precedence.
	// Values defined by an Env with a duplicate key will take precedence.
	// This field cannot be updated once the pod is created
	EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty"`

	// Affinity defines the pod's scheduling constraints
	Affinity v1.Affinity `json:"affinity,omitempty"`

	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Optional duration in seconds the pod may be active on the node relative to
	// StartTime before the system will actively try to mark it failed and kill associated containers.
	// Value must be a positive integer.
	ActiveDeadlineSeconds int64 `json:"activeDeadlineSeconds,omitempty"`
	// Restart policy for all containers within the pod.
	// One of Always, OnFailure, Never.
	// Default to Always.
	RestartPolicy v1.RestartPolicy `json:"restartPolicy,omitempty"`

	// PodSecurityContext holds pod-level security attributes and common container settings.
	// Some fields are also present in container.securityContext.  Field values of
	// container.securityContext take precedence over field values of PodSecurityContext.
	SecurityContext v1.PodSecurityContext `json:"securityContext,omitempty"`
}

PodConfig defines the configurations of a kubernetes pod

func (*PodConfig) DeepCopy

func (in *PodConfig) DeepCopy() *PodConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodConfig.

func (*PodConfig) DeepCopyInto

func (in *PodConfig) DeepCopyInto(out *PodConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodConfig) GenerateEnvFrom

func (in *PodConfig) GenerateEnvFrom(sources ...v1.EnvFromSource) []v1.EnvFromSource

GenerateEnvFrom generate the pod environment variables from sources

func (*PodConfig) GenerateEnvVar

func (in *PodConfig) GenerateEnvVar(sources ...v1.EnvVar) []v1.EnvVar

GenerateEnvVar generate the pod environment variables

Jump to

Keyboard shortcuts

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