Documentation ¶
Index ¶
- func CSRName(namespace, extendedSecretName string) string
- func CalculateIGSecretName(secretType DeploymentSecretType, deploymentName string, igName string, ...) string
- func CalculateIGSecretPrefix(secretType DeploymentSecretType, deploymentName string) string
- func CalculateSecretName(secretType DeploymentSecretType, deploymentName, name string) string
- func CsrPrivateKeySecretName(csrName string) string
- func DesiredManifestName(deploymentName string, version string) string
- func DesiredManifestPrefix(deploymentName string) string
- func GetStatefulSetName(name string) string
- func JobName(eJobName string) (string, error)
- func OrdinalFromPodName(name string) int
- func Sanitize(name string) string
- type DeploymentSecretType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CSRName ¶ added in v0.4.0
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
CsrPrivateKeySecretName returns a Secret name for a given CertificateSigningRequest private key
func DesiredManifestName ¶ added in v0.3.0
DesiredManifestName returns the versioned name of the desired manifest secret, e.g. 'test.desired-manifest-v1'
func DesiredManifestPrefix ¶ added in v0.3.0
DesiredManifestPrefix returns the prefix of the desired manifest's name:
func GetStatefulSetName ¶
GetStatefulSetName gets statefulset name from podName
func JobName ¶
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 ¶
OrdinalFromPodName returns ordinal from pod name
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