Unable to switch gitea.config.server.PROTOCOL back to http from https without deleting pod #344
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#344
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?
Summary
I use Gitea on k8s behind a Caddy reverse proxy which does SSL termination. I was trying to upgrade my Gitea helm deployment so that the public URL it showed was https (e.g. for cloning). I mistakenly changed
gitea.config.server.PROTOCOL
tohttps
which caused gitea to fail to start because I didn't have a certificate set up. However, after switchingPROTOCOL
back tohttp
and upgrading, gitea still tried to start HTTPS and crashed. I ended up having to delete the pod and upgrade to get it to "take" thehttp
value forPROTOCOL
.Steps to reproduce
run
helm3 install gitea-issue gitea-charts/gitea --values values.yaml
with the following values.ymlvisit gitea instance; observe that it's running
run
helm3 upgrade gitea-issue gitea-charts/gitea --values values.yaml
with the following valuesvisit gitea instance; observe 503 nginx error (expected as SSL cert has not been configured)
run
kubectl logs gitea-issue-0
observerun
helm3 upgrade gitea-issue gitea-charts/gitea --values values.yaml
with the following valuesvisit gitea instance; observe 503 nginx error (unexpected, because
PROTOCOL
was explicitly set back tohttp
)run
kubectl logs gitea-issue-0
observeWork around
kubectl delete gitea-issue-0
helm3 upgrade gitea-issue gitea-charts/gitea --values values.yaml
withPROTOCOL
set tohtml
It might be a bug with the checksums for configmap or secret content. Thanks for the detailed description.
So, the checksums are generated as expected. It has something to do with statefulset being in a pending state from the previous attempt (using https). For some reason it does not replace the pod automatically in such case. Further investigate required. Maybe even forcing pod removal in such case using Helm hooks.
Right now it seems a "natural" behavior and the pod must be removed manually.
I guess this might be a case of "too much investigation/work needed" for too less gain?
@justusbunsi I'd favor closing here unless you have immediate plans to tackle this? Primarily to clean up a bit and not having such unclear/minor issues hanging around.
The behavior of not being able to restore default values in app.ini is a duplicate of #356 and as stated there, a regression of #239. This will be fixed sooner or later.
The requirement of replacing the pod itself is how the Chart currently works. For an actual on-the-fly configuration Gitea must be able to
This is something I am thinking about for quite some time now. And it requires some fundamental changes in Gitea and the Helm Chart. At some point I like to realize such kind of Configuration as Code for Gitea.
All in all I agree that we can close this issue as duplicate of #356.
Duplicate of #356