Documentation ¶
Overview ¶
Package template provides functions for templating Kubernetes resources, with standard G8S configuration.
Index ¶
Constants ¶
View Source
const ( TemplateHelmChartTaskName = "template-helm-chart" // TemplateHelmChartTaskString is the format for printing the // helm chart templating task. // Name of the task, the helm directory path, the sha, and the version. TemplateHelmChartTaskString = "%s:\t%s sha:%s version:%s" // HelmChartYamlName is the name of Helm's chart yaml. HelmChartYamlName = "Chart.yaml" // HelmTemplateDirectoryName is the name of the directory that stores // Kubernetes resources inside a chart. HelmTemplateDirectoryName = "templates" // HelmDeploymentYamlName is the name of the file we template inside the // Helm template directory. HelmDeploymentYamlName = "deployment.yaml" )
Variables ¶
This section is empty.
Functions ¶
func IsIncorrectTemplating ¶
IsIncorrectTemplating asserts incorrectTemplatingError.
func IsIncorrectValue ¶
IsIncorrectValue asserts incorrectValueError.
func IsMultipleFilesFoundInResources ¶
IsMultipleFilesFoundInResources asserts multipleFilesFoundInResourcesError.
func IsResourceNotFound ¶
IsResourceNotFound asserts resourceNotFoundError.
Types ¶
type BuildInfo ¶
type BuildInfo struct { // SHA is the SHA-1 tag of the commit we are building for. SHA string // Version is the version of the commit being built. Version string }
BuildInfo holds information concerning the current build.
type TemplateConfiguration ¶
type TemplateConfiguration struct { // BuildInfo is the configuration for the current build BuildInfo }
TemplateConfiguration holds both build info, and configuration info.
type TemplateHelmChartTask ¶
type TemplateHelmChartTask struct {
// contains filtered or unexported fields
}
func NewTemplateHelmChartTask ¶
func NewTemplateHelmChartTask(fs afero.Fs, chartDir, sha, version string) TemplateHelmChartTask
func (TemplateHelmChartTask) Name ¶
func (t TemplateHelmChartTask) Name() string
func (TemplateHelmChartTask) Run ¶
func (t TemplateHelmChartTask) Run() error
Run templates the chart's Chart.yaml and templates/deployment.yaml.
func (TemplateHelmChartTask) String ¶
func (t TemplateHelmChartTask) String() string
Click to show internal directories.
Click to hide internal directories.