Skip to content
Snippets Groups Projects
Commit 5c5f8a08 authored by Ismael Posada Trobo's avatar Ismael Posada Trobo
Browse files

Clarification when editing the spec.config element

parent 6eb81b04
No related branches found
No related tags found
1 merge request!4Clarification when editing the spec.config element
# 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
![image-26.png](../assets/image-26.png)
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment