You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can fine tune the installation of the runner to better match your environment and cloud provider.
380
380
381
+
### Custom global environment variables
382
+
383
+
You can add your own environment variables in the runtime environment, so that all pipeline steps have access to the same set of external files. A typical
384
+
example would be a shared secret that you want to pass everywhere.
385
+
386
+
To get a list of all available runtimes execute:
387
+
388
+
```
389
+
codefresh get runtime-environments
390
+
```
391
+
392
+
Choose the runtime that you want to modify and get its yaml representation:
393
+
394
+
```
395
+
codefresh get runtime-environments ivan@acme-ebs.us-west-2.eksctl.io/codefresh-runtime -o yaml > runtime.yaml
396
+
```
397
+
398
+
Under the `runtimeScheduler` block you can add an additional element with names `userEnvVars` that follows the same syntax as [secret/environment variables](https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-environment-variables)
399
+
400
+
`runtime.yaml`
401
+
{% highlight yaml %}
402
+
{% raw %}
403
+
runtimeScheduler:
404
+
type: KubernetesPod
405
+
imagePullPolicy: Always
406
+
cluster:
407
+
namespace: codefresh
408
+
clusterProvider:
409
+
accountId: 5c1658d1736122ee1114c842
410
+
selector: docker-desktop
411
+
serviceAccount: codefresh-engine
412
+
envVars:
413
+
LOGGER_LEVEL: debug
414
+
NODE_ENV: kubernetes
415
+
NODE_TLS_REJECT_UNAUTHORIZED: '0'
416
+
DISABLE_WORKSPACE_CACHE: 'true'
417
+
NO_EXT_MONITOR: 'true'
418
+
userEnvVars:
419
+
- name: SPECIAL_LEVEL_KEY
420
+
valueFrom:
421
+
secretKeyRef:
422
+
name: dev-db-secret
423
+
key: username
424
+
{% endraw %}
425
+
{% endhighlight %}
426
+
427
+
Update your runtime environment with the [patch command](https://codefresh-io.github.io/cli/operate-on-resources/patch/):
- Global volume mounts in the Codefresh runner - [documentation]({{site.baseurl}}/docs/administration/codefresh-runner/#custom-volume-mounts)
21
+
- Global environment variables in the Codefresh runner - [documentation]({{site.baseurl}}/docs/administration/codefresh-runner/#custom-global-environment-variables)
0 commit comments