mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-11 17:50:08 +01:00
docs: add remaining docs back with some additions/improvements
This commit is contained in:
parent
f147295418
commit
0bd75fd1bb
12 changed files with 538 additions and 1 deletions
38
docs/kubernetes_runner.md
Normal file
38
docs/kubernetes_runner.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Kubernetes Runner Setup
|
||||
|
||||
Using the GitLab Kubernetes runner allows your CI jobs to run as pods in a Kubernetes cluster.
|
||||
Nix GitLab CI can be integrated with this setup, and using advanced configuration options like
|
||||
`pod_spec` makes it easy to add runner specific caching.
|
||||
|
||||
Using this Runner configuration ...
|
||||
|
||||
```toml
|
||||
[[runners.kubernetes.pod_spec]]
|
||||
name = "nix-ci-cache-secrets"
|
||||
patch = '''
|
||||
containers:
|
||||
- name: build
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: nix-ci-cache-env
|
||||
'''
|
||||
```
|
||||
|
||||
... and a secret containing ...
|
||||
|
||||
```yaml
|
||||
NIX_CI_RUNNER_CACHE_STRATEGY: attic
|
||||
ATTIC_SERVER: <in-cluster-url> # example: http://atticd.<ns>.svc.cluster.local:8080
|
||||
ATTIC_CACHE: ci # name however you want, just needs to exist
|
||||
ATTIC_TOKEN: <token>
|
||||
```
|
||||
|
||||
... makes your jobs automatically cache their Nix store paths to the in-cluster
|
||||
attic when running with this runner.
|
||||
|
||||
Other runners could use cachix or no cache, you get the idea ;P
|
||||
|
||||
!!! note
|
||||
|
||||
This of course works with any executor where you can set environment
|
||||
variables. This is just an example how to do it in Kubernetes easily.
|
||||
Loading…
Add table
Add a link
Reference in a new issue