Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigBool

func GetConfigBool(envKey string, defaultConf bool, logger zap.Logger) bool

GetConfigBool ...

func GetConfigInt

func GetConfigInt(envKey string, defaulfConf int, logger zap.Logger) int

GetConfigInt ...

func GetConfigString

func GetConfigString(envKey, defaultConf string) string

GetConfigString ...

func GetConfigStringList

func GetConfigStringList(envKey string, defaultConf string, logger zap.Logger) []string

GetConfigStringList ...

func GetGoPath

func GetGoPath() string

GetGoPath ...

func LoadClusterInfoMap

func LoadClusterInfoMap(kubeclient kubernetes.Interface, logger *zap.Logger) error

LoadClusterInfoMap ... Read cluster metadata from 'cluster-info' map and load into ENV

func ParseConfig

func ParseConfig(filePath string, conf interface{}, logger zap.Logger)

ParseConfig ...

func SetUpEvn

func SetUpEvn(kubeclient kubernetes.Interface, logger *zap.Logger) error

SetUpEvn ... Export the configmap (eg. cluster-info) to environment variables

Types

type ClusterInfo

type ClusterInfo struct {
	ClusterID   string `json:"cluster_id"`
	ClusterName string `json:"cluster_name,omitempty"`
	DataCenter  string `json:"datacenter,omitempty"`
	CustomerID  string `json:"customer_id,omitempty"`
}

ClusterInfo ...

Source Files