Add orchestrator.Cluster Configurations component
Related tasks
Context
An existing application needs to mount a file in an cluster pod. The current orchestrator.Cluster
definition does not provide an interface to do this directly.
In Kubernetes, the recommended way to mount files is by using config maps. The current orchestrator.Cluster
implementation allows mounting config maps inside pods, but provides no way to create and delete config maps.
Change
A new Configurations
component was introduced for the orchestrator.Cluster
, along with a Kubernetes implementation. The Kubernetes implementation includes a factory.
The orchestrator.Cluster
factory was updated to create a Configurations
component when initializing a cluster.
Other information
Only the Create
and Delete
operations are part of the current Configurations
interface, with no configuration retrieval methods (e.g. Get
, List
). It is assumed that configuration files will be mounted directly inside containers, and that applications will never have to interact with this information directly. Getting the list of configurations or accessing configuration information is considered future work.
Unrelated to this MR: there is a lot of repeated code here. We should think of ways to keep this code (especially factories) DRY or at least autogenerated.