names

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CSRName added in v0.4.0

func CSRName(namespace, extendedSecretName string) string

CSRName returns a CertificateSigningRequest name for a given ExtendedSecret

func CalculateIGSecretName added in v0.3.0

func CalculateIGSecretName(secretType DeploymentSecretType, deploymentName string, igName string, version string) string

CalculateIGSecretName returns the name of a k8s secret: `<deployment-name>.<secretType>.<instance-group>-v<version>` secret.

These secrets are created by ExtendedJob and mounted on containers, e.g. for the template rendering.

func CalculateIGSecretPrefix added in v0.3.0

func CalculateIGSecretPrefix(secretType DeploymentSecretType, deploymentName string) string

CalculateIGSecretPrefix returns the prefix used for our k8s secrets: `<deployment-name>.<secretType>.

func CalculateSecretName

func CalculateSecretName(secretType DeploymentSecretType, deploymentName, name string) string

CalculateSecretName generates a Secret name for a given name and a deployment

func CsrPrivateKeySecretName added in v0.4.0

func CsrPrivateKeySecretName(csrName string) string

CsrPrivateKeySecretName returns a Secret name for a given CertificateSigningRequest private key

func DesiredManifestName added in v0.3.0

func DesiredManifestName(deploymentName string, version string) string

DesiredManifestName returns the versioned name of the desired manifest secret, e.g. 'test.desired-manifest-v1'

func DesiredManifestPrefix added in v0.3.0

func DesiredManifestPrefix(deploymentName string) string

DesiredManifestPrefix returns the prefix of the desired manifest's name:

func GetStatefulSetName

func GetStatefulSetName(name string) string

GetStatefulSetName gets statefulset name from podName

func JobName

func JobName(eJobName string) (string, error)

JobName returns a unique, short name for a given eJob k8s allows 63 chars, but the job's pod will have -\d{6} (=7 chars) appended. So we return max 56 chars: name39-suffix16

func OrdinalFromPodName

func OrdinalFromPodName(name string) int

OrdinalFromPodName returns ordinal from pod name

func Sanitize added in v0.3.0

func Sanitize(name string) string

Sanitize produces valid k8s names, i.e. for containers: [a-z0-9]([-a-z0-9]*[a-z0-9])?

Types

type DeploymentSecretType

type DeploymentSecretType int

DeploymentSecretType lists all the types of secrets used in the lifecycle of a BOSHDeployment

const (
	// DeploymentSecretTypeManifestWithOps is a manifest that has ops files applied
	DeploymentSecretTypeManifestWithOps DeploymentSecretType = iota
	// DeploymentSecretTypeManifestAndVars is a manifest whose variables have been interpolated
	DeploymentSecretTypeManifestAndVars
	// DeploymentSecretTypeVariable is a BOSH variable generated using an ExtendedSecret
	DeploymentSecretTypeVariable
	// DeploymentSecretTypeInstanceGroupResolvedProperties is a YAML file containing all properties needed to render an Instance Group
	DeploymentSecretTypeInstanceGroupResolvedProperties
	// DeploymentSecretBpmInformation is a YAML file containing the BPM information for one instance group
	DeploymentSecretBpmInformation
)

func (DeploymentSecretType) String

func (s DeploymentSecretType) String() string

Jump to

Keyboard shortcuts

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