diff --git a/docs/2._Configuration/3-edit-initial-configuration.md b/docs/2._Configuration/3-edit-initial-configuration.md index 9ac81b75df4b181ae0a8fea02e54c16485ae6f0f..e9f27a3e74e915c24da56183d64e8b465ef9a6e0 100644 --- a/docs/2._Configuration/3-edit-initial-configuration.md +++ b/docs/2._Configuration/3-edit-initial-configuration.md @@ -1,12 +1,12 @@ # Edit initial configuration -Users have the possibility of editing the initial manifest in order to provide new configurations. - -This needs to be done through the YAML manifest as shown below. +Users have the possibility of editing the initial manifest in order to provide new configurations. !!! warning - The `grafana.ini` segment is populated from the `spec` element, and any explicit change to the `grafana.ini` file will be lost. - See <https://grafana.com/docs/grafana/latest/administration/configuration/> for a full list of possible configurations to be used under the `spec` element. + As of now, whenever a user wants to add a new parameter/configuration to the `grafana.ini` file, this change must be done through the Custom Resource YAML manifest. The `grafana.ini` segment is populated from the `spec.config` element, and any explicit change to the `grafana.ini` file will be lost. + See <https://grafana.com/docs/grafana/latest/administration/configuration/> for a full list of possible configurations to be used under the `spec.config` element. + +For example, let's assume a user wants to add a new `[smtp]` configuration to the `grafana.ini` file. The procedure will be as follows: Under the `Administrator` environment, go to `Operators` and then to `Installed Operators`. Select your project and go to the `Grafana` tab: @@ -24,6 +24,44 @@ In here, under `spec`, you can edit any of the values made available by the Oper  +For the aforementioned `[smtp]` use case, our YAML must contains the following: + +```yaml +spec: + config: + analytics: + check_for_updates: true + auth: + disable_login_form: true + oauth_auto_login: true + auth.basic: + enabled: false + ... + # Our new configuration. Be aware of the indentation + smtp: + enabled: true + host: "cernmx.cern.ch:25" + from_address: "my-awesome-grafana@cern.ch" + ... +``` + +Eventually, this new `[smtp]` configuration will be **automagically** populated to the corresponding `grafana.ini`, and **no further action from the user is needed**. It will look as follows: + +```text +[analytics] +check_for_updates = true +[auth] +disable_login_form = true +oauth_auto_login = true +... +[smtp] +enabled = true +host = "cernmx.cern.ch:25" +from_address = "my-awesome-grafana@cern.ch" +``` + +Same applies for all configurations contained under <https://grafana.com/docs/grafana/latest/administration/configuration/> + Finally click <kbd>Save</kbd> to save your edition. !!! info