blob: c6e07a7d2797af45cbdceee83c39955e108c6da9 [file] [log] [blame]
yangalicace15b827372024-08-22 14:03:28 +02001#######################################################################################
2# Copyright ETSI Contributors and Others.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13# implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#######################################################################################
17
18# Default values for gitea.
19# This is a YAML-formatted file.
20# Declare variables to be passed into your templates.
21## @section Global
22#
23## @param global.imageRegistry global image registry override
24## @param global.imagePullSecrets global image pull secrets override; can be extended by `imagePullSecrets`
25## @param global.storageClass global storage class override
26## @param global.hostAliases global hostAliases which will be added to the pod's hosts files
27global:
28 imageRegistry: ""
29 ## E.g.
30 ## imagePullSecrets:
31 ## - myRegistryKeySecretName
32 ##
33 imagePullSecrets: []
34 storageClass: ""
35 hostAliases: []
36 # - ip: 192.168.137.2
37 # hostnames:
38 # - example.com
39
40## @param replicaCount number of replicas for the statefulset
41replicaCount: 1
42
43## @param clusterDomain cluster domain
44clusterDomain: cluster.local
45
46## @section Image
47## @param image.registry image registry, e.g. gcr.io,docker.io
48## @param image.repository Image to start for this pod
49## @param image.tag Visit: [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated). Defaults to `appVersion` within Chart.yaml.
50## @param image.pullPolicy Image pull policy
51## @param image.rootless Wether or not to pull the rootless version of Gitea, only works on Gitea 1.14.x or higher
52image:
53 registry: ""
54 repository: gitea/gitea
55 # Overrides the image tag whose default is the chart appVersion.
56 tag: ""
57 pullPolicy: Always
58 rootless: false # only possible when running 1.14 or later
59
60## @param imagePullSecrets Secret to use for pulling the image
61imagePullSecrets: []
62
63## @section Security
64# Security context is only usable with rootless image due to image design
65## @param podSecurityContext.fsGroup Set the shared file system group for all containers in the pod.
66podSecurityContext:
67 fsGroup: 1000
68
69## @param containerSecurityContext Security context
70containerSecurityContext: {}
71# allowPrivilegeEscalation: false
72# capabilities:
73# drop:
74# - ALL
75# # Add the SYS_CHROOT capability for root and rootless images if you intend to
76# # run pods on nodes that use the container runtime cri-o. Otherwise, you will
77# # get an error message from the SSH server that it is not possible to read from
78# # the repository.
79# # https://gitea.com/gitea/helm-chart/issues/161
80# add:
81# - SYS_CHROOT
82# privileged: false
83# readOnlyRootFilesystem: true
84# runAsGroup: 1000
85# runAsNonRoot: true
86# runAsUser: 1000
87
88## @deprecated The securityContext variable has been split two:
89## - containerSecurityContext
90## - podSecurityContext.
91## @param securityContext Run init and Gitea containers as a specific securityContext
92securityContext: {}
93
94## @section Service
95service:
96 ## @param service.http.type Kubernetes service type for web traffic
97 ## @param service.http.port Port number for web traffic
98 ## @param service.http.clusterIP ClusterIP setting for http autosetup for statefulset is None
99 ## @param service.http.loadBalancerIP LoadBalancer IP setting
100 ## @param service.http.nodePort NodePort for http service
101 ## @param service.http.externalTrafficPolicy If `service.http.type` is `NodePort` or `LoadBalancer`, set this to `Local` to enable source IP preservation
102 ## @param service.http.externalIPs External IPs for service
103 ## @param service.http.ipFamilyPolicy HTTP service dual-stack policy
104 ## @param service.http.ipFamilies HTTP service dual-stack familiy selection,for dual-stack parameters see official kubernetes [dual-stack concept documentation](https://kubernetes.io/docs/concepts/services-networking/dual-stack/).
105 ## @param service.http.loadBalancerSourceRanges Source range filter for http loadbalancer
106 ## @param service.http.annotations HTTP service annotations
107 http:
108 type: LoadBalancer
109 # port: 3000
110 port: 8080
111 clusterIP: None
112 loadBalancerIP:
113 nodePort:
114 externalTrafficPolicy:
115 externalIPs:
116 ipFamilyPolicy:
117 ipFamilies:
118 loadBalancerSourceRanges: []
119 annotations: {}
120 ## @param service.ssh.type Kubernetes service type for ssh traffic
121 ## @param service.ssh.port Port number for ssh traffic
122 ## @param service.ssh.clusterIP ClusterIP setting for ssh autosetup for statefulset is None
123 ## @param service.ssh.loadBalancerIP LoadBalancer IP setting
124 ## @param service.ssh.nodePort NodePort for ssh service
125 ## @param service.ssh.externalTrafficPolicy If `service.ssh.type` is `NodePort` or `LoadBalancer`, set this to `Local` to enable source IP preservation
126 ## @param service.ssh.externalIPs External IPs for service
127 ## @param service.ssh.ipFamilyPolicy SSH service dual-stack policy
128 ## @param service.ssh.ipFamilies SSH service dual-stack familiy selection,for dual-stack parameters see official kubernetes [dual-stack concept documentation](https://kubernetes.io/docs/concepts/services-networking/dual-stack/).
129 ## @param service.ssh.hostPort HostPort for ssh service
130 ## @param service.ssh.loadBalancerSourceRanges Source range filter for ssh loadbalancer
131 ## @param service.ssh.annotations SSH service annotations
132 ssh:
133 type: LoadBalancer
134 port: 22
135 clusterIP: None
136 loadBalancerIP:
137 nodePort:
138 externalTrafficPolicy:
139 externalIPs:
140 ipFamilyPolicy:
141 ipFamilies:
142 hostPort:
143 loadBalancerSourceRanges: []
144 annotations: {}
145
146
147## @section Ingress
148## @param ingress.enabled Enable ingress
149## @param ingress.className Ingress class name
150## @param ingress.annotations Ingress annotations
151## @param ingress.hosts[0].host Default Ingress host
152## @param ingress.hosts[0].paths[0].path Default Ingress path
153## @param ingress.hosts[0].paths[0].pathType Ingress path type
154## @param ingress.tls Ingress tls settings
155## @extra ingress.apiVersion Specify APIVersion of ingress object. Mostly would only be used for argocd.
156ingress:
157 enabled: false
158 # className: nginx
159 className:
160 annotations: {}
161 # kubernetes.io/ingress.class: nginx
162 # kubernetes.io/tls-acme: "true"
163 hosts:
164 - host: git.example.com
165 paths:
166 - path: /
167 pathType: Prefix
168 tls: []
169 # - secretName: chart-example-tls
170 # hosts:
171 # - git.example.com
172 # Mostly for argocd or any other CI that uses `helm template | kubectl apply` or similar
173 # If helm doesn't correctly detect your ingress API version you can set it here.
174 # apiVersion: networking.k8s.io/v1
175
176## @section StatefulSet
177#
178## @param resources Kubernetes resources
179resources: {}
180 # We usually recommend not to specify default resources and to leave this as a conscious
181 # choice for the user. This also increases chances charts run on environments with little
182 # resources, such as Minikube. If you do want to specify resources, uncomment the following
183 # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
184 # limits:
185 # cpu: 100m
186 # memory: 128Mi
187 # requests:
188 # cpu: 100m
189 # memory: 128Mi
190
191## Use an alternate scheduler, e.g. "stork".
192## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
193##
194## @param schedulerName Use an alternate scheduler, e.g. "stork"
195schedulerName: ""
196
197## @param nodeSelector NodeSelector for the statefulset
198nodeSelector: {}
199
200## @param tolerations Tolerations for the statefulset
201tolerations: []
202
203## @param affinity Affinity for the statefulset
204affinity: {}
205
206## @param dnsConfig dnsConfig for the statefulset
207dnsConfig: {}
208
209## @param statefulset.env Additional environment variables to pass to containers
210## @param statefulset.terminationGracePeriodSeconds How long to wait until forcefully kill the pod
211## @param statefulset.labels Labels for the statefulset
212## @param statefulset.annotations Annotations for the Gitea StatefulSet to be created
213statefulset:
214 env: []
215 # - name: VARIABLE
216 # value: my-value
217 terminationGracePeriodSeconds: 60
218 labels: {}
219 annotations: {}
220
221## @section Persistence
222#
223## @param persistence.enabled Enable persistent storage
224## @param persistence.existingClaim Use an existing claim to store repository information
225## @param persistence.size Size for persistence to store repo information
226## @param persistence.accessModes AccessMode for persistence
227## @param persistence.labels Labels for the persistence volume claim to be created
228## @param persistence.annotations Annotations for the persistence volume claim to be created
229## @param persistence.storageClass Name of the storage class to use
230## @param persistence.subPath Subdirectory of the volume to mount at
231persistence:
232 enabled: true
233 existingClaim:
234 size: 10Gi
235 accessModes:
236 - ReadWriteOnce
237 labels: {}
238 annotations: {}
239 storageClass:
240 subPath:
241
242## @param extraVolumes Additional volumes to mount to the Gitea statefulset
243extraVolumes: []
244# - name: postgres-ssl-vol
245# secret:
246# secretName: gitea-postgres-ssl
247
248## @param extraContainerVolumeMounts Mounts that are only mapped into the Gitea runtime/main container, to e.g. override custom templates.
249extraContainerVolumeMounts: []
250
251## @param extraInitVolumeMounts Mounts that are only mapped into the init-containers. Can be used for additional preconfiguration.
252extraInitVolumeMounts: []
253
254## @deprecated The extraVolumeMounts variable has been split two:
255## - extraContainerVolumeMounts
256## - extraInitVolumeMounts
257## As an example, can be used to mount a client cert when connecting to an external Postgres server.
258## @param extraVolumeMounts **DEPRECATED** Additional volume mounts for init containers and the Gitea main container
259extraVolumeMounts: []
260# - name: postgres-ssl-vol
261# readOnly: true
262# mountPath: "/pg-ssl"
263
264## @section Init
265## @param initPreScript Bash shell script copied verbatim to the start of the init-container.
266initPreScript: ""
267#
268# initPreScript: |
269# mkdir -p /data/git/.postgresql
270# cp /pg-ssl/* /data/git/.postgresql/
271# chown -R git:git /data/git/.postgresql/
272# chmod 400 /data/git/.postgresql/postgresql.key
273
274# Configure commit/action signing prerequisites
275## @section Signing
276#
277## @param signing.enabled Enable commit/action signing
278## @param signing.gpgHome GPG home directory
279## @param signing.privateKey Inline private gpg key for signed Gitea actions
280## @param signing.existingSecret Use an existing secret to store the value of `signing.privateKey`
281signing:
282 enabled: false
283 gpgHome: /data/git/.gnupg
284 privateKey: ""
285 # privateKey: |-
286 # -----BEGIN PGP PRIVATE KEY BLOCK-----
287 # ...
288 # -----END PGP PRIVATE KEY BLOCK-----
289 existingSecret: ""
290
291## @section Gitea
292#
293gitea:
294 ## @param gitea.admin.username Username for the Gitea admin user
295 ## @param gitea.admin.existingSecret Use an existing secret to store admin user credentials
296 ## @param gitea.admin.password Password for the Gitea admin user
297 ## @param gitea.admin.email Email for the Gitea admin user
298 admin:
299 #existingSecret: gitea-admin-secret
300 existingSecret:
301 username: gitea_admin
302 password: r8sA8CPHD9!bt6d
303 email: "gitea@local.domain"
304
305 ## @param gitea.metrics.enabled Enable Gitea metrics
306 ## @param gitea.metrics.serviceMonitor.enabled Enable Gitea metrics service monitor
307 metrics:
308 enabled: false
309 serviceMonitor:
310 enabled: false
311 # additionalLabels:
312 # prometheus-release: prom1
313
314 ## @param gitea.ldap LDAP configuration
315 ldap: []
316 # - name: "LDAP 1"
317 # existingSecret:
318 # securityProtocol:
319 # host:
320 # port:
321 # userSearchBase:
322 # userFilter:
323 # adminFilter:
324 # emailAttribute:
325 # bindDn:
326 # bindPassword:
327 # usernameAttribute:
328 # publicSSHKeyAttribute:
329
330 # Either specify inline `key` and `secret` or refer to them via `existingSecret`
331 ## @param gitea.oauth OAuth configuration
332 oauth: []
333 # - name: 'OAuth 1'
334 # provider:
335 # key:
336 # secret:
337 # existingSecret:
338 # autoDiscoverUrl:
339 # useCustomUrls:
340 # customAuthUrl:
341 # customTokenUrl:
342 # customProfileUrl:
343 # customEmailUrl:
344
345 ## @param gitea.config Configuration for the Gitea server,ref: [config-cheat-sheet](https://docs.gitea.io/en-us/config-cheat-sheet/)
346 config:
347 # APP_NAME: "Gitea: Git with a cup of tea"
348
349 # RUN_MODE: dev
350 #
351 server:
352 DOMAIN: git.myexample.com
353 ROOT_URL: http://git.myexample.com
354 # SSH_PORT: 22
355 #
356 # security:
357 # PASSWORD_COMPLEXITY: spec
358
359 ## @param gitea.additionalConfigSources Additional configuration from secret or configmap
360 additionalConfigSources: []
361 # - secret:
362 # secretName: gitea-app-ini-oauth
363 # - configMap:
364 # name: gitea-app-ini-plaintext
365
366 ## @param gitea.additionalConfigFromEnvs Additional configuration sources from environment variables
367 additionalConfigFromEnvs: []
368
369 ## @param gitea.podAnnotations Annotations for the Gitea pod
370 podAnnotations: {}
371
372 ## @section LivenessProbe
373 #
374 ## @param gitea.livenessProbe.enabled Enable liveness probe
375 ## @param gitea.livenessProbe.tcpSocket.port Port to probe for liveness
376 ## @param gitea.livenessProbe.initialDelaySeconds Initial delay before liveness probe is initiated
377 ## @param gitea.livenessProbe.timeoutSeconds Timeout for liveness probe
378 ## @param gitea.livenessProbe.periodSeconds Period for liveness probe
379 ## @param gitea.livenessProbe.successThreshold Success threshold for liveness probe
380 ## @param gitea.livenessProbe.failureThreshold Failure threshold for liveness probe
381 # Modify the liveness probe for your needs or completely disable it by commenting out.
382 livenessProbe:
383 enabled: true
384 tcpSocket:
385 port: http
386 initialDelaySeconds: 200
387 timeoutSeconds: 1
388 periodSeconds: 10
389 successThreshold: 1
390 failureThreshold: 10
391
392 ## @section ReadinessProbe
393 #
394 ## @param gitea.readinessProbe.enabled Enable readiness probe
395 ## @param gitea.readinessProbe.tcpSocket.port Port to probe for readiness
396 ## @param gitea.readinessProbe.initialDelaySeconds Initial delay before readiness probe is initiated
397 ## @param gitea.readinessProbe.timeoutSeconds Timeout for readiness probe
398 ## @param gitea.readinessProbe.periodSeconds Period for readiness probe
399 ## @param gitea.readinessProbe.successThreshold Success threshold for readiness probe
400 ## @param gitea.readinessProbe.failureThreshold Failure threshold for readiness probe
401 # Modify the readiness probe for your needs or completely disable it by commenting out.
402 readinessProbe:
403 enabled: true
404 tcpSocket:
405 port: http
406 initialDelaySeconds: 5
407 timeoutSeconds: 1
408 periodSeconds: 10
409 successThreshold: 1
410 failureThreshold: 3
411
412 # # Uncomment the startup probe to enable and modify it for your needs.
413 ## @section StartupProbe
414 #
415 ## @param gitea.startupProbe.enabled Enable startup probe
416 ## @param gitea.startupProbe.tcpSocket.port Port to probe for startup
417 ## @param gitea.startupProbe.initialDelaySeconds Initial delay before startup probe is initiated
418 ## @param gitea.startupProbe.timeoutSeconds Timeout for startup probe
419 ## @param gitea.startupProbe.periodSeconds Period for startup probe
420 ## @param gitea.startupProbe.successThreshold Success threshold for startup probe
421 ## @param gitea.startupProbe.failureThreshold Failure threshold for startup probe
422 startupProbe:
423 enabled: false
424 tcpSocket:
425 port: http
426 initialDelaySeconds: 60
427 timeoutSeconds: 1
428 periodSeconds: 10
429 successThreshold: 1
430 failureThreshold: 10
431
432## @section Memcached
433#
434## @param memcached.enabled Memcached is loaded as a dependency from [Bitnami](https://github.com/bitnami/charts/tree/master/bitnami/memcached) if enabled in the values. Complete Configuration can be taken from their website.
435## @param memcached.service.port Port for Memcached
436memcached:
437 enabled: true
438 service:
439 port: 11211
440
441## @section PostgreSQL
442#
443## @param postgresql.enabled Enable PostgreSQL
444## @param postgresql.global.postgresql.postgresqlDatabase PostgreSQL database (overrides postgresqlDatabase)
445## @param postgresql.global.postgresql.postgresqlUsername PostgreSQL username (overrides postgresqlUsername)
446## @param postgresql.global.postgresql.postgresqlPassword PostgreSQL admin password (overrides postgresqlPassword)
447## @param postgresql.global.postgresql.servicePort PostgreSQL port (overrides service.port)
448## @param postgresql.persistence.size PVC Storage Request for PostgreSQL volume
449postgresql:
450 enabled: true
451 global:
452 postgresql:
453 postgresqlDatabase: gitea
454 postgresqlUsername: gitea
455 postgresqlPassword: gitea
456 servicePort: 5432
457 persistence:
458 size: 10Gi
459
460## @section MySQL
461#
462## @param mysql.enabled Enable MySQL
463## @param mysql.root.password Password for the root user. Ignored if existing secret is provided
464## @param mysql.db.user Username of new user to create.
465## @param mysql.db.password Password for the new user.Ignored if existing secret is provided
466## @param mysql.db.name Name for new database to create.
467## @param mysql.service.port Port to connect to MySQL service
468## @param mysql.persistence.size PVC Storage Request for MySQL volume
469mysql:
470 enabled: false
471 root:
472 password: gitea
473 db:
474 user: gitea
475 password: gitea
476 name: gitea
477 service:
478 port: 3306
479 persistence:
480 size: 10Gi
481
482## @section MariaDB
483#
484## @param mariadb.enabled Enable MariaDB
485## @param mariadb.auth.database Name of the database to create.
486## @param mariadb.auth.username Username of the new user to create.
487## @param mariadb.auth.password Password for the new user. Ignored if existing secret is provided
488## @param mariadb.auth.rootPassword Password for the root user.
489## @param mariadb.primary.service.port Port to connect to MariaDB service
490## @param mariadb.primary.persistence.size Persistence size for MariaDB
491mariadb:
492 enabled: false
493 auth:
494 database: gitea
495 username: gitea
496 password: gitea
497 rootPassword: gitea
498 primary:
499 service:
500 port: 3306
501 persistence:
502 size: 10Gi
503
504# By default, removed or moved settings that still remain in a user defined values.yaml will cause Helm to fail running the install/update.
505# Set it to false to skip this basic validation check.
506## @section Advanced
507## @param checkDeprecation Set it to false to skip this basic validation check.
508checkDeprecation: true
509