Merge pull request 'feat: example install & upgrade script' (#4) from limiting-factor/k8s:wip-install into main
Reviewed-on: https://code.forgejo.org///infrastructure/k8s/pulls/4 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
This commit is contained in:
commit
126a2ffb31
22
README.md
22
README.md
|
@ -114,6 +114,28 @@ sudo ln -s forgejo-v8 forgejo-v9
|
|||
sudo systemctl restart wakeup-on-logs-run
|
||||
```
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
self="${BASH_SOURCE[0]}"
|
||||
name=$(basename $self)
|
||||
# keep it lower than https://code.forgejo.org/infrastructure/wakeup-on-logs
|
||||
# otherwise it will get killed by it
|
||||
timeout=4m
|
||||
|
||||
function lxc_run() {
|
||||
lxc-attach $name -- sudo --user debian KUBECONFIG=/etc/rancher/k3s/k3s.yaml "$@" |& tee -a /var/log/$name.log
|
||||
}
|
||||
|
||||
image=codeberg.org/forgejo-experimental/forgejo
|
||||
major=${name##*v}
|
||||
digest=$(skopeo inspect --format "{{.Digest}}" docker://$image:$major-rootless)
|
||||
values=https://code.forgejo.org/infrastructure/k8s/raw/branch/main/forgejo-v$major/values.yml
|
||||
lxc_run helm upgrade forgejo -f $values -f /home/debian/secrets.yml oci://code.forgejo.org/forgejo-helm/forgejo --atomic --wait --timeout $timeout --install --set image.digest=$digest
|
||||
```
|
||||
|
||||
## Define Forgejo Helm values
|
||||
|
||||
* https://code.forgejo.org/infrastructure/k8s/src/branch/main/forgejo-v$version/values.yml
|
||||
|
|
Loading…
Reference in a new issue