# Override default configuration

A number of values can be set in the [StackState Helm chart](https://github.com/StackVista/helm-charts/tree/master/stable/stackstate). For example, it's possible to customize the `tolerations` and `nodeSelectors` for each of the components. You can also add customized configuration and include environment variables

## Custom configuration for StackState `api`

For the StackState `api` service, custom configuration can be dropped directly into the Helm chart. This is the advised way to override the default configuration that StackState ships with and is especially convenient for customizing authentication. Configuration set in this way will be available to the StackState configuration file in [HOCON](https://github.com/lightbend/config/blob/master/HOCON.md) format.

For example, you can set a custom "forgot password link" for the StackState login page:

{% tabs %}
{% tab title="values.yaml" %}

```
stackstate:
  components:
    api:
      config: |
        stackstate.api.authentication.forgotPasswordLink =
        "https://www.stackstate.com/forgotPassword.html"
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Note that custom configuration set here will be overridden by [environment variables](#environment-variables).
{% endhint %}

## Environment variables

The configuration for all of the StackState services (`receiver`, `k2es-*`, `correlation` and `api`) can be customized using environment variables. Environment variables are specified in the `values.yaml` file and can be either `secret` (such as passwords) or `open` (for normal values). To convert a configuration item to an environment variable name, replace `.` with `_` and add the prefix `CONFIG_FORCE_`.

```
# configuration item
stackstate.api.authentication.forgotPasswordLink

# environment variable name
CONFIG_FORCE_stackstate_api_authentication_forgotPasswordLink
```

For example, you can set a custom "forgot password link" for the StackState login page:

{% tabs %}
{% tab title="values.yaml" %}

```
stackstate:
  components:
    api:
      extraEnv:
        # Use 'secret:' to add configuration that should be stored as a secret
        open:
          CONFIG_FORCE_stackstate_api_authentication_forgotPasswordLink:
          "https://www.stackstate.com/forgotPassword.html"
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
For the StackState `api` service, environment variables will override [custom configuration set using `config`](#custom-configuration-for-stackstate-api).
{% endhint %}

* Full details on the naming of all the different services can be found in the [StackState Helm chart readme](https://github.com/StackVista/helm-charts/tree/master/stable/stackstate).
* Find more details on [customizing authentication](/5.1/configure/security/authentication.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://archivedocs.stackstate.com/5.1/setup/install-stackstate/kubernetes_openshift/customize_config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
