manifest

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// DesiredManifestKeyName is the name of the key in desired manifest secret
	DesiredManifestKeyName = "manifest.yaml"
	// EnvInstanceGroupName is a key for the container Env identifying the
	// instance group that container is started for
	EnvInstanceGroupName = "INSTANCE_GROUP_NAME"
	// EnvBOSHManifestPath is a key for the container Env pointing to the BOSH manifest
	EnvBOSHManifestPath = "BOSH_MANIFEST_PATH"
	// EnvCFONamespace is a key for the container Env used to lookup the
	// namespace CF operator is running in
	EnvCFONamespace = "CF_OPERATOR_NAMESPACE"
	// EnvBaseDir is a key for the container Env used to lookup the base dir
	EnvBaseDir = "BASE_DIR"
	// EnvVariablesDir is a key for the container Env used to lookup the variables dir
	EnvVariablesDir = "VARIABLES_DIR"
	// VarInterpolationContainerName is the name of the container that
	// performs variable interpolation for a manifest. It's also part of
	// the output secret's name
	VarInterpolationContainerName = "desired-manifest"
)
View Source
const (
	// VolumeRenderingDataName is the volume name for the rendering data.
	VolumeRenderingDataName = "rendering-data"
	// VolumeRenderingDataMountPath is the mount path for the rendering data.
	VolumeRenderingDataMountPath = "/var/vcap/all-releases"

	// VolumeJobsDirName is the volume name for the jobs directory.
	VolumeJobsDirName = "jobs-dir"
	// VolumeJobsDirMountPath is the mount path for the jobs directory.
	VolumeJobsDirMountPath = "/var/vcap/jobs"

	// VolumeJobsSrcDirName is the volume name for the jobs-src directory.
	VolumeJobsSrcDirName = "jobs-src-dir"
	// VolumeJobsSrcDirMountPath is the mount path for the jobs-src directory.
	VolumeJobsSrcDirMountPath = "/var/vcap/jobs-src"

	// VolumeDataDirName is the volume name for the data directory.
	VolumeDataDirName = "data-dir"
	// VolumeDataDirMountPath is the mount path for the data directory.
	VolumeDataDirMountPath = "/var/vcap/data"

	// VolumeSysDirName is the volume name for the sys directory.
	VolumeSysDirName = "sys-dir"
	// VolumeSysDirMountPath is the mount path for the sys directory.
	VolumeSysDirMountPath = "/var/vcap/sys"

	// VolumeStoreDirName is the volume name for the store directory.
	VolumeStoreDirName = "store-dir"
	// VolumeStoreDirMountPath is the mount path for the store directory.
	VolumeStoreDirMountPath = "/var/vcap/store"

	// VolumeEphemeralDirName is the volume name for the ephemeral disk directory.
	VolumeEphemeralDirName = "bpm-ephemeral-disk"
	// VolumeEphemeralDirMountPath is the mount path for the ephemeral directory.
	VolumeEphemeralDirMountPath = "/var/vcap/data"

	// AdditionalVolumeBaseName helps in building an additional volume name together with
	// the index under the additional_volumes bpm list inside the bpm process schema.
	AdditionalVolumeBaseName = "bpm-additional-volume"

	// AdditionalVolumesRegex ensures only a valid path is defined
	// under the additional_volumes bpm list inside the bpm process schema.
	AdditionalVolumesRegex = "((/var/vcap/data/.+)|(/var/vcap/store/.+)|(/var/vcap/sys/run/.+))"

	// AdditionalVolumesVcapStoreRegex ensures that the path is of the form
	// /var/vcap/store.
	AdditionalVolumesVcapStoreRegex = "(/var/vcap/store/.+)"

	// UnrestrictedVolumeBaseName is the volume name for the unrestricted ones.
	UnrestrictedVolumeBaseName = "bpm-unrestricted-volume"
)
View Source
const (
	// EnvJobsDir is a key for the container Env used to lookup the jobs dir
	EnvJobsDir = "JOBS_DIR"
)
View Source
const JobSpecFilename = "job.MF"

JobSpecFilename is the name of the job spec manifest in an unpacked BOSH release

Variables

View Source
var (
	// DockerImageOrganization is the organization which provides the operator image
	DockerImageOrganization = ""
	// DockerImageRepository is the repository which provides the operator image
	DockerImageRepository = ""
	// DockerImageTag is the tag of the operator image
	DockerImageTag = ""
)
View Source
var (
	// LabelDeploymentName is the name of a label for the deployment name
	LabelDeploymentName = fmt.Sprintf("%s/deployment-name", apis.GroupName)
	// LabelInstanceGroupName is the name of a label for an instance group name
	LabelInstanceGroupName = fmt.Sprintf("%s/instance-group-name", apis.GroupName)
	// LabelDeploymentVersion is the name of a label for the deployment's version
	LabelDeploymentVersion = fmt.Sprintf("%s/deployment-version", apis.GroupName)
)

Functions

func GetOperatorDockerImage

func GetOperatorDockerImage() string

GetOperatorDockerImage returns the image name of the operator docker image

func InterpolateVariables added in v0.2.0

func InterpolateVariables(log *zap.SugaredLogger, boshManifestBytes []byte, variablesDir string) error

InterpolateVariables reads explicit secrets from a folder and writes an interpolated manifest to STDOUT

func RenderJobTemplates added in v0.2.0

func RenderJobTemplates(boshManifestPath string, jobsDir string, jobsOutputDir string, instanceGroupName string, specIndex int) error

RenderJobTemplates will render templates for all jobs of the instance group https://bosh.io/docs/create-release/#job-specs boshManifest is a resolved manifest for a single instance group

Types

type AddOn

type AddOn struct {
	Name    string               `yaml:"name"`
	Jobs    []AddOnJob           `yaml:"jobs"`
	Include *AddOnPlacementRules `yaml:"include,omitempty"`
	Exclude *AddOnPlacementRules `yaml:"exclude,omitempty"`
}

AddOn from BOSH deployment manifest

type AddOnJob

type AddOnJob struct {
	Name       string                 `yaml:"name"`
	Release    string                 `yaml:"release"`
	Properties map[string]interface{} `yaml:"properties,omitempty"`
}

AddOnJob from BOSH deployment manifest

type AddOnPlacementJob

type AddOnPlacementJob struct {
	Name    string `yaml:"name"`
	Release string `yaml:"release"`
}

AddOnPlacementJob from BOSH deployment manifest

type AddOnPlacementRules

type AddOnPlacementRules struct {
	Stemcell      []*AddOnStemcell     `yaml:"stemcell,omitempty"`
	Deployments   []string             `yaml:"deployments,omitempty"`
	Jobs          []*AddOnPlacementJob `yaml:"release,omitempty"`
	InstanceGroup []string             `yaml:"instance_groups,omitempty"`
	Networks      []string             `yaml:"networks,omitempty"`
	Teams         []string             `yaml:"teams,omitempty"`
}

AddOnPlacementRules from BOSH deployment manifest

type AddOnStemcell

type AddOnStemcell struct {
	OS string `yaml:"os"`
}

AddOnStemcell from BOSH deployment manifest

type Agent

type Agent struct {
	Settings AgentSettings `yaml:"settings,omitempty"`
	Tmpfs    *bool         `yaml:"tmpfs,omitempty"`
}

Agent from BOSH deployment manifest

type AgentEnv

type AgentEnv struct {
	PersistentDiskFS           string             `yaml:"persistent_disk_fs,omitempty"`
	PersistentDiskMountOptions []string           `yaml:"persistent_disk_mount_options,omitempty"`
	AgentEnvBoshConfig         AgentEnvBoshConfig `yaml:"bosh,omitempty"`
}

AgentEnv from BOSH deployment manifest

type AgentEnvBoshConfig

type AgentEnvBoshConfig struct {
	Password              string  `yaml:"password,omitempty"`
	KeepRootPassword      string  `yaml:"keep_root_password,omitempty"`
	RemoveDevTools        *bool   `yaml:"remove_dev_tools,omitempty"`
	RemoveStaticLibraries *bool   `yaml:"remove_static_libraries,omitempty"`
	SwapSize              *int    `yaml:"swap_size,omitempty"`
	IPv6                  IPv6    `yaml:"ipv6,omitempty"`
	JobDir                *JobDir `yaml:"job_dir,omitempty"`
	Agent                 Agent   `yaml:"agent,omitempty"`
}

AgentEnvBoshConfig from BOSH deployment manifest

type AgentSettings added in v0.3.0

type AgentSettings struct {
	Annotations map[string]string `yaml:"annotations,omitempty"`
	Labels      map[string]string `yaml:"labels,omitempty"`
}

AgentSettings from BOSH deployment manifest. These annotations and labels are added to kube resources

func (*AgentSettings) Set added in v0.3.0

func (as *AgentSettings) Set(manifestName, igName, version string)

Set overrides labels and annotations with operator-owned metadata

type AuthType

type AuthType string

AuthType from BOSH deployment manifest

const (
	ClientAuth AuthType = "client_auth"
	ServerAuth AuthType = "server_auth"
)

AuthType values from BOSH deployment manifest

type BOSHContainerization

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

BOSHContainerization represents the special 'bosh_containerization' property key

type BPMResourceDisk added in v0.3.0

type BPMResourceDisk struct {
	PersistentVolumeClaim *corev1.PersistentVolumeClaim
	Volume                *corev1.Volume
	VolumeMount           *corev1.VolumeMount

	Labels map[string]string
}

BPMResourceDisk represents a converted BPM disk to k8s resources.

func (*BPMResourceDisk) MatchesFilter added in v0.3.0

func (disk *BPMResourceDisk) MatchesFilter(filterKey, filterValue string) bool

MatchesFilter returns true if the disk matches the filter with one of its labels.

type BPMResourceDisks added in v0.3.0

type BPMResourceDisks []BPMResourceDisk

BPMResourceDisks represents a slice of BPMResourceDisk.

func (BPMResourceDisks) Filter added in v0.3.0

func (disks BPMResourceDisks) Filter(filterKey, filterValue string) BPMResourceDisks

Filter filters BPMResourceDisks on its labels.

func (BPMResourceDisks) VolumeMounts added in v0.3.0

func (disks BPMResourceDisks) VolumeMounts() []corev1.VolumeMount

VolumeMounts returns a slice of VolumeMount of each BPMResourceDisk contained in BPMResourceDisks.

func (BPMResourceDisks) Volumes added in v0.3.0

func (disks BPMResourceDisks) Volumes() []corev1.Volume

Volumes returns a slice of Volume of each BPMResourceDisk contained in BPMResourceDisks.

type BPMResources added in v0.2.2

type BPMResources struct {
	InstanceGroups []essv1.ExtendedStatefulSet
	Errands        []ejv1.ExtendedJob
	Services       []corev1.Service
	Disks          BPMResourceDisks
}

BPMResources contains BPM related k8s resources, which were converted from BOSH objects

type ContainerFactory added in v0.2.2

type ContainerFactory struct {
	// contains filtered or unexported fields
}

ContainerFactory builds Kubernetes containers from BOSH jobs

func NewContainerFactory added in v0.2.2

func NewContainerFactory(manifestName string, instanceGroupName string, version string, releaseImageProvider ReleaseImageProvider, bpmConfigs bpm.Configs) *ContainerFactory

NewContainerFactory returns a new ContainerFactory for a BOSH instant group

func (*ContainerFactory) JobsToContainers added in v0.2.2

func (c *ContainerFactory) JobsToContainers(
	jobs []Job,
	defaultVolumeMounts []corev1.VolumeMount,
	bpmDisks BPMResourceDisks,
) ([]corev1.Container, error)

JobsToContainers creates a list of Containers for corev1.PodSpec Containers field

func (*ContainerFactory) JobsToInitContainers added in v0.2.2

func (c *ContainerFactory) JobsToInitContainers(
	jobs []Job,
	defaultVolumeMounts []corev1.VolumeMount,
	bpmDisks BPMResourceDisks,
) ([]corev1.Container, error)

JobsToInitContainers creates a list of Containers for corev1.PodSpec InitContainers field

type DataGatherer added in v0.2.0

type DataGatherer struct {
	// contains filtered or unexported fields
}

DataGatherer gathers data for jobs in the manifest, it handles links and returns a deployment manifest that only has information pertinent to an instance group.

func NewDataGatherer added in v0.2.0

func NewDataGatherer(log *zap.SugaredLogger, basedir, namespace string, manifest Manifest, instanceGroupName string) (*DataGatherer, error)

NewDataGatherer returns a data gatherer with logging for a given input manifest and instance group

func (*DataGatherer) BPMConfigs added in v0.2.2

func (dg *DataGatherer) BPMConfigs() (bpm.Configs, error)

BPMConfigs returns a map of all BOSH jobs in the instance group The output will be persisted by ExtendedJob as 'bpm.yaml' in the `<deployment-name>.bpm.<instance-group>-v<version>` secret.

func (*DataGatherer) ResolvedProperties added in v0.2.2

func (dg *DataGatherer) ResolvedProperties() (Manifest, error)

ResolvedProperties returns a manifest for a specific instance group only. That manifest includes the gathered data from BPM and links. The output will be persisted by ExtendedJob as 'properties.yaml' in the `<deployment-name>.ig-resolved.<instance-group>-v<version>` secret.

type Feature

type Feature struct {
	ConvergeVariables    bool  `yaml:"converge_variables"`
	RandomizeAzPlacement *bool `yaml:"randomize_az_placement,omitempty"`
	UseDNSAddresses      *bool `yaml:"use_dns_addresses,omitempty"`
	UseTmpfsJobConfig    *bool `yaml:"use_tmpfs_job_config,omitempty"`
}

Feature from BOSH deployment manifest

type HealthCheck added in v0.2.2

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

HealthCheck defines liveness and readiness probes for a container

type IPv6

type IPv6 struct {
	Enable bool `yaml:"enable"`
}

IPv6 from BOSH deployment manifest

type InstanceGroup

type InstanceGroup struct {
	Name               string                 `yaml:"name"`
	Instances          int                    `yaml:"instances"`
	AZs                []string               `yaml:"azs"`
	Jobs               []Job                  `yaml:"jobs"`
	VMType             string                 `yaml:"vm_type,omitempty"`
	VMExtensions       []string               `yaml:"vm_extensions,omitempty"`
	VMResources        *VMResource            `yaml:"vm_resources"`
	Stemcell           string                 `yaml:"stemcell"`
	PersistentDisk     *int                   `yaml:"persistent_disk,omitempty"`
	PersistentDiskType string                 `yaml:"persistent_disk_type,omitempty"`
	Networks           []*Network             `yaml:"networks,omitempty"`
	Update             *Update                `yaml:"update,omitempty"`
	MigratedFrom       []*MigratedFrom        `yaml:"migrated_from,omitempty"`
	LifeCycle          string                 `yaml:"lifecycle,omitempty"`
	Properties         map[string]interface{} `yaml:"properties,omitempty"`
	Env                AgentEnv               `yaml:"env,omitempty"`
}

InstanceGroup from BOSH deployment manifest

type Interpolator

type Interpolator interface {
	BuildOps(opsBytes []byte) error
	Interpolate(manifestBytes []byte) ([]byte, error)
}

Interpolator renders BOSH manifests by operations files go:generate counterfeiter -o fakes/fake_interpolator.go . Interpolator

type InterpolatorImpl

type InterpolatorImpl struct {
	// contains filtered or unexported fields
}

InterpolatorImpl applies desired changes from BOSH operations files to to BOSH manifest

func NewInterpolator

func NewInterpolator() *InterpolatorImpl

NewInterpolator constructs an interpolator

func (*InterpolatorImpl) BuildOps

func (i *InterpolatorImpl) BuildOps(opsBytes []byte) error

BuildOps unmarshals ops definitions, processes them and holds them in memory

func (*InterpolatorImpl) Interpolate

func (i *InterpolatorImpl) Interpolate(manifestBytes []byte) ([]byte, error)

Interpolate returns manifest which is rendered by operations files

type Job

type Job struct {
	Name       string                 `yaml:"name"`
	Release    string                 `yaml:"release"`
	Consumes   map[string]interface{} `yaml:"consumes,omitempty"`
	Provides   map[string]interface{} `yaml:"provides,omitempty"`
	Properties JobProperties          `yaml:"properties,omitempty"`
}

Job from BOSH deployment manifest

func (Job) Property added in v0.2.0

func (job Job) Property(propertyName string) (interface{}, bool)

Property search for property value in the job properties

type JobDir

type JobDir struct {
	Tmpfs     *bool  `yaml:"tmpfs,omitempty"`
	TmpfsSize string `yaml:"tmpfs_size,omitempty"`
}

JobDir from BOSH deployment manifest

type JobFactory added in v0.2.1

type JobFactory struct {
	Manifest  Manifest
	Namespace string
	// contains filtered or unexported fields
}

JobFactory creates Jobs for a given manifest

func NewJobFactory added in v0.2.1

func NewJobFactory(manifest Manifest, namespace string, version string) *JobFactory

NewJobFactory returns a new JobFactory

func (*JobFactory) BPMConfigsJob added in v0.2.2

func (f *JobFactory) BPMConfigsJob() (*ejv1.ExtendedJob, error)

BPMConfigsJob returns an extended job to calculate BPM information

func (*JobFactory) DataGatheringJob added in v0.2.1

func (f *JobFactory) DataGatheringJob() (*ejv1.ExtendedJob, error)

DataGatheringJob generates the Data Gathering Job for a manifest

func (*JobFactory) VariableInterpolationJob added in v0.2.1

func (f *JobFactory) VariableInterpolationJob() (*ejv1.ExtendedJob, error)

VariableInterpolationJob returns an extended job to interpolate variables

type JobInstance

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

JobInstance for data gathering

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

JobLink describes links inside a job properties bosh_containerization.

type JobProperties

type JobProperties struct {
	BOSHContainerization `yaml:"bosh_containerization"`
	Properties           map[string]interface{} `yaml:",inline"`
}

JobProperties represents the properties map of a Job

func (*JobProperties) ToMap

func (p *JobProperties) ToMap() map[string]interface{}

ToMap returns a complete map with all properties, including the bosh_containerization key

type JobProviderLinks map[string]map[string]JobLink

JobProviderLinks provides links to other jobs, indexed by provider type and name

func (JobProviderLinks) Add added in v0.2.0

func (jpl JobProviderLinks) Add(job Job, spec JobSpec, jobsInstances []JobInstance) error

Add another job to the lookup map

func (JobProviderLinks) Lookup added in v0.2.0

func (jpl JobProviderLinks) Lookup(provider *JobSpecProvider) (JobLink, bool)

Lookup returns a link for a type and name, used when links are consumed

type JobSpec

type JobSpec struct {
	Name        string
	Description string
	Packages    []string
	Templates   map[string]string
	Properties  map[string]struct {
		Description string
		Default     interface{}
		Example     interface{}
	}
	Consumes []JobSpecProvider
	Provides []JobSpecLink
}

JobSpec describes the contents of "job.MF" files

func (JobSpec) RetrieveNestedProperty added in v0.2.0

func (js JobSpec) RetrieveNestedProperty(propertyName string) map[string]interface{}

RetrieveNestedProperty will generate an nested struct based on a string of the type foo.bar

func (JobSpec) RetrievePropertyDefault added in v0.2.0

func (js JobSpec) RetrievePropertyDefault(propertyName string) interface{}

RetrievePropertyDefault return the default value of the spec property

type JobSpecLink struct {
	Name       string
	Type       string
	Properties []string
}

JobSpecLink represents a link in the job spec Provides field.

type JobSpecProvider added in v0.3.0

type JobSpecProvider struct {
	Name     string
	Type     string
	Optional bool
}

JobSpecProvider represents a provider in the job spec Consumes field.

type KubeConverter added in v0.2.2

type KubeConverter struct {
	// contains filtered or unexported fields
}

KubeConverter represents a Manifest in kube resources

func NewKubeConverter added in v0.2.2

func NewKubeConverter(namespace string) *KubeConverter

NewKubeConverter converts a Manifest into kube resources

func (*KubeConverter) BPMResources added in v0.2.2

func (kc *KubeConverter) BPMResources(manifestName string, version string, instanceGroup *InstanceGroup, releaseImageProvider ReleaseImageProvider, bpmConfigs bpm.Configs) (*BPMResources, error)

BPMResources uses BOSH Process Manager information to create k8s container specs from single BOSH instance group. It returns extended stateful sets, services and extended jobs.

func (*KubeConverter) Variables added in v0.2.2

func (kc *KubeConverter) Variables(manifestName string, variables []Variable) []esv1.ExtendedSecret

Variables returns extended secrets for a list of BOSH variables

type Link struct {
	Name       string        `yaml:"name"`
	Instances  []JobInstance `yaml:"instances"`
	Properties interface{}   `yaml:"properties"`
}

Link with name for rendering

type Manifest

type Manifest struct {
	Name           string                   `yaml:"name"`
	DirectorUUID   string                   `yaml:"director_uuid"`
	InstanceGroups []*InstanceGroup         `yaml:"instance_groups,omitempty"`
	Features       *Feature                 `yaml:"features,omitempty"`
	Tags           map[string]string        `yaml:"tags,omitempty"`
	Releases       []*Release               `yaml:"releases,omitempty"`
	Stemcells      []*Stemcell              `yaml:"stemcells,omitempty"`
	AddOns         []*AddOn                 `yaml:"addons,omitempty"`
	Properties     []map[string]interface{} `yaml:"properties,omitempty"`
	Variables      []Variable               `yaml:"variables,omitempty"`
	Update         *Update                  `yaml:"update,omitempty"`
}

Manifest is a BOSH deployment manifest

func LoadYAML added in v0.2.2

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

LoadYAML returns a new BOSH deployment manifest from a yaml representation

func (*Manifest) GetReleaseImage

func (m *Manifest) GetReleaseImage(instanceGroupName, jobName string) (string, error)

GetReleaseImage returns the release image location for a given instance group/job

func (*Manifest) InstanceGroupByName added in v0.2.2

func (m *Manifest) InstanceGroupByName(name string) (*InstanceGroup, error)

InstanceGroupByName returns the instance group identified by the given name

func (*Manifest) SHA1

func (m *Manifest) SHA1() (string, error)

SHA1 calculates the SHA1 of the manifest

type MigratedFrom

type MigratedFrom struct {
	Name string `yaml:"name"`
	Az   string `yaml:"az,omitempty"`
}

MigratedFrom from BOSH deployment manifest

type Network

type Network struct {
	Name      string   `yaml:"name"`
	StaticIps []string `yaml:"static_ips,omitempty"`
	Default   []string `yaml:"default,omitempty"`
}

Network from BOSH deployment manifest

type NewInterpolatorFunc added in v0.2.0

type NewInterpolatorFunc func() Interpolator

NewInterpolatorFunc returns a fresh Interpolator

type Port added in v0.2.0

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

Port represents the port to be opened up for this job

type Release

type Release struct {
	Name     string           `yaml:"name"`
	Version  string           `yaml:"version"`
	URL      string           `yaml:"url,omitempty"`
	SHA1     string           `yaml:"sha1,omitempty"`
	Stemcell *ReleaseStemcell `yaml:"stemcell,omitempty"`
}

Release from BOSH deployment manifest

type ReleaseImageProvider added in v0.3.0

type ReleaseImageProvider interface {
	// GetReleaseImage returns the release image for an job in an instance group
	GetReleaseImage(instanceGroupName, jobName string) (string, error)
}

ReleaseImageProvider interface to provide the docker release image for a BOSH job This lookup is currently implemented by the manifest model.

type ReleaseStemcell

type ReleaseStemcell struct {
	OS      string `yaml:"os"`
	Version string `yaml:"version"`
}

ReleaseStemcell from BOSH deployment manifest

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver resolves references from bdpl CRD to a BOSH manifest

func NewResolver

func NewResolver(client client.Client, f NewInterpolatorFunc) *Resolver

NewResolver constructs a resolver

func (*Resolver) ImplicitVariables added in v0.3.0

func (r *Resolver) ImplicitVariables(m *Manifest, rawManifest string) []string

ImplicitVariables returns a list of all implicit variables in a manifest

func (*Resolver) LatestVersion added in v0.3.0

func (r *Resolver) LatestVersion(ctx context.Context, namespace string, manifestName string) string

LatestVersion returns the latest desired manifest version. It returns the initial version "1" if no desired manifest version is found.

func (*Resolver) ReadDesiredManifest added in v0.2.2

func (r *Resolver) ReadDesiredManifest(ctx context.Context, boshDeploymentName, namespace string) (*Manifest, error)

ReadDesiredManifest reads the versioned secret created by the variable interpolation job and unmarshals it into a Manifest object

func (*Resolver) WithOpsManifest added in v0.3.0

func (r *Resolver) WithOpsManifest(instance *bdc.BOSHDeployment, namespace string) (*Manifest, error)

WithOpsManifest returns manifest referenced by our bdpl CRD The resulting manifest has variables interpolated and ops files applied. It is the 'with-ops' manifest.

type RunConfig added in v0.2.2

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

RunConfig describes the runtime configuration for this job

type Stemcell

type Stemcell struct {
	Alias   string `yaml:"alias"`
	OS      string `yaml:"os,omitempty"`
	Version string `yaml:"version"`
	Name    string `yaml:"name,omitempty"`
}

Stemcell from BOSH deployment manifest

type Update

type Update struct {
	Canaries        int     `yaml:"canaries"`
	MaxInFlight     string  `yaml:"max_in_flight"`
	CanaryWatchTime string  `yaml:"canary_watch_time"`
	UpdateWatchTime string  `yaml:"update_watch_time"`
	Serial          bool    `yaml:"serial,omitempty"`
	VMStrategy      *string `yaml:"vm_strategy,omitempty"`
}

Update from BOSH deployment manifest

type VMResource

type VMResource struct {
	CPU               int `yaml:"cpu"`
	RAM               int `yaml:"ram"`
	EphemeralDiskSize int `yaml:"ephemeral_disk_size"`
}

VMResource from BOSH deployment manifest

type Variable

type Variable struct {
	Name    string           `yaml:"name"`
	Type    string           `yaml:"type"`
	Options *VariableOptions `yaml:"options,omitempty"`
}

Variable from BOSH deployment manifest

type VariableOptions

type VariableOptions struct {
	CommonName       string     `yaml:"common_name"`
	AlternativeNames []string   `yaml:"alternative_names,omitempty"`
	IsCA             bool       `yaml:"is_ca"`
	CA               string     `yaml:"ca,omitempty"`
	ExtendedKeyUsage []AuthType `yaml:"extended_key_usage,omitempty"`
}

VariableOptions from BOSH deployment manifest

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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