Support for Gitea Actions #459
Labels
No Label
has
backport
in progress
invalid
kind
breaking
kind
bug
kind
build
kind
dependency
kind
deployment
kind
docs
kind
enhancement
kind
feature
kind
lint
kind
proposal
kind
question
kind
refactor
kind
security
kind
testing
kind
translation
kind
ui
need
backport
priority
critical
priority
low
priority
maybe
priority
medium
reviewed
duplicate
reviewed
invalid
reviewed
wontfix
skip-changelog
status
blocked
status
needs-feedback
status
needs-reviews
status
wip
upstream
gitea
upstream
other
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/helm-chart#459
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Gitea supports Actions for a while, are there any plans to include them in this Helm-Chart?
Is there anything holding it back on a technical bases? I could try to add it, but I don't want to waste time if it's impossible in the first place.
The helm chart is not blocking here, all you need to do is to enable it in
app.ini
. https://docs.gitea.com/administration/config-cheat-sheet#actions-actionsThe default is
false
at the moment and I think going with the default is fine.I am not sure if there is any support for k8s at the moment so you might be facing issues. I think this is on the roadmap but not as one of the next features (I could be wrong with this).
Enabling it in the app.ini is easy, yes, but I thought more about adding actual runners.
Structurally similar to, say, memcache:
My (personal) goal would be that everything gets set up automatically at least for a reasonable default runner (whatever that is). I'm currently sifting the docs on how to best deploy runners in k8s, maybe it's doable for me.
If there's k8s support when can definitely think about adding support for runners. I don't know where the runner repo stands atm with k8s backend support, so if you get something going or find out that it's possible already, feel free to let us know and propose a design :) Happy to discuss and take a look.
Proposing something first might be best to avoid long discussions about the design etc for the chart :)
I've looked into the documentation. Starting runners doesn't seem too hard, however, they need to be registered using one-time tokens.
These tokens can't be pre-set, so there has to be some kind of interaction with the already running Gitea instance, I'm afraid.
The only viable option I can see is to first deploy gitea itself, then retrieve tokens from gitea via the API using the admin/user credentials supplied in the values and finally start and register the act_runners with these tokes.
The token-retrieval itself could be done by an initContainer in the act_runner pod(s).
Are there any plans to support actions?to Support for Gitea ActionsI finally found some time to actually dig into it a bit.
There seems to be some discussion in the Gitea repo as well about the token mechanism:
https://github.com/go-gitea/gitea/issues/24101
https://github.com/go-gitea/gitea/issues/24635
There even is a CLI command available (in the current 1.20-RC, not 1.19):
https://github.com/go-gitea/gitea/pull/23762
However, that still means, that one would have to exec into another pod after the actual gitea pod has started.
I tried using an init container right before the gitea container, but that created a wonderful seg-fault when executing the CLI command.
My current approach is to use a bitnami kubectl container as an init pod for the actual runners, do a "kubectl exec ..." from the init container to the gitea pod and then share the token via an in-memory volume. That kinda sorta works, but it feels rather hacky and absolutely defeats the point of the token.
With 1.20.4 I was able to do registration from pod with act-runner when I added `GITEA__SERVER__LOCAL_ROOT_URL environment variable to gitea pod and then mounted generated config directory to act-runner pod and executed registration.
With this statefulset and additional parameter for helm chart I was able to do fully automatic deployments of act-runner.
Values.yaml
Tested with following workflow:
Statefulset:
Thanks for sharing!
Would you mind porting this into a PR so we can discuss implementation details?
Some adhoc thoughts:
initContainers
should be ported to the existing initcontainersGITEA__SERVER__LOCAL_ROOT_URL
might be needed?Here are my findings:
GITEA__SERVER__LOCAL_ROOT_URL
is required as gitea command using this variable to determine where to request token..runner
file is different per runner so you need to havevolumeClaimTemplates
in the spec and this can't be done with deploymentsProblems:
Here final yaml without root user: