Documentation ¶
Index ¶
- func MergeValues(base map[string]any, valueFiles []string, values string) (map[string]any, error)
- func SetNestedField(values map[string]any, field1 string, field2 string, value any)
- func ToValidName(name string) string
- type ImageProvider
- type ValueComputer
- func (hvc *ValueComputer) AppValues() map[string]any
- func (hvc *ValueComputer) Cluster() provider.Cluster
- func (hvc *ValueComputer) Compute(ctx context.Context) error
- func (hvc *ValueComputer) ComputeHostname(ctx context.Context) (string, error)
- func (hvc *ValueComputer) CreateNamespace() bool
- func (hvc *ValueComputer) Environment() api.Environment
- func (hvc *ValueComputer) ImageProvider() *ImageProvider
- func (hvc *ValueComputer) Namespace() string
- func (hvc *ValueComputer) RequiresCustomHost(ctx context.Context) (bool, error)
- func (hvc *ValueComputer) RuntimeValues() map[string]any
- func (hvc *ValueComputer) SetCreateNamespace(createNamespace bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeValues ¶
func MergeValues( base map[string]any, valueFiles []string, values string, ) (map[string]any, error)
MergeValues merges values from different sources similar to helm CLI. The order of precedence is (top is highest)
- set values (--set flag) - value files (--values flag) - base (cli defaults)
This matches helm CLI, except they don't really have "base"
func SetNestedField ¶
func ToValidName ¶
Types ¶
type ImageProvider ¶
type ImageProvider struct {
// contains filtered or unexported fields
}
func NewImageProvider ¶
func NewImageProvider( defaultLocalImage string, imagePublishMap map[string]string, imageRegistryHost string, ) *ImageProvider
func (*ImageProvider) GetRegistryHost ¶
func (i *ImageProvider) GetRegistryHost() string
type ValueComputer ¶
type ValueComputer struct {
// contains filtered or unexported fields
}
ValueComputer transforms jetpack CLI inputs into helm values. Right now we mostly copy paste the logic, but the idea is to have individual modules that compute sections of the values. e.g. ambassadorModule, cronjobModule, etc.
func NewValueComputer ¶
func NewValueComputer( env api.Environment, namespace string, execQualifiedSymbol string, imageProvider *ImageProvider, jetCfg *jetconfig.Config, c provider.Cluster, ) *ValueComputer
func (*ValueComputer) AppValues ¶
func (hvc *ValueComputer) AppValues() map[string]any
func (*ValueComputer) Cluster ¶
func (hvc *ValueComputer) Cluster() provider.Cluster
func (*ValueComputer) Compute ¶
func (hvc *ValueComputer) Compute(ctx context.Context) error
Compute converts command options to helm values.
func (*ValueComputer) ComputeHostname ¶
func (hvc *ValueComputer) ComputeHostname(ctx context.Context) (string, error)
func (*ValueComputer) CreateNamespace ¶
func (hvc *ValueComputer) CreateNamespace() bool
func (*ValueComputer) Environment ¶
func (hvc *ValueComputer) Environment() api.Environment
func (*ValueComputer) ImageProvider ¶
func (hvc *ValueComputer) ImageProvider() *ImageProvider
func (*ValueComputer) Namespace ¶
func (hvc *ValueComputer) Namespace() string
func (*ValueComputer) RequiresCustomHost ¶
func (hvc *ValueComputer) RequiresCustomHost(ctx context.Context) (bool, error)
func (*ValueComputer) RuntimeValues ¶
func (hvc *ValueComputer) RuntimeValues() map[string]any
func (*ValueComputer) SetCreateNamespace ¶
func (hvc *ValueComputer) SetCreateNamespace(createNamespace bool)
Click to show internal directories.
Click to hide internal directories.