kube

package
v0.0.0-...-db657e9 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RoleNameLabel is a thing
	RoleNameLabel = "skiff-role-name"
	// VolumeStorageClassAnnotation is the annotation label for storage/v1beta1/StorageClass
	VolumeStorageClassAnnotation = "volume.beta.kubernetes.io/storage-class"
)

Variables

This section is empty.

Functions

func NewClusterIPService

func NewClusterIPService(role *model.Role, headless bool) (*apiv1.Service, error)

NewClusterIPService creates a new k8s ClusterIP service

func NewDeployment

func NewDeployment(role *model.Role, settings *ExportSettings) (*extra.Deployment, *apiv1.Service, error)

NewDeployment creates a Deployment for the given role, and its attached service

func NewJob

func NewJob(role *model.Role, settings *ExportSettings) (*extra.Job, error)

NewJob creates a new Job for the given role, as well as any objects it depends on

func NewPodTemplate

func NewPodTemplate(role *model.Role, settings *ExportSettings) (v1.PodTemplateSpec, error)

NewPodTemplate creates a new pod template spec for a given role, as well as any objects it depends on

func NewSecret

func NewSecret(name string) *apiv1.Secret

NewSecret creates a single new, empty K8s Secret

func NewStatefulSet

func NewStatefulSet(role *model.Role, settings *ExportSettings) (*v1beta1.StatefulSet, *v1.List, error)

NewStatefulSet returns a k8s stateful set for the given role

func WriteYamlConfig

func WriteYamlConfig(kubeObject runtime.Object, writer io.Writer) error

WriteYamlConfig writes the YAML serialized configuration of a k8s object to a specified writer

Types

type ExportSettings

type ExportSettings struct {
	Repository      string
	Defaults        map[string]string
	Registry        string
	Organization    string
	UseMemoryLimits bool
	FissileVersion  string
	Opinions        *model.Opinions
	Secrets         SecretRefMap
}

ExportSettings are configuration for creating Kubernetes configs

type SecretRef

type SecretRef struct {
	Secret string
	Key    string
}

SecretRef is an entry in the SecretRefMap

type SecretRefMap

type SecretRefMap map[string]SecretRef

SecretRefMap maps the names of secret CVs to the combination of secret and key used to store their value. Note that the key has to be stored, because of the transformation at (**). Ok, not truly, but then we would have to replicate the transform at the place where the mapping is used. I prefer to do it only once.

func MakeSecrets

func MakeSecrets(secrets model.CVMap, defaults map[string]string) ([]*apiv1.Secret, SecretRefMap, error)

MakeSecrets creates an array of new Secrets filled with the key/value pairs from the specified map. It further returns a map showing which original CV name maps to what secret+key combination.

Jump to

Keyboard shortcuts

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