Add documentation about updating Gitea #13
@ -41,3 +41,31 @@ Kubernetes before uploading them again. This is done by this script:
|
|||||||
> @whitecolor, in your case you should be fine by clearing `PV.Spec.ClaimRef.UID` in the PV. Only the re-created PVC (with any UID) can then use the PV. And it's your responsibility that only the right person can craft appropriate PVC so nobody can steal your data.
|
> @whitecolor, in your case you should be fine by clearing `PV.Spec.ClaimRef.UID` in the PV. Only the re-created PVC (with any UID) can then use the PV. And it's your responsibility that only the right person can craft appropriate PVC so nobody can steal your data.
|
||||||
|
|
||||||
https://github.com/kubernetes/kubernetes/issues/48609#issuecomment-314066616
|
https://github.com/kubernetes/kubernetes/issues/48609#issuecomment-314066616
|
||||||
|
|
||||||
|
## Update Gitea
|
||||||
|
|
||||||
|
### Released version
|
||||||
|
|
||||||
|
Change the image for the gitea-server container
|
||||||
|
(`kubernetes/gitea-server.yaml`) to `gitea/gitea:TAG`, for example:
|
||||||
|
`gitea/gitea:1.7.0-rc2`
|
||||||
|
|
||||||
|
### Unreleased version
|
||||||
|
|
||||||
|
This is useful to deploy features that are in master but not yet in a release.
|
||||||
|
|||||||
|
|
||||||
|
$ docker pull gitea/gitea
|
||||||
raucao
commented
Pretty sure creating orgs is not part of the update process. This should be done before documenting how to update anything imo. Pretty sure creating orgs is not part of the update process. This should be done before documenting how to update anything imo.
raucao
commented
Obsolete comment. Already explained in PR description as TODO. Obsolete comment. Already explained in PR description as TODO.
|
|||||||
|
$ docker tag gitea/gitea:latest kosmosorg/gitea:production
|
||||||
|
$ docker push kosmosorg/gitea
|
||||||
raucao
commented
This is missing the build step for our own image. But also, we should build on Drone CI anyway, as discussed. This is missing the build step for our own image. But also, we should build on Drone CI anyway, as discussed.
|
|||||||
|
|
||||||
|
Set the image for the gitea-server container to `kosmosorg/gitea:latest`, or run
|
||||||
|
this command to force a deployment if it is already set to it
|
||||||
|
|
||||||
|
$ kubectl patch deployment gitea-server -p "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"date\":\"`date +'%s'`\"}}}}}"
|
||||||
raucao
commented
Set the image where? And also why wouldn't we always use the same tag to be deployed; isn't that what they're for? So that we only have to tag an image, not change Kubernetes config? Set the image where? And also why wouldn't we always use the same tag to be deployed; isn't that what they're for? So that we only have to tag an image, not change Kubernetes config?
raucao
commented
I'd propose a tag like I'd propose a tag like `production`, similar to the Git tags/branches we're using elsewhere.
greg
commented
It depends, I think sometimes we'll want to use releases, so official images, and sometimes we'll want an unreleased feature. It depends, I think sometimes we'll want to use releases, so official images, and sometimes we'll want an unreleased feature. `production` tag sounds good
raucao
commented
The question about how/where to "set the image to x" is still unanswered by the doc. The question about how/where to "set the image to x" is still unanswered by the doc.
greg
commented
This is still the old commit because we're commenting on it, new content is:
This is still the old commit because we're commenting on it, new content is:
```
Change the image for the gitea-server container
(`kubernetes/gitea-server.yaml`) to `gitea/gitea:TAG`, for example:
`gitea/gitea:1.7.0-rc2`
```
raucao
commented
Oh, looks like Gitea's "show outdated" thing is not applied correctly then. Thanks. Oh, looks like Gitea's "show outdated" thing is not applied correctly then. Thanks.
|
|||||||
|
|
||||||
|
### Build our own image
|
||||||
|
|
||||||
|
At the root of the [https://github.com/go-gitea/gitea](gitea repo)
|
||||||
|
|
||||||
|
$ DOCKER_TAG=production DOCKER_IMAGE=kosmosorg/gitea make docker # builds and tags kosmosorg/gitea:production locally
|
||||||
|
$ docker push kosmosorg/gitea
|
||||||
|
You mean like
gitea/gitea:latest
? If we never want to deploy our own code, then we never have to use our own repo afaics. But we do want to be able to deploy our own code.Yes, but a copy of
gitea/gitea:latest
at the revision we want, instead of always keeping up with their latest. Creating our own images should be a separate issue