Documentation ¶
Overview ¶
Package overrides implements the logic related to handling overrides. The manually-provided overrides have precedence over standard Kyma overrides defined in the cluster.
The code in the package uses the user-provided function for logging.
Index ¶
- func MergeMaps(a, b map[string]interface{}) map[string]interface{}
- type Builder
- func (ob *Builder) AddFile(file string) error
- func (ob *Builder) AddInterceptor(overrideKeys []string, interceptor OverrideInterceptor)
- func (ob *Builder) AddOverrides(chart string, overrides map[string]interface{}) error
- func (ob *Builder) Build() (Overrides, error)
- func (ob *Builder) Raw() (Overrides, error)
- type CertificateOverrideInterceptor
- type DomainNameOverrideInterceptor
- type FallbackOverrideInterceptor
- func (i *FallbackOverrideInterceptor) Fallback() interface{}
- func (i *FallbackOverrideInterceptor) Intercept(value interface{}, key string) (interface{}, error)
- func (i *FallbackOverrideInterceptor) String(value interface{}, key string) string
- func (i *FallbackOverrideInterceptor) Undefined(overrides map[string]interface{}, key string) error
- type OverrideInterceptor
- type Overrides
- type Provider
- type RegistryDisableInterceptor
- type RegistryInterceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Overrides manages override merges
func (*Builder) AddInterceptor ¶
func (ob *Builder) AddInterceptor(overrideKeys []string, interceptor OverrideInterceptor)
AddInterceptor registers an interceptor for particular override keys
func (*Builder) AddOverrides ¶
AddOverrides adds overrides for a chart to the builder
type CertificateOverrideInterceptor ¶
type CertificateOverrideInterceptor struct {
// contains filtered or unexported fields
}
CertificateOverrideInterceptor handles certificates
func NewCertificateOverrideInterceptor ¶
func NewCertificateOverrideInterceptor(tlsCrtOverrideKey, tlsKeyOverrideKey string, kubeClient kubernetes.Interface) *CertificateOverrideInterceptor
func (*CertificateOverrideInterceptor) Intercept ¶
func (i *CertificateOverrideInterceptor) Intercept(value interface{}, key string) (interface{}, error)
func (*CertificateOverrideInterceptor) String ¶
func (i *CertificateOverrideInterceptor) String(value interface{}, key string) string
type DomainNameOverrideInterceptor ¶
type DomainNameOverrideInterceptor struct {
// contains filtered or unexported fields
}
DomainNameOverrideInterceptor resolves the domain name for the cluster
func NewDomainNameOverrideInterceptor ¶
func NewDomainNameOverrideInterceptor(kubeClient kubernetes.Interface, log logger.Interface) *DomainNameOverrideInterceptor
func (*DomainNameOverrideInterceptor) Intercept ¶
func (i *DomainNameOverrideInterceptor) Intercept(value interface{}, key string) (interface{}, error)
func (*DomainNameOverrideInterceptor) String ¶
func (i *DomainNameOverrideInterceptor) String(value interface{}, key string) string
type FallbackOverrideInterceptor ¶
type FallbackOverrideInterceptor struct {
// contains filtered or unexported fields
}
FallbackOverrideInterceptor sets a default value for an undefined overwrite
func NewFallbackOverrideInterceptor ¶
func NewFallbackOverrideInterceptor(fallback interface{}) *FallbackOverrideInterceptor
func (*FallbackOverrideInterceptor) Fallback ¶
func (i *FallbackOverrideInterceptor) Fallback() interface{}
func (*FallbackOverrideInterceptor) Intercept ¶
func (i *FallbackOverrideInterceptor) Intercept(value interface{}, key string) (interface{}, error)
func (*FallbackOverrideInterceptor) String ¶
func (i *FallbackOverrideInterceptor) String(value interface{}, key string) string
type OverrideInterceptor ¶
type OverrideInterceptor interface { //String shows the value of the override String(value interface{}, key string) string //Intercept is executed when the override is retrieved Intercept(value interface{}, key string) (interface{}, error) //Undefined is executed when the override is not defined Undefined(overrides map[string]interface{}, key string) error }
OverrideInterceptor is controlling access to override values
type Overrides ¶
type Overrides struct {
// contains filtered or unexported fields
}
func (Overrides) Find ¶
Find returns a value on the overrides following a path separated by "." and if it exists.
type Provider ¶
type Provider interface { //OverridesGetterFunctionFor returns a function returning overrides for a Helm release with the provided name. //Before using this function, ensure that the overrides cache is populated by calling the ReadOverridesFromCluster function. OverridesGetterFunctionFor(name string) func() map[string]interface{} }
Provider defines the contract for reading overrides for a given Helm release.
func New ¶
func New(client kubernetes.Interface, overrides map[string]interface{}, log logger.Interface) (Provider, error)
New returns a new Provider.
overridesYaml contains a list of manually-provided overrides. Every value in the list contains data in the YAML format. The structure of the file should follow the Helm's values.yaml convention. There is one difference from the plain Helm's values.yaml file: These are not values for a single release but for the entire Kyma installation. Because of that, you have to put values for a specific Component (e.g: Component name is "foo") under a key equal to the component's name (i.e: "foo"). You can also put overrides under a "global" key. These will merge with the top-level "global" Helm key for every Helm chart.
type RegistryDisableInterceptor ¶
type RegistryDisableInterceptor struct {
// contains filtered or unexported fields
}
func NewRegistryDisableInterceptor ¶
func NewRegistryDisableInterceptor(kubeClient kubernetes.Interface) *RegistryDisableInterceptor
func (*RegistryDisableInterceptor) Intercept ¶
func (i *RegistryDisableInterceptor) Intercept(value interface{}, key string) (interface{}, error)
func (*RegistryDisableInterceptor) String ¶
func (i *RegistryDisableInterceptor) String(value interface{}, key string) string
type RegistryInterceptor ¶
type RegistryInterceptor struct {
// contains filtered or unexported fields
}
func NewRegistryInterceptor ¶
func NewRegistryInterceptor(kubeClient kubernetes.Interface) *RegistryInterceptor
func (*RegistryInterceptor) Intercept ¶
func (i *RegistryInterceptor) Intercept(value interface{}, key string) (interface{}, error)
func (*RegistryInterceptor) String ¶
func (i *RegistryInterceptor) String(value interface{}, key string) string