Documentation ¶
Index ¶
- func BuildEnvParamsForModule(moduleName, paramsStr, componentParams, envDir string) (string, error)
- func DeleteFromObject(fieldPath []string, paramsData, key, root string) (string, error)
- func EvaluateEnv(a app.App, sourcePath, paramsStr, envName, moduleName string) (string, error)
- func JsonnetEnvObject(a app.App, envName string) (string, error)
- func PatchJSON(jsonObject, patch, patchName string) (string, error)
- func SetInObject(fieldPath []string, paramsData, key string, value interface{}, root string) (string, error)
- func ToMap(componentName, src, root string) (map[string]interface{}, error)
- type Entry
- type EnvComponentRemover
- type EnvGlobalsSet
- type EnvGlobalsUnset
- type EnvParamSet
- type EnvParamUnset
- type Lister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildEnvParamsForModule ¶ added in v0.12.0
BuildEnvParamsForModule builds environment parameters for a specific module.
Given the following paramsStr and moduleName `app.project-1`, return only the parameters with that prefix. ```
{ components: { "app.project-1.deployment": { replicas: 1, }, "infra.security.deployment": { name: "tool", }, "deployment": { replicas: 3, }, }, }
```
func DeleteFromObject ¶
DeleteFromObject deletes a value from an object. `root` will generally be either `components` or `global`. `key` is the component name.
func EvaluateEnv ¶
EvaluateEnv evaluates environment parameters.
func JsonnetEnvObject ¶ added in v0.12.0
JsonnetEnvObject creates an object with the current ksonnet environment. This object includes the current server and namespace. The object is suitable to use as a Jsonnet ext code option.
Types ¶
type Entry ¶ added in v0.12.0
type Entry struct { // ComponentName is the component that owns this entry. ComponentName string // ParamName is the name of the parameter. ParamName string // Value is the value of the parameter. Value string }
Entry is parameter entry. It uses to hold output when listing parameters.
type EnvComponentRemover ¶
type EnvComponentRemover struct { }
EnvComponentRemover removes param configuration for components from env params libsonnet files.
func NewEnvComponentRemover ¶
func NewEnvComponentRemover() *EnvComponentRemover
NewEnvComponentRemover creates an instance of EnvComponentRemover.
type EnvGlobalsSet ¶
type EnvGlobalsSet struct { }
EnvGlobalsSet sets environment globals.
func NewEnvGlobalsSet ¶
func NewEnvGlobalsSet() *EnvGlobalsSet
NewEnvGlobalsSet creates an instance of EnvGlobalsSet.
type EnvGlobalsUnset ¶
type EnvGlobalsUnset struct { }
EnvGlobalsUnset un-sets global environment params.
func NewEnvGlobalsUnset ¶
func NewEnvGlobalsUnset() *EnvGlobalsUnset
NewEnvGlobalsUnset creates an instance of EnvGlobalsUnset.
type EnvParamSet ¶
type EnvParamSet struct { }
EnvParamSet sets environment params for a component.
func NewEnvParamSet ¶
func NewEnvParamSet() *EnvParamSet
NewEnvParamSet creates an instance of EnvParamSet.
type EnvParamUnset ¶
type EnvParamUnset struct { }
EnvParamUnset unset param configuration for components from env params libsonnet files.
func NewEnvParamUnset ¶
func NewEnvParamUnset() *EnvParamUnset
NewEnvParamUnset creates an instance of EnvParamUnset.
type Lister ¶ added in v0.12.0
type Lister struct { // Destination is the cluster details. Destination app.EnvironmentDestinationSpec // AppRoot is the root path for the application. AppRoot string // contains filtered or unexported fields }
Lister lists parameters.