configmap_generator

package
v0.0.0-...-4b3f7f7 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug = false

Functions

func FilterVariables

func FilterVariables(appConfig *AppConfig, ansibleVars map[string]interface{}, appName string) map[string]interface{}

func Generate

func Generate(data ConfigMapData) (string, error)

func LoadVars

func LoadVars(baseFolder, env, vaultPassword string) (map[string]interface{}, error)

Loads variables from the vimond-ansible project. baseFolder: the location of the vimond-ansible project env: the name of the environment to use

func SubstituteVars

func SubstituteVars(vars map[string]interface{}) map[string]interface{}

func SuggestConfig

func SuggestConfig(baseDir string, levels int) ([]string, error)

Types

type AnsibleLookup

type AnsibleLookup struct {
	Type string
	Data []string
}

func (*AnsibleLookup) Equals

func (local *AnsibleLookup) Equals(other *AnsibleLookup) bool

type AppConfig

type AppConfig struct {
	Applications []Application
}

func New

func New(configPath string) (*AppConfig, error)

func (*AppConfig) AppNames

func (a *AppConfig) AppNames() []string

List of all the applications names

func (*AppConfig) CheckNameExists

func (a *AppConfig) CheckNameExists(name string) bool

func (*AppConfig) SanityCheck

func (a *AppConfig) SanityCheck() error

type Application

type Application struct {
	Name     string
	Prefixes []string
}

type ConfigMapData

type ConfigMapData struct {
	AppName string
	Data    string
}

type GeneratorConfig

type GeneratorConfig struct {
	AppName       string
	Environment   string
	GroupVars     string
	VaultPassword string
	AppConfig     *AppConfig
}

func (*GeneratorConfig) GenerateConfigMap

func (config *GeneratorConfig) GenerateConfigMap() (string, error)

func (*GeneratorConfig) GenerateConfigMapAsMap

func (config *GeneratorConfig) GenerateConfigMapAsMap() (map[string]interface{}, error)

Jump to

Keyboard shortcuts

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