add documentation for forgejo autoscaler#1577
Conversation
✅ Deploy Preview for keda ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thank you for your contribution! 🙏 We will review your PR as soon as possible.
Learn more about:
|
Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>
Co-authored-by: ChristopherHX <christopher.homberger@web.de> Signed-off-by: Jaime <cobak78@gmail.com>
ChristopherHX
left a comment
There was a problem hiding this comment.
I know 3 weeks passed, but my workload didn't allow to take a deeper look at your change on a repository where I am not maintainer of
I will try today to use your instruction to setup for my first time ever forgejo locally including your scaler, then I might provide some feedback how this goes.
My knowledge of Forgejo ends where it diverges from Gitea and I just realized that I need to build your branch of keda first, since my keda experiments with Gitea used the existing github_runner scaler that is part of keda for long
Co-authored-by: ChristopherHX <christopher.homberger@web.de> Signed-off-by: Jaime <cobak78@gmail.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de> Signed-off-by: Jaime <cobak78@gmail.com>
|
I got the following example scalejob working using docker labels and dind, the current example here seems to be broken on my end. E.g. Require existing PVC with a apiVersion: keda.sh/v1alpha1
kind: ScaledJob
metadata:
labels:
app: forgejo-runner
name: forgejo-runner
namespace: runners
spec:
jobTargetRef:
template:
metadata:
labels:
app: forgejo-runner
spec:
restartPolicy: Never
shareProcessNamespace: true
volumes:
- name: runner-config
configMap:
name: runner-config
- name: runner-data
emptyDir: {} # ephemeral, writable storage
- name: docker-graph-storage
emptyDir: {}
- name: docker-certs
emptyDir: {}
initContainers:
- name: copy-config
image: code.forgejo.org/forgejo/runner:6.3.1
command: ["sh", "-c", "cp /config/.runner /data/"]
volumeMounts:
- name: runner-config
mountPath: /config
- name: runner-data
mountPath: /data
containers:
- name: runner
image: code.forgejo.org/forgejo/runner:6.3.1
command:
- "sh"
- "-c"
- |
trap 'pkill -SIGINT dockerd' EXIT
while ! nc -z localhost 2376; do
echo "Waiting for TCP port 2376..."
sleep 1
done
echo "Port 2376 is open!"
forgejo-runner one-job
env:
- name: DOCKER_HOST
value: "tcp://localhost:2376"
- name: DOCKER_TLS_VERIFY
value: "1"
- name: DOCKER_CERT_PATH
value: /certs/client
securityContext: # for "pkill -SIGINT dockerd", docker:dind-rootless do not need this, however this fails for me during container creation
runAsUser: 0
runAsGroup: 0
volumeMounts:
- name: runner-data
mountPath: /data
- name: docker-certs
mountPath: /certs/client
- name: docker
image: docker:dind
securityContext:
privileged: true
volumeMounts:
- name: docker-graph-storage
mountPath: /var/lib/docker
- name: docker-certs
mountPath: /certs/client
minReplicaCount: 0
maxReplicaCount: 20
pollingInterval: 30
triggers:
- type: forgejo-runner
metadata:
name: "forgejo-runner-ubuntu"
token: "6866a82995c4509b77669100a8e8dba70f7f4151"
address: "http://x.x.x.x:3000/"
global: "true" ## optional
owner: "" ## optional
repo: "" ## optional
labels: "ubuntu-latest"One disadvantage for my internet speed is, no image cache |
Signed-off-by: jaime merino <jaime.merino_mora@mail.schwarz>
|
Thanks for the review and sorry for the delay, i changed a bit how the config and registration works to avoid using PVC and just make configmap works, also add some documentation on how to make it work with docker in docker capabilities to build and push images |
zroubalik
left a comment
There was a problem hiding this comment.
Do we have an update for this as well?
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
|
PTAL @zroubalik |
Added documentation on how to configure and use a forgejo autoescaler
Checklist
Fixes #