values

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileNameValues string = "values.yaml"
)

Variables

View Source
var (
	ValueLog = ctrl.Log.WithValues("package", "values")
	Alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
)
View Source
var HelmValuesTemplate = `` /* 1904-byte string literal not displayed */

HelmValuesTemplate is the yaml template for helm command. render values.yaml according to the play resource contain

Functions

func HashID

func HashID(pid float64) (string, error)

HashID return hash from pid for the prefix url

func LookupOrDefaultValues added in v0.5.0

func LookupOrDefaultValues(ctx context.Context, r client.Client, key string, defaultVal string) string

func ToYaml

func ToYaml(v interface{}) string

ToYaml returns the v interface into yaml format

func TxtFuncMap

func TxtFuncMap() template.FuncMap

TxtFuncMap returns a template FuncMap with HashID and ToYaml functions

func Vault added in v0.8.0

func Vault(token string, path string, key string) (secret string)

Types

type Templates

type Templates struct {
	Client   client.Client
	Play     *ci.Play
	Spec     ci.PlaySpec
	Internal map[string]interface{}
	Values   map[string]interface{}
}

Templates structure with methods for templating - values.yaml - values.mongodb.yaml - values.postgre.yaml - .s3cfg

func (*Templates) GetValues

func (in *Templates) GetValues(ctx context.Context, out *bytes.Buffer, logger logr.Logger) error

GetValues builds the values from the template from Play resource

func (*Templates) PrintTemplate

func (in *Templates) PrintTemplate(ctx context.Context, out *bytes.Buffer, name string, templ string) error

Jump to

Keyboard shortcuts

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