containerization

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package containerization loads the kubernetes specifics parts, like BOSHContainerization, from the BOSH manifest.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Settings Settings `json:"settings,omitempty"`
}

type BOSH

type BOSH struct {
	Agent Agent `json:"agent,omitempty"`
}

type BOSHContainerization

type BOSHContainerization struct {
	Consumes         map[string]JobLink `json:"consumes"`
	Instances        []JobInstance      `json:"instances"`
	Release          string             `json:"release"`
	BPM              *bpm.Config        `json:"bpm,omitempty" yaml:"bpm,omitempty"`
	Ports            []Port             `json:"ports"`
	Run              RunConfig          `json:"run"`
	PreRenderScripts []string           `json:"pre_render_scripts" yaml:"pre_render_scripts"`
	Debug            bool               `json:"debug" yaml:"debug"`
}

BOSHContainerization represents the special 'bosh_containerization' property key. It contains all kubernetes structures we need to add to the BOSH manifest.

type Env

type Env struct {
	BOSH BOSH `json:"bosh,omitempty"`
}

type HealthCheck

type HealthCheck struct {
	ReadinessProbe *corev1.Probe `json:"readiness"`
	LivenessProbe  *corev1.Probe `json:"liveness"`
}

HealthCheck defines liveness and readiness probes for a container

type InstanceGroup

type InstanceGroup struct {
	Jobs []Job `json:"jobs"`
	// for env.bosh.agent.settings.affinity
	Env Env `json:"env,omitempty"`
}

type Job

type Job struct {
	Properties JobProperties `json:"properties,omitempty"`
}

type JobInstance

type JobInstance struct {
	Address  string                 `json:"address"`
	AZ       string                 `json:"az"`
	ID       string                 `json:"id"`
	Index    int                    `json:"index"`
	Instance int                    `json:"instance"`
	Name     string                 `json:"name"`
	Network  map[string]interface{} `json:"networks"`
	IP       string                 `json:"ip"`
}

JobInstance for data gathering

type JobLink struct {
	Instances  []JobInstance          `json:"instances"`
	Properties map[string]interface{} `json:"properties"`
}

JobLink describes links inside a job properties bosh_containerization.

type JobProperties

type JobProperties struct {
	BOSHContainerization BOSHContainerization `json:"bosh_containerization"`
}

type Manifest

type Manifest struct {
	InstanceGroups []*InstanceGroup `json:"instance_groups,omitempty"`
}

Manifest is a BOSH deployment manifest

func LoadKubeYAML

func LoadKubeYAML(data []byte) (*Manifest, error)

LoadKubeYAML is a special loader, since the YAML is already compatible to k8s structures without further transformation.

type Port

type Port struct {
	Name     string `json:"name"`
	Protocol string `json:"protocol"`
	Internal int    `json:"internal"`
}

Port represents the port to be opened up for this job

type RunConfig

type RunConfig struct {
	HealthChecks map[string]HealthCheck `json:"healthcheck"`
}

RunConfig describes the runtime configuration for this job

type Settings

type Settings struct {
	Affinity *corev1.Affinity `json:"affinity,omitempty" yaml:"affinity,omitempty"`
}

Source Files

  • containerization.go

Jump to

Keyboard shortcuts

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