k8s-land / gitea-chart Goto Github PK
View Code? Open in Web Editor NEWGitea Helm Chart
Home Page: https://charts.k8s.land
License: MIT License
Gitea Helm Chart
Home Page: https://charts.k8s.land
License: MIT License
The gitea-chart does not seem to work out of the box.
Running in a minikube environmen:
helm repo add k8s-land https://charts.k8s.land
helm install gitea k8s-land/gitea
And adding gitea.local to /etc/hosts
:
127.0.0.1 gitea.local
Seems like gitea is not accessible out of the box.
$ curl gitea.local
curl: (7) Failed to connect to gitea.local port 80: Connection refused
$ curl gitea.local:3000
curl: (7) Failed to connect to gitea.local port 3000: Connection refused
Ingress controller seems to be running:
$ kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
nginx-ingress-controller-7d98965d48-dq5tq 1/1 Running 1 1d
Please let me know if I'm missing something.
Hi,
I used the helm chart to deploy gitea.
I can register and sign into gitea and create a repo.
However as soon as I try to add a file or modify a file (in gitea UI), I get the following error message:
The change was rejected by the server with the following message:
Gitea: Internal Server Error
Unable to contact gitea: Post http://0.0.0.0:3000/api/internal/hook/pre-receive/xxx/test: net/http: invalid header field value "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE1ODk0NTQxOTJ9.iWBvmOHvMVDnPNwVtNaAZ91gMBPljH-3lDVvM0_0HEE\n" for key Authorization
Please check githooks.
I believe the \n
at the end of the bearer token might have something to do with it but I am not sure.
I have the same issue on the command line:
$ git push
Username for 'http://gitea.192.168.50.10.xip.io': xxx
Password for 'http://[email protected]':
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Writing objects: 100% (3/3), 247 bytes | 247.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Gitea: Internal Server Error
remote: Unable to contact gitea: Post http://0.0.0.0:3000/api/internal/hook/pre-receive/xxx/test: net/http: invalid header field value "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE1ODk0NTQxOTJ9.iWBvmOHvMVDnPNwVtNaAZ91gMBPljH-3lDVvM0_0HEE\n" for key Authorization
To http://gitea.192.168.50.10.xip.io/xxx/test
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://gitea.192.168.50.10.xip.io/xxx/test'
Any help would be greatly appreciated!
Values.yaml:
## Gitea image
## ref: https://hub.docker.com/r/gitea/gitea/tags/
##
tags:
mariadb: true
images:
registry: docker.io
gitea: "gitea/gitea:1.11.5"
memcached: "memcached:1.5.19-alpine"
pullPolicy: IfNotPresent
## Cache settings for memcache
memcached:
maxItemMemory: 64
verbosity: v
extendedOptions: modern
## Configure the ingress resource that allows you to access the
## Gitea installation. Set up the URL
## ref: http://kubernetes.io/docs/user-guide/ingress/
##
ingress:
enabled: true
certManager: false
hostname: gitea.192.168.50.10.xip.io
annotations: {}
secrets:
## This chart defaults to using an ingress for http, but change to LoadBalancer if using you cluster supports it
service:
http:
serviceType: ClusterIP
port: 3000
externalHost: gitea.192.168.50.10.xip.io
## SSH is commonly on port 22.. however.. you most likely already have port 22 being used by your node.
## so we use port 8022.
ssh:
serviceType: LoadBalancer
port: 22
externalPort: 8022
externalHost: gitea.192.168.50.10.xip.io
externalIPs: []
## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
gitea:
requests:
memory: 500Mi
cpu: 300m
limits:
memory: 2Gi
cpu: 1
memcached:
requests:
memory: 64Mi
cpu: 50m
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
## ref:
##
persistence:
enabled: true
giteaSize: 10Gi
accessMode: ReadWriteMany
annotations:
"helm.sh/resource-policy": keep
##
## MariaDB chart configuration
##
## https://github.com/helm/charts/blob/master/stable/mariadb/values.yaml
##
mariadb:
enabled: true
replication:
enabled: false
db:
name: gitea
user: gitea
rootUser:
password: ThisIsMySuperSecretPassword
master:
persistence:
enabled: true
accessMode: ReadWriteOnce
size: 8Gi
config:
## secretName: "<Existing Secret Name>"
## secretKey: "<random>" # Generate with 'gitea generate secret SECRET_KEY'
## jwtSecret: "<random>" # Generate with 'gitea generate secret JWT_SECRET'
## lfsJwtSecret: "<random>" # Generate with 'gitea generate secret LFS_JWT_SECRET'
## internalToken: "<random>" # Generate with 'gitea generate secret INTERNAL_TOKEN'
disableInstaller: false
offlineMode: false
requireSignin: false
disableRegistration: false
openidSignin: true
immutableConfig: false # Regenerate config every time, and set as read-only
## Common helm annotations
## Node labels and tolerations for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
nodeSelector: {}
tolerations: []
affinity: {}
## Annotations for the deployment and nodes.
deploymentAnnotations: {}
podAnnotations: {}
I also logged it here: go-gitea/gitea#11408
KR,
Kristof
Hello,
there is a mistake in the documentation for MariaDB persistence. It states that you should set mariadb.persistence.enabled to true but it as actually mariadb.master.persistence.enabled (see sample below). Without it, it only create volumes with EmptyDir that does not survive if the pod is deleted or moved to another node.
Also if you want to support upgrades, you have to set both the db user password (mariadb.db.password) and root user (mariadb.rootUser.password). Again, without these, if you delete the deployment or pods, it won't restart properly.
I may have a look at the chart and propose an alternative in the sed command in init for the user password as well as check the rootpassword (force to use the secret if exists, there is a parameter in bitnami chart for that) if you are interested.
In the meantime, here is a working example of values:
mariadb:
master:
persistence:
enabled: true
storageClass: "yourstorageclass"
accessMode: ReadWriteOnce
size: 8Gi
rootUser:
password: "yourpass"
db:
enabled: true
name: "gitea"
user: "gitea"
password: "yourpass"
Hey,
it would be awesome to be able to mount volumes directly from the chart. I like to map my secrets (SSL CA Cert) into the Gitea Container.
Thank you
Currently a version of app.ini
is made available through templates/gitea/gitea-config.yaml
.
The contents of this file is prone to change as new versions of Gitea are released, which would mean the configmap would have to change accordingly. For example, the SHOW_MILESTONES_DASHBOARD_PAGE
key is available in the official sample file, but it is not in the configmap.
If I understand the documentation correctly, it is possible to only define the values in the file that you actually wish to customize.
Following that approach, maybe the configmap should be simplified to just read the config
key from values.yaml
. The only thing I'm not sure of is how the database and gitea secrets should be automatically injected into the configuration file.
Hopefully this issue can be used to discuss this.
podAnnotations are listed in the default values.yaml file, but don't seem to be implemented in the templates.
I'm trying to backup Gitea which we set up based on this chart - I keep on getting errors where I can't write to or remount the filesystem. Backup instructions here: https://docs.gitea.io/en-us/backup-and-restore/ Is there a way to get it backed up?
Thanks
EDIT: Nevermind - figured it out that its in data/gitea/conf
Inside the README.md
helm show values cdrage/gitea > values.yaml
vim values.yaml # Edit to enable persistent storage
helm install gitea cdrage/gitea -f values.yaml
even though the repository is k8s-land
At a glance it looks like the chart wants the user to create a secret with the database password when not using the "built-in" MySQL installation. The documentation / values.yaml file indicates that it can just go there, but the secret doesn't get created.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.