Rewrite init script #178
No reviewers
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#178
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "justusbunsi/helm-chart:rewrite-init-scripts"
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?
These changes rewrite the init script to be error aware, informative and have a bit more security awareness.
During rewrite several hidden bugs could be identified and fixed, such as:
e.g.
_my-ldap-auth
andmy-ldap-auth
In addition to that the script is a bit cleaner. Some commands do not exist anymore and would cause false-positive errors during script execution.
Helps for: #149
I've tested all changes for every possibility I could think of (probably not all ?). Even switching between both available images (root, rootless) to verify interoperability.
Some things (not really related to my changes) didn't work (properly):
Using not-active, skip-tls-verify, allow-deactivate-all, synchronize-users and attributes-in-bind for LDAP configuration. They are boolean values and would be passed like
--not-active ''
which breaks the command for some reason.Same for(Edit: incorrect statement)use-custom-urls
for OAuth command.Should I open separate issues for this or do we fix boolean option passing in this PR as well since they would break the init script?(Edit: Yes, fix in this PR as well.)@ -42,0 +49,4 @@
- name: GITEA_WORK_DIR
value: /data
- name: GITEA_TEMP
value: /tmp/gitea
Should we include
.Values.statefulset.env
intoinit-directories
init container sinceinitPreScript
execution takes place here and someone could reference custom environment variables?I just re-read the issue #149 and am sure that this PR will not fully fix it. The repeated failure on init container due to unavailable db is done and the script is more verbose. But right now no credentials are used for the db check.
really like what you did here, will test this in a few days
Rewrite init scriptto WIP: Rewrite init script6ffdb5c938
tofda4d86b87
WIP: Rewrite init scriptto Rewrite init scriptfda4d86b87
to805e863a63
Tested this PR in different clusters, with existing PVCs and new PVCs.
Looks good :)
Rewrite init scriptto WIP: Rewrite init scriptWIP: Rewrite init scriptto Rewrite init script@luhahn Done. Ready for another review.
b66f76b571
to41ed6f66dc