Generic way for configuring Gitea app.ini #240
Reference in New Issue
Block a user
No description provided.
Delete Branch "refs/pull/240/head"
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?
With the result of PR #239 it is much easier to provide additional values to the app.ini configuration from different sources.
These changes adds an additionalConfigSources field where the users can define such sources. This enables the users to choose
on their own whether to store values in values.yaml or load them from Kuberetes Secrets or ConfigMaps.
Currently, I just wrote down my thoughts without implementing it, because I need a second opinion on what the users should actually define and how. Both ways require some structure for the references Kubernetes resources:
GITEA__LOG_0x2E_CONSOLE__STDERR=false
The first approach would keep prefixing with
GITEA_
to the Helm Chart as well as converting.
into0x2E
. The second one is easier for the Helm Chart but more complex for the users.@luhahn & @lunny, shall I proceed with the first approach? Details here.
EDIT: After chatting with Luhahn, I'll proceed with the current approach (the first one).
Just realized that this fixes neither #174 nor the mentioned oauth topic since these values are not configured inside app.ini. ?♂️But I think it is still a neat addition to the chart giving more flexibility about how to configure Gitea.See PR comment.
Hi @lord-kyron and @volker.raschek. You've opened several issues in the past asking for options to securely pass sensitive data to the Gitea app.ini. This PR provides a really generic way to craft the app.ini from various sources.
Feel free to check it out and experiment with it. I'd be happy for any user feedback. Detailed description on how to use it can be found here.
⚠️ This PR is based on different open PRs and contains some breaking changes, so it is considered bloody edge. Please have a look at #244 and #248.
Some thoughts for reviewers
The latest changes align the processing for inline sources with additional sources. Therefore I've added another Kubernetes secret where the inline sources are stored the same way as additional sources requires it.
Logging helps to understand what setting is used for the final
app.ini
and from which source it came. In case of duplicate settings, there is a (natural) override mechanism:values.yaml
over default Helm Chartvalues.yaml
settingsThe already ensured persistence for "secret" settings remains untouched.
LGTM, already tested a bunch of values
Ok. Kept it in sync with head branch the last 24 hours. ?
Hello !
I will try this PR in the afternoon.
Having reviewed the changes, I find the following benefits :
From a very first sight, it seems there is a typo in commit
30e4f75b
(line 302-304).Those lines are volume mounts in a volume section with the wrong indentation. It breaks templating when defining extra volume mounts in values.yaml.
Awesome.
Good catch. Fixed.
looks good to me