Skip to content

Commit 340aedc

Browse files
Volume mounts in the Codefresh runner
1 parent c5d7bf5 commit 340aedc

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

_docs/administration/codefresh-runner.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,54 @@ codefresh attach runtime --agent-name $AGENT_NAME --agent-kube-namespace codefre
378378

379379
## Configuration options
380380

381+
You can fine tune the installation of the runner to better match your environment and cloud provider.
382+
383+
384+
### Custom volume mounts
385+
386+
You can add your own volume mounts in the runtime environment, so that all pipeline steps have access to the same set of external files. A typical
387+
example of this scenario is when you want to make a set of SSL certificates available to all your pipelines. Rather than manually
388+
downlading the certificates in each pipeline, you can provide them centrally on the runtime level.
389+
390+
To get a list of all available runtimes execute:
391+
392+
```
393+
codefresh get runtime-environments
394+
```
395+
396+
Choose the runtime that you want to modify and get its yaml representation:
397+
398+
```
399+
codefresh get runtime-environments ivan@acme-ebs.us-west-2.eksctl.io/codefresh-runtime -o yaml > runtime.yaml
400+
```
401+
402+
Under the `dockerDaemonScheduler` block you can add two additional elements with names `userVolumeMounts` and `userVolumes` (they follow the same syntax as normal `volumes` and `volumeMounts`) and define your own global volumes
403+
404+
`runtime.yaml`
405+
{% highlight yaml %}
406+
{% raw %}
407+
dockerDaemonScheduler:
408+
userVolumeMounts:
409+
my-test:
410+
name: test
411+
mountPath: /etc/ssl/cert
412+
readOnly: true
413+
userVolumes:
414+
test:
415+
name: test
416+
secret:
417+
secretName: test-secret
418+
419+
{% endraw %}
420+
{% endhighlight %}
421+
422+
Update your runtime environment with the [patch command](https://codefresh-io.github.io/cli/operate-on-resources/patch/):
423+
424+
```
425+
codefresh patch runtime-environment ivan@acme-ebs.us-west-2.eksctl.io/codefresh-runtime -f runtime.yaml
426+
```
427+
428+
381429
### Installing on AWS
382430

383431
If you install the Codefresh runner on [EKS](https://aws.amazon.com/eks/) or any other custom cluster (e.g. with kops) in Amazon you need to configure it properly to work with EBS volume in order to gain [caching]({{site.baseurl}}/docs/configure-ci-cd-pipeline/pipeline-caching/).

_docs/whats-new/whats-new.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ toc: true
88
---
99
Recent Codefresh updates:
1010

11+
### November 2020
12+
13+
- Global volume mounts in the Codefresh runner - [documentation]({{site.baseurl}}/docs/administration/codefresh-runner/#custom-volume-mounts)
14+
1115
### October 2020
1216

1317
- Using Google for SSO - [documentation]({{site.baseurl}}/docs/administration/single-sign-on/sso-google/)

0 commit comments

Comments
 (0)