# ECK flags and env configurations

**URL:** <https://discuss.elastic.co/t/eck-flags-and-env-configurations/244748>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [August 12, 2020, 3:26pm UTC](https://discuss.elastic.co/t/eck-flags-and-env-configurations/244748 "2020-08-12T15:26:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pup\_seba](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pup_seba/32/42988_2.png) [@pup\_seba](https://discuss.elastic.co/u/pup_seba)\
**Post date:** [August 12, 2020, 3:26pm UTC](https://discuss.elastic.co/t/eck-flags-and-env-configurations/244748/1 "2020-08-12T15:26:03Z")

</div>

Hi,

For configuring Elastic Cloud on Kubernetes (ECK), I tried following the instructions on this link: [https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-operator-config.html](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-operator-config.html)

I would like to change some of the default values using "environment variables". Can you please clarify where should I configure these? Am I supposed to change the all-in-one.yaml definition of the statefulset? Are those variables supposed to be added to the "values.yaml" of a helm chart? and if so, how? I tried in the values.yaml with either:

```auto
env:
  - name: AUTO_PORT_FORWARD
    value: false
  - name: OPERATOR_NAMESPACE
    value: sebas-elastic

```

and

```auto
AUTO_PORT_FORWARD: false
OPERATOR_NAMESPACE: sebas-elastic

```

I would rather not to change the CRD definition nor use flags during command line deployment (i don't deploy using CLI, but a gitops system instead).

Thank you.

---

<div class="post-metadata">

**Author:** ![charith-elastic](https://avatars.discourse-cdn.com/v4/letter/c/3ec8ea/32.png) [@charith-elastic](https://discuss.elastic.co/u/charith-elastic)\
**Post date:** [August 17, 2020, 7:24am UTC](https://discuss.elastic.co/t/eck-flags-and-env-configurations/244748/2 "2020-08-17T07:24:11Z")

</div>

You have to add the environment variable declarations to the `manager` container template defined in the `elastic-operator` StatefulSet definition. This is indeed in the `all-in-one.yaml` file. If you take a look at the `all-in-one.yaml`, there are already two environment variables declared (`OPERATOR_NAMESPACE` and `WEBHOOK_SECRET`). You can add more to that array.

That being said, `AUTO_PORT_FORWARD` is not a setting you should be concerned about as it is a flag that only takes effect in development mode. `OPERATOR_NAMESAPCE` is derived automatically from the namespace the operator is deployed to so you don't have to explicitly change it either. Just make sure the operator is deployed to `sebas-elastic` instead of `elastic-system` by changing the `namespace` of resources declared in the `all-in-one.yaml`.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 14, 2020, 7:24am UTC](https://discuss.elastic.co/t/eck-flags-and-env-configurations/244748/3 "2020-09-14T07:24:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
