Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppMetadata ¶
type AppMetadata interface { // Namespace returns app namespace. Namespace() string // ChartName returns chart name ChartName() string // TemplatedName converts object name to templated Helm name. // Example: "my-app-service1" -> "{{ include "chart.fullname" . }}-service1" // "my-app-secret" -> "{{ include "chart.fullname" . }}-secret" // etc... TemplatedName(objName string) string // TemplatedString converts a string to templated string with chart name. TemplatedString(str string) string // TrimName trims common prefix from object name if exists. // We trim common prefix because helm already using release for this purpose. TrimName(objName string) string Config() config.Config }
AppMetadata handle common information about K8s objects in the chart.
type Processor ¶
type Processor interface { // Process - converts k8s object to Helm template. // return false if not able to process given object type. Process(appMeta AppMetadata, unstructured *unstructured.Unstructured) (bool, Template, error) }
Processor - converts k8s object to helm template. Implement this interface and register it to a context to support a new k8s resource conversion.
type Template ¶
type Template interface { // Filename - returns template filename Filename() string // Values - returns set of values used in template Values() Values // Write - writes helm template into given writer Write(writer io.Writer) error }
Template - represents Helm template in 'templates' directory.
type Values ¶
type Values map[string]interface{}
Values - represents helm template values.yaml.
func (*Values) Add ¶
Add - adds given value to values and returns its helm template representation {{ .Values.<valueName> }}
Click to show internal directories.
Click to hide internal directories.