title | type |
---|---|
Runtime components |
Details |
Kyma Environment Broker (KEB) serves the functionality of composing the list of components that are installed in a Runtime. The diagram and steps describe the KEB workflow in terms of calculating and processing Runtime components:
-
During KEB initialization, the broker reads two files that contain lists of components to be installed in a Runtime:
kyma-installer-cluster.yaml
file with the given Kyma versionmanaged-offering-components.yaml
file with additional managed components that are added at the end of the base components list
-
The user provisions a Runtime and selects optional components that they want to install.
-
KEB composes the final list of components by removing components that were not selected by the user. It also adds the proper global and components overrides and sends the whole provisioning information to the Runtime Provisioner.
There is a defined list of the component names. Use these names in your implementation.
To disable a component for a specific plan, add it to the disabled components list. To disable a component for all plans, add its name under the AllPlansSelector parameter.
An optional component is a component that is disabled by default but can be enabled in the provisioning request. Currently, the optional components are:
- Kiali
- Tracing
If you want to add the optional component, you can do it in two ways.
- If disabling a given component only means to remove it from the installation list, use the generic disabler:
runtime.NewGenericComponentDisabler("component-name", "component-namespace")
- If disabling a given component requires more complex logic, create a new file called
internal/runtime/{compoent-name}_disabler.go
and implement a service which fulfills the following interface:
// OptionalComponentDisabler disables component form the given list and returns a modified list
type OptionalComponentDisabler interface {
Disable(components internal.ComponentConfigurationInputList) internal.ComponentConfigurationInputList
NOTE: Check the CustomDisablerExample as an example of custom service for disabling components.
In each method, the framework injects the components parameter which is a list of components that are sent to the Runtime Provisioner. The implemented method is responsible for disabling component and as a result, returns a modified list.
This interface allows you to easily register the disabler in the cmd/broker/main.go
file by adding a new entry in the optionalComponentsDisablers list:
// Register disabler. Convention:
// {component-name} : {component-disabler-service}
//
// Using map is intentional - we ensure that component name is not duplicated.
optionalComponentsDisablers := runtime.ComponentsDisablers{
"Kiali": runtime.NewGenericComponentDisabler(components.Kiali),
"Tracing": runtime.NewGenericComponentDisabler(components.Tracing),
}
If you want to remove the option to disable components and make them required during Kyma installation, remove a given entry from the optionalComponentsDisablers list in the cmd/broker/main.go
file.