Add the instruction on how to override/add env vars for containers (#4995)

This commit is contained in:
Vincent 2022-06-03 11:42:52 -04:00 committed by GitHub
parent c95457ae72
commit 5fa1d67ec6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 0 deletions

View File

@ -481,6 +481,29 @@ spec:
- ssd
```
### Override the environment variables
The KnativeEventing resource is able to override or add the environment variables for the containers in the Knative Eventing
deployment resources. For example, if you would like to change the value of environment variable `METRICS_DOMAIN` in the
container `eventing-controller` into "knative.dev/my-repo" for the deployment `eventing-controller`, you need to change
your KnativeEventing CR as below:
```yaml
apiVersion: operator.knative.dev/v1beta1
kind: KnativeEventing
metadata:
name: knative-eventing
namespace: knative-eventing
spec:
deployments:
- name: eventing-controller
env:
- container: eventing-controller
envVars:
- name: METRICS_DOMAIN
value: "knative.dev/my-repo"
```
## Override system services
If you would like to override some configurations for a specific service, you can override the configuration by using `spec.services` in CR.

View File

@ -595,6 +595,29 @@ spec:
- ssd
```
### Override the environment variables
The KnativeServing resource is able to override or add the environment variables for the containers in the Knative Serving
deployment resources. For example, if you would like to change the value of environment variable `METRICS_DOMAIN` in the
container `controller` into "knative.dev/my-repo" for the deployment `controller`, you need to change your KnativeServing
CR as below:
```yaml
apiVersion: operator.knative.dev/v1beta1
kind: KnativeServing
metadata:
name: knative-serving
namespace: knative-serving
spec:
deployments:
- name: controller
env:
- container: controller
envVars:
- name: METRICS_DOMAIN
value: "knative.dev/my-repo"
```
## Override system services
If you would like to override some configurations for a specific service, you can override the configuration by using `spec.services` in CR.