model

package
v0.0.0-...-764f856 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 9 Imported by: 9

Documentation

Index

Constants

View Source
const (
	EmptyType               = VariableType("") // type is required
	VariableTypeCertificate = VariableType("certificate")
	VariableTypeSSH         = VariableType("ssh")
	VariableTypePassword    = VariableType("password")
)

These are the supported variable types for configuration values An EmptyType will be ignored by variable generation.

View Source
const FingerprintSuffix = "_FINGERPRINT"

FingerprintSuffix is appended to the name of SSH variables fingerprint secret

View Source
const KeySuffix = "_KEY"

KeySuffix is appended to the name of certificate variables private key secret

Variables

This section is empty.

Functions

This section is empty.

Types

type CVOptions

type CVOptions struct {
	PreviousNames []string `yaml:"previous_names"`
	Secret        bool     `yaml:"secret,omitempty"`
	Immutable     bool     `yaml:"immutable,omitempty"`
	RoleName      string   `json:"role_name,omitempty" yaml:"role_name,omitempty"`
}

CVOptions are custom options, mostly used to control the generated k8s secrets

type CertParams

type CertParams struct {
	AlternativeNames []string `yaml:"alternative_names" json:"subject_names,omitempty"`
	IsCA             bool     `yaml:"is_ca"`
	AppendKubeCA     bool     `yaml:"append_kube_ca"`
	CAName           string   `yaml:"ca"`
	ExtKeyUsage      []string `yaml:"extended_key_usage"`
}

CertParams was copied from config-server/types/certificate_generator.go for on the fly parsing of certificate options

type Manifest

type Manifest struct {
	Variables Variables `yaml:"variables"`
}

Manifest is the top level of the role manifest file Variables contains information about how to configure the resulting images

func GetManifest

func GetManifest(r io.Reader, env map[string]string) (Manifest, error)

GetManifest loads a manifest from file or string and expands all Go templates under the `variables` key. The `env` parameter provides additional variables that can be referenced from these templates.

type VariableDefinition

type VariableDefinition struct {
	Name      string          `yaml:"name"`
	Type      VariableType    `json:"type" yaml:"type"`
	Options   VariableOptions `yaml:"options"`
	CVOptions CVOptions
}

VariableDefinition is a configuration to be exposed to the IaaS

Type is the type of a variable. Options are free form as defined in https://bosh.io/docs/manifest-v2/#variables CVOptions are additional options, mostly used to control the generated k8s secrets

func (*VariableDefinition) OptionsAsCertificateParams

func (cv *VariableDefinition) OptionsAsCertificateParams() (CertParams, error)

OptionsAsCertificateParams returns the variables options as a struct of certificate parameters

type VariableOptions

type VariableOptions map[string]interface{}

VariableOptions are not structured, their content depends on the type

type VariableType

type VariableType string

VariableType describes the BOSH type of the variable, as defined in https://bosh.io/docs/manifest-v2/#variables

type Variables

type Variables []*VariableDefinition

Variables from the BOSH manifests variables section

Jump to

Keyboard shortcuts

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