You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no feedback for the user whether their changes are accepted or not.
We need to validate, edit and migrate the whole configmap, which is a single point of failure.
Describe the solution you'd like to see
Create CRD manually (addon-operator will not be managing CRDs).
The structure of CRD fields must be like this:
apiVersion: deckhouse.io/v1alpha1kind: ModuleSettingsmetadata:
name: prometheus # the name of the modulenamespace: d8-systemenabled: true / falsespec:
{module settings here ... }status:
lastCheckTime: 2019-08-08T12:00:00condition: accepted
User tells add-operator which apiVersion and kind of the CRD to listen instead of ConfigMap.
On every change, addon-operator validates spec parameters with an OpenAPI config schema. If validation pass, it sets custom resource status to accepted.
If validation fails, it sets custom resource status to validation error with an error message:
Instead of validating CRs in add-operator, consider preventing saving incorrect values to the cluster utilizing Kubernetes native feature - validating webhook. We can implement it using the same code (open API specs store) to perform validation. The only thing left is to connect our code to Kubernetes API.
By storing modules settings with a single custom resource definition we benefit from it things like seen all modules configuration with one kubectl command. However, it would be hard to write migrations. We need to add a field to the resource spec with a config version and then develop our own migration system based on mutating or conversion webhook.
Done in the Deckhouse using additional module and small changes in the Addon-operator. We may integrate ModuleConfig into addon-operator and drop configuring via ConfigMap in the future.
Problem overview
ConfigMap has its limits.
|
Enabled
is specialDescribe the solution you'd like to see
Additional context
We also need an implementation of MutatingWebhook to write migrations for modules settings to store them in Git.
The text was updated successfully, but these errors were encountered: