k8scompute

package
v0.0.0-...-e0434a4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapEnvSource

type ConfigMapEnvSource struct {
	LocalObjectReference `json:",inline"`
}

type ConfigMapKeySelector

type ConfigMapKeySelector struct {
	LocalObjectReference `json:",inline"`
	Key                  string `json:"key"`
}

type Container

type Container struct {
	Name            string               `json:"name"`
	Image           string               `json:"image,omitempty"`
	Command         []string             `json:"command,omitempty"`
	Args            []string             `json:"args,omitempty"`
	WorkingDir      string               `json:"workingDir,omitempty"`
	Ports           []ContainerPort      `json:"ports,omitempty"`
	Env             []EnvVar             `json:"env,omitempty"`
	EnvFrom         []EnvFromSource      `json:"envFrom,omitempty"`
	Resources       ResourceRequirements `json:"resources,omitempty"`
	ImagePullPolicy string               `json:"imagePullPolicy,omitempty"`
	LivenessProbe   *Probe               `json:"livenessProbe,omitempty"`
	ReadinessProbe  *Probe               `json:"readinessProbe,omitempty"`
}

func (*Container) ToKubeContainer

func (container *Container) ToKubeContainer(envDefault []core_v1.EnvVar, envFrom []core_v1.EnvFromSource) core_v1.Container

type ContainerPort

type ContainerPort struct {
	Name          string `json:"name,omitempty"`
	ContainerPort int32  `json:"containerPort"`
	Protocol      string `json:"protocol,omitempty"`
}

type DefaultSpec

type DefaultSpec struct {
	Container Container
	Port      ContainerPort
	Scaling   Scaling
}

DefaultSpec holds the defaults for the K8SCompute object

type EnvFromSource

type EnvFromSource struct {
	Prefix       string              `json:"prefix,omitempty"`
	ConfigMapRef *ConfigMapEnvSource `json:"configMapRef,omitempty"`
}

type EnvVar

type EnvVar struct {
	Name      string        `json:"name"`
	Value     string        `json:"value"`
	ValueFrom *EnvVarSource `json:"valueFrom,omitempty"`
}

type EnvVarSource

type EnvVarSource struct {
	ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty"`
}

type ExecAction

type ExecAction struct {
	Command []string `json:"command,omitempty" protobuf:"bytes,1,rep,name=command"`
}

type ExternalMetric

type ExternalMetric struct {
}

type HTTPGetAction

type HTTPGetAction struct {
	Path        string             `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
	Port        intstr.IntOrString `json:"port" protobuf:"bytes,2,opt,name=port"`
	Host        string             `json:"host,omitempty" protobuf:"bytes,3,opt,name=host"`
	Scheme      URIScheme          `json:"scheme,omitempty" protobuf:"bytes,4,opt,name=scheme,casttype=URIScheme"`
	HTTPHeaders []HTTPHeader       `json:"httpHeaders,omitempty" protobuf:"bytes,5,rep,name=httpHeaders"`
}

type HTTPHeader

type HTTPHeader struct {
	Name  string `json:"name" protobuf:"bytes,1,opt,name=name"`
	Value string `json:"value" protobuf:"bytes,2,opt,name=value"`
}

type Handler

type Handler struct {
	Exec      *ExecAction      `json:"exec,omitempty" protobuf:"bytes,1,opt,name=exec"`
	HTTPGet   *HTTPGetAction   `json:"httpGet,omitempty" protobuf:"bytes,2,opt,name=httpGet"`
	TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"`
}

type LocalObjectReference

type LocalObjectReference struct {
	Name string `json:"name,omitempty"`
}

type Metric

type Metric struct {
	Type     autoscaling_v2b1.MetricSourceType `json:"type"`
	Resource *ResourceMetric                   `json:"resource,omitempty"`
}

func (*Metric) ToKubeMetric

func (metric *Metric) ToKubeMetric() autoscaling_v2b1.MetricSpec

type ObjectMetric

type ObjectMetric struct {
}

type PodsMetric

type PodsMetric struct {
}

type Probe

type Probe struct {
	Handler             `json:",inline" protobuf:"bytes,1,opt,name=handler"`
	InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty" protobuf:"varint,2,opt,name=initialDelaySeconds"`
	TimeoutSeconds      int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,3,opt,name=timeoutSeconds"`
	PeriodSeconds       int32 `json:"periodSeconds,omitempty" protobuf:"varint,4,opt,name=periodSeconds"`
	SuccessThreshold    int32 `json:"successThreshold,omitempty" protobuf:"varint,5,opt,name=successThreshold"`
	FailureThreshold    int32 `json:"failureThreshold,omitempty" protobuf:"varint,6,opt,name=failureThreshold"`
}

type ResourceList

type ResourceList map[string]resource.Quantity

type ResourceMetric

type ResourceMetric struct {
	Name                     core_v1.ResourceName `json:"name"`
	TargetAverageUtilization *int32               `json:"targetAverageUtilization,omitempty"`
	TargetAverageValue       *resource.Quantity   `json:"targetAverageValue,omitempty"`
}

type ResourceRequirements

type ResourceRequirements struct {
	Limits   ResourceList `json:"limits,omitempty"`
	Requests ResourceList `json:"requests,omitempty"`
}

type Scaling

type Scaling struct {
	MinReplicas int32    `json:"minReplicas,omitempty"`
	MaxReplicas int32    `json:"maxReplicas,omitempty"`
	Metrics     []Metric `json:"metrics,omitempty"`
}

type SecretKeySelector

type SecretKeySelector struct {
	LocalObjectReference `json:",inline"`
	Key                  string `json:"key"`
}

type Spec

type Spec struct {
	Containers []Container `json:"containers"`
	Scaling    Scaling     `json:"scaling,omitempty"`

	// RenameEnvVar represents environment variables to rename; it is passed through to the plugin that handles secrets
	RenameEnvVar map[string]string `json:"rename,omitempty"`
}

Spec for the K8SCompute object

func (*Spec) ApplyDefaults

func (s *Spec) ApplyDefaults(defaults *runtime.RawExtension) error

type TCPSocketAction

type TCPSocketAction struct {
	Port intstr.IntOrString `json:"port" protobuf:"bytes,1,opt,name=port"`
	Host string             `json:"host,omitempty" protobuf:"bytes,2,opt,name=host"`
}

type URIScheme

type URIScheme string

type WiringPlugin

type WiringPlugin struct {
	VPC func(location voyager.Location) *oap.VPCEnvironment
}

func New

func New(vpc func(location voyager.Location) *oap.VPCEnvironment) *WiringPlugin

func (*WiringPlugin) WireUp

WireUp is the main autowiring function for the K8SCompute resource, building a native kube deployment and HPA

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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