Compare commits
43 Commits
Author | SHA1 | Date | |
---|---|---|---|
4f7bc17d34 | |||
279bacb941 | |||
9ed671d685 | |||
d5ce1a47ea | |||
57a1cd27d9 | |||
6c59fe361d | |||
d1f5dca573 | |||
b8f0310c43 | |||
0d1f748898 | |||
6e5ae5c912 | |||
bb26a872e9 | |||
51bb72090e | |||
58d21e07f9 | |||
299d6db142 | |||
a4ab5f981f | |||
7801c9c5c9 | |||
58fc28f6d0 | |||
32735ed4df | |||
aa97cdab5b | |||
bc16cc8134 | |||
33586d26cf | |||
0172a59889 | |||
2cc3195eaa | |||
b3b91e2044 | |||
9cb822f41c | |||
e59fbc4008 | |||
a466206d9e | |||
80032dfc5c | |||
52ed32ae74 | |||
b06b3edf1d | |||
a7bc46015e | |||
46b190adda | |||
d94226765d | |||
844c8daa0b | |||
982ae60d8e | |||
62b82459de | |||
9530967163 | |||
d35de55248 | |||
78b5858009 | |||
1a3ce54dfc | |||
6896c7caae | |||
7bdf742e81 | |||
f2948646ba |
18
.drone.yml
18
.drone.yml
@ -10,24 +10,26 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- name: helm lint
|
- name: helm lint
|
||||||
pull: always
|
pull: always
|
||||||
image: alpine:3.13
|
image: alpine:3.17
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
||||||
- helm lint
|
- helm lint
|
||||||
|
|
||||||
- name: helm template
|
- name: helm template
|
||||||
pull: always
|
pull: always
|
||||||
image: alpine:3.13
|
image: alpine:3.17
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
||||||
- helm dependency update
|
- helm dependency update
|
||||||
- helm template --debug gitea-helm .
|
- helm template --debug gitea-helm .
|
||||||
|
|
||||||
- name: markdown lint
|
- name: verify readme
|
||||||
pull: always
|
pull: always
|
||||||
image: docker.io/volkerraschek/markdownlint:latest
|
image: alpine:3.17
|
||||||
commands:
|
commands:
|
||||||
- markdownlint *.md
|
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing make npm git
|
||||||
|
- make readme
|
||||||
|
- git diff --exit-code --name-only README.md
|
||||||
|
|
||||||
- name: discord
|
- name: discord
|
||||||
pull: always
|
pull: always
|
||||||
@ -42,6 +44,7 @@ steps:
|
|||||||
- changed
|
- changed
|
||||||
- failure
|
- failure
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
@ -58,7 +61,7 @@ trigger:
|
|||||||
steps:
|
steps:
|
||||||
- name: generate-chart
|
- name: generate-chart
|
||||||
pull: always
|
pull: always
|
||||||
image: alpine:3.13
|
image: alpine:3.17
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
||||||
- apk add --no-cache curl
|
- apk add --no-cache curl
|
||||||
@ -74,8 +77,7 @@ steps:
|
|||||||
image: plugins/s3:latest
|
image: plugins/s3:latest
|
||||||
settings:
|
settings:
|
||||||
bucket: gitea-artifacts
|
bucket: gitea-artifacts
|
||||||
endpoint: https://storage.gitea.io
|
endpoint: https://ams3.digitaloceanspaces.com
|
||||||
path_style: true
|
|
||||||
access_key:
|
access_key:
|
||||||
from_secret: aws_access_key_id
|
from_secret: aws_access_key_id
|
||||||
secret_key:
|
secret_key:
|
||||||
|
41
.gitea/PULL_REQUEST_TEMPLATE.md
Normal file
41
.gitea/PULL_REQUEST_TEMPLATE.md
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<!--
|
||||||
|
Before you open the request please review the following guidelines and tips to help it be more easily integrated:
|
||||||
|
|
||||||
|
- Describe the scope of your change - i.e. what the change does.
|
||||||
|
- Describe any known limitations with your change.
|
||||||
|
- Please run any tests or examples that can exercise your modified code.
|
||||||
|
|
||||||
|
Thank you for contributing! We will try to review, test and integrate the change as soon as we can.
|
||||||
|
-->
|
||||||
|
|
||||||
|
### Description of the change
|
||||||
|
|
||||||
|
<!-- Describe the scope of your change - i.e. what the change does. -->
|
||||||
|
|
||||||
|
### Benefits
|
||||||
|
|
||||||
|
<!-- What benefits will be realized by the code change? -->
|
||||||
|
|
||||||
|
### Possible drawbacks
|
||||||
|
|
||||||
|
<!-- Describe any known limitations with your change -->
|
||||||
|
|
||||||
|
### Applicable issues
|
||||||
|
|
||||||
|
<!-- Enter any applicable Issues here (You can reference an issue using #). Please remove this section if there is no referenced issue. -->
|
||||||
|
- fixes #
|
||||||
|
|
||||||
|
### Additional information
|
||||||
|
|
||||||
|
<!-- If there's anything else that's important and relevant to your pull request, mention that information here. Please remove this section if it remains empty. -->
|
||||||
|
|
||||||
|
### ⚠ BREAKING
|
||||||
|
|
||||||
|
<!-- If there's a breaking change, please shortly describe in which way users are affected and how they can mitigate it. If there are no breakings, please remove this section. -->
|
||||||
|
|
||||||
|
### Checklist
|
||||||
|
|
||||||
|
<!-- [Place an '[X]' (no spaces) in all applicable fields. Please remove unrelated fields.] -->
|
||||||
|
|
||||||
|
- [ ] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm)
|
||||||
|
- [ ] Breaking changes are documented in the `README.md`
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,3 +1,3 @@
|
|||||||
charts
|
charts/
|
||||||
Chart.lock
|
node_modules/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
@ -20,5 +20,8 @@
|
|||||||
.idea/
|
.idea/
|
||||||
*.tmproj
|
*.tmproj
|
||||||
.vscode/
|
.vscode/
|
||||||
#charts/
|
node_modules/
|
||||||
#Chart.lock
|
.npmrc
|
||||||
|
package.json
|
||||||
|
package-lock.json
|
||||||
|
.gitea/
|
||||||
|
@ -45,7 +45,7 @@ MD012:
|
|||||||
# MD013/line-length - Line length
|
# MD013/line-length - Line length
|
||||||
MD013:
|
MD013:
|
||||||
# Number of characters
|
# Number of characters
|
||||||
line_length: 80
|
line_length: 200
|
||||||
# Number of characters for headings
|
# Number of characters for headings
|
||||||
heading_line_length: 80
|
heading_line_length: 80
|
||||||
# Number of characters for code blocks
|
# Number of characters for code blocks
|
||||||
|
3
.markdownlintignore
Normal file
3
.markdownlintignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.gitea/
|
||||||
|
node_modules/
|
||||||
|
charts/
|
52
CONTRIBUTING.md
Normal file
52
CONTRIBUTING.md
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# Contribution Guidelines
|
||||||
|
|
||||||
|
Any type of contribution is welcome; from new features, bug fixes, tests,
|
||||||
|
refactorings for easier maintainability or documentation improvements.
|
||||||
|
|
||||||
|
## Development environment
|
||||||
|
|
||||||
|
- [`node`](https://nodejs.org/en/) at least current LTS
|
||||||
|
- [`helm`](https://helm.sh/docs/intro/install/)
|
||||||
|
- `make` is optional; you may call the commands directly
|
||||||
|
|
||||||
|
When using Visual Studio Code as IDE, following plugins might be useful:
|
||||||
|
|
||||||
|
- [Markdown All in One](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one)
|
||||||
|
- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)
|
||||||
|
- [Helm Intellisense](https://marketplace.visualstudio.com/items?itemName=Tim-Koehler.helm-intellisense)
|
||||||
|
|
||||||
|
## Documentation Requirements
|
||||||
|
|
||||||
|
The `README.md` must include all configuration options. The parameters section
|
||||||
|
is generated by extracting the parameter annotations from the `values.yaml` file,
|
||||||
|
by using [this tool](https://github.com/bitnami-labs/readme-generator-for-helm).
|
||||||
|
|
||||||
|
If changes were made on configuration options, run `make readme` to update the
|
||||||
|
README file.
|
||||||
|
|
||||||
|
## Pull Request Requirements
|
||||||
|
|
||||||
|
When submitting or updating a PR:
|
||||||
|
|
||||||
|
- make sure it passes CI builds.
|
||||||
|
- do not make independent changes in one PR.
|
||||||
|
- try to avoid rebases. They make code reviews for large PRs and comments much harder.
|
||||||
|
- if applicable, use the PR template for a well-defined PR description.
|
||||||
|
- clearly mark breaking changes.
|
||||||
|
|
||||||
|
## Local development & testing
|
||||||
|
|
||||||
|
For local development and testing of pull requests, the following workflow can
|
||||||
|
be used:
|
||||||
|
|
||||||
|
1. Install `minikube` and `helm`.
|
||||||
|
2. Start a `minikube` cluster via `minikube start`.
|
||||||
|
3. From the `gitea/helm-chart` directory execute the following command. This
|
||||||
|
will install the dependencies listed in `Chart.yml` and deploy the current
|
||||||
|
state of the helm chart found locally. If you want to test a branch, make
|
||||||
|
sure to switch to the respective branch first.
|
||||||
|
`helm install --dependency-update gitea . -f values.yaml`.
|
||||||
|
4. Gitea is now deployed in `minikube`. To access it, it's port needs to be
|
||||||
|
forwarded first from `minikube` to localhost first via `kubectl --namespace
|
||||||
|
default port-forward svc/gitea-http 3000:3000`. Now Gitea is accessible at
|
||||||
|
[http://localhost:3000](http://localhost:3000).
|
15
Chart.lock
Normal file
15
Chart.lock
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: memcached
|
||||||
|
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
|
||||||
|
version: 5.9.0
|
||||||
|
- name: mysql
|
||||||
|
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
|
||||||
|
version: 6.14.10
|
||||||
|
- name: postgresql
|
||||||
|
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
|
||||||
|
version: 10.3.17
|
||||||
|
- name: mariadb
|
||||||
|
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
|
||||||
|
version: 9.3.6
|
||||||
|
digest: sha256:08f967276fa0c083e9756a974a9791a487a71be0a226dc14351b3e5a2641e8fd
|
||||||
|
generated: "2022-06-11T12:18:36.672047+02:00"
|
11
Chart.yaml
11
Chart.yaml
@ -3,7 +3,7 @@ name: gitea
|
|||||||
description: Gitea Helm chart for Kubernetes
|
description: Gitea Helm chart for Kubernetes
|
||||||
type: application
|
type: application
|
||||||
version: 0.0.0
|
version: 0.0.0
|
||||||
appVersion: 1.15.10
|
appVersion: 1.17.4
|
||||||
icon: https://docs.gitea.io/images/gitea.png
|
icon: https://docs.gitea.io/images/gitea.png
|
||||||
|
|
||||||
keywords:
|
keywords:
|
||||||
@ -29,20 +29,21 @@ maintainers:
|
|||||||
- name: Steven Kriegler
|
- name: Steven Kriegler
|
||||||
email: sk.bunsenbrenner@gmail.com
|
email: sk.bunsenbrenner@gmail.com
|
||||||
|
|
||||||
|
# Bitnami charts are served from GitHub CDN - See https://github.com/bitnami/charts/issues/10539 for details
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: memcached
|
- name: memcached
|
||||||
repository: https://charts.bitnami.com/bitnami
|
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
|
||||||
version: 5.9.0
|
version: 5.9.0
|
||||||
condition: memcached.enabled
|
condition: memcached.enabled
|
||||||
- name: mysql
|
- name: mysql
|
||||||
repository: https://charts.bitnami.com/bitnami
|
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
|
||||||
version: 6.14.10
|
version: 6.14.10
|
||||||
condition: mysql.enabled
|
condition: mysql.enabled
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
repository: https://charts.bitnami.com/bitnami
|
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
|
||||||
version: 10.3.17
|
version: 10.3.17
|
||||||
condition: postgresql.enabled
|
condition: postgresql.enabled
|
||||||
- name: mariadb
|
- name: mariadb
|
||||||
repository: https://charts.bitnami.com/bitnami
|
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
|
||||||
version: 9.3.6
|
version: 9.3.6
|
||||||
condition: mariadb.enabled
|
condition: mariadb.enabled
|
||||||
|
8
Makefile
Normal file
8
Makefile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
.PHONY: prepare-environment
|
||||||
|
prepare-environment:
|
||||||
|
npm install
|
||||||
|
|
||||||
|
.PHONY: readme
|
||||||
|
readme: prepare-environment
|
||||||
|
npm run readme:parameters
|
||||||
|
npm run readme:lint
|
721
package-lock.json
generated
Normal file
721
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
19
package.json
Normal file
19
package.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "gitea-helm-chart",
|
||||||
|
"homepage": "https://gitea.com/gitea/helm-chart.git",
|
||||||
|
"license": "MIT",
|
||||||
|
"private": true,
|
||||||
|
"engineStrict": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16.0.0",
|
||||||
|
"npm": ">=8.0.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"readme:lint": "markdownlint *.md -f",
|
||||||
|
"readme:parameters": "readme-generator -v values.yaml -r README.md"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@bitnami/readme-generator-for-helm": "^2.4.2",
|
||||||
|
"markdownlint-cli": "^0.31.1"
|
||||||
|
}
|
||||||
|
}
|
@ -35,11 +35,41 @@ Create chart name and version as used by the chart label.
|
|||||||
Create image name and tag used by the deployment.
|
Create image name and tag used by the deployment.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "gitea.image" -}}
|
{{- define "gitea.image" -}}
|
||||||
|
{{- $registry := .Values.global.imageRegistry | default .Values.image.registry -}}
|
||||||
{{- $name := .Values.image.repository -}}
|
{{- $name := .Values.image.repository -}}
|
||||||
{{- $tag := ternary .Values.image.version .Values.image.tag (hasKey .Values.image "version") -}}
|
{{- $tag := .Values.image.tag | default .Chart.AppVersion -}}
|
||||||
{{- $rootless := ternary "-rootless" "" (.Values.image.rootless) -}}
|
{{- $rootless := ternary "-rootless" "" (.Values.image.rootless) -}}
|
||||||
|
{{- if $registry -}}
|
||||||
|
{{- printf "%s/%s:%s%s" $registry $name $tag $rootless -}}
|
||||||
|
{{- else -}}
|
||||||
{{- printf "%s:%s%s" $name $tag $rootless -}}
|
{{- printf "%s:%s%s" $name $tag $rootless -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Docker Image Registry Secret Names evaluating values as templates
|
||||||
|
*/}}
|
||||||
|
{{- define "gitea.images.pullSecrets" -}}
|
||||||
|
{{- $pullSecrets := .Values.imagePullSecrets -}}
|
||||||
|
{{- range .Values.global.imagePullSecrets -}}
|
||||||
|
{{- $pullSecrets = append $pullSecrets (dict "name" .) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if (not (empty $pullSecrets)) }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{ toYaml $pullSecrets }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Storage Class
|
||||||
|
*/}}
|
||||||
|
{{- define "gitea.persistence.storageClass" -}}
|
||||||
|
{{- $storageClass := .Values.global.storageClass | default .Values.persistence.storageClass }}
|
||||||
|
{{- if $storageClass }}
|
||||||
|
storageClassName: {{ $storageClass | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Common labels
|
Common labels
|
||||||
@ -48,10 +78,8 @@ Common labels
|
|||||||
helm.sh/chart: {{ include "gitea.chart" . }}
|
helm.sh/chart: {{ include "gitea.chart" . }}
|
||||||
app: {{ include "gitea.name" . }}
|
app: {{ include "gitea.name" . }}
|
||||||
{{ include "gitea.selectorLabels" . }}
|
{{ include "gitea.selectorLabels" . }}
|
||||||
{{- if .Chart.AppVersion }}
|
app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
|
||||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
|
||||||
version: {{ .Chart.AppVersion | quote }}
|
|
||||||
{{- end }}
|
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
@ -63,30 +91,6 @@ app.kubernetes.io/name: {{ include "gitea.name" . }}
|
|||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- define "db.servicename" -}}
|
|
||||||
{{- if .Values.postgresql.enabled -}}
|
|
||||||
{{- printf "%s-postgresql" .Release.Name -}}
|
|
||||||
{{- else if .Values.mysql.enabled -}}
|
|
||||||
{{- printf "%s-mysql" .Release.Name -}}
|
|
||||||
{{- else if .Values.mariadb.enabled -}}
|
|
||||||
{{- printf "%s-mariadb" .Release.Name -}}
|
|
||||||
{{- else if ne .Values.gitea.config.database.DB_TYPE "sqlite3" -}}
|
|
||||||
{{- $parts := split ":" .Values.gitea.config.database.HOST -}}
|
|
||||||
{{- printf "%s %s" $parts._0 $parts._1 -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- define "db.port" -}}
|
|
||||||
{{- if .Values.postgresql.enabled -}}
|
|
||||||
{{ .Values.postgresql.global.postgresql.servicePort }}
|
|
||||||
{{- else if .Values.mysql.enabled -}}
|
|
||||||
{{ .Values.mysql.service.port }}
|
|
||||||
{{- else if .Values.mariadb.enabled -}}
|
|
||||||
{{ .Values.mariadb.primary.service.port }}
|
|
||||||
{{- else -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- define "postgresql.dns" -}}
|
{{- define "postgresql.dns" -}}
|
||||||
{{- printf "%s-postgresql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.postgresql.global.postgresql.servicePort -}}
|
{{- printf "%s-postgresql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.postgresql.global.postgresql.servicePort -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@ -156,6 +160,14 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "gitea.public_protocol" -}}
|
||||||
|
{{- if and .Values.ingress.enabled (gt (len .Values.ingress.tls) 0) -}}
|
||||||
|
https
|
||||||
|
{{- else -}}
|
||||||
|
{{ .Values.gitea.config.server.PROTOCOL }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- define "gitea.inline_configuration" -}}
|
{{- define "gitea.inline_configuration" -}}
|
||||||
{{- include "gitea.inline_configuration.init" . -}}
|
{{- include "gitea.inline_configuration.init" . -}}
|
||||||
{{- include "gitea.inline_configuration.defaults" . -}}
|
{{- include "gitea.inline_configuration.defaults" . -}}
|
||||||
@ -246,15 +258,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if not .Values.gitea.config.server.ROOT_URL -}}
|
{{- if not .Values.gitea.config.server.ROOT_URL -}}
|
||||||
{{- if .Values.ingress.enabled -}}
|
{{- $_ := set .Values.gitea.config.server "ROOT_URL" (printf "%s://%s" (include "gitea.public_protocol" .) .Values.gitea.config.server.DOMAIN) -}}
|
||||||
{{- if gt (len .Values.ingress.tls) 0 -}}
|
|
||||||
{{- $_ := set .Values.gitea.config.server "ROOT_URL" (printf "%s://%s" .Values.gitea.config.server.PROTOCOL (index (index .Values.ingress.tls 0).hosts 0)) -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- $_ := set .Values.gitea.config.server "ROOT_URL" (printf "%s://%s" .Values.gitea.config.server.PROTOCOL (index .Values.ingress.hosts 0).host) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- $_ := set .Values.gitea.config.server "ROOT_URL" (printf "%s://%s" .Values.gitea.config.server.PROTOCOL .Values.gitea.config.server.DOMAIN) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if not .Values.gitea.config.server.SSH_DOMAIN -}}
|
{{- if not .Values.gitea.config.server.SSH_DOMAIN -}}
|
||||||
{{- $_ := set .Values.gitea.config.server "SSH_DOMAIN" .Values.gitea.config.server.DOMAIN -}}
|
{{- $_ := set .Values.gitea.config.server "SSH_DOMAIN" .Values.gitea.config.server.DOMAIN -}}
|
||||||
@ -309,3 +313,21 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
|||||||
{{- $_ := set .Values.gitea.config.database "PASSWD" .Values.mariadb.auth.password -}}
|
{{- $_ := set .Values.gitea.config.database "PASSWD" .Values.mariadb.auth.password -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "gitea.init-additional-mounts" -}}
|
||||||
|
{{- /* Honor the deprecated extraVolumeMounts variable when defined */ -}}
|
||||||
|
{{- if gt (len .Values.extraInitVolumeMounts) 0 -}}
|
||||||
|
{{- toYaml .Values.extraInitVolumeMounts -}}
|
||||||
|
{{- else if gt (len .Values.extraVolumeMounts) 0 -}}
|
||||||
|
{{- toYaml .Values.extraVolumeMounts -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "gitea.container-additional-mounts" -}}
|
||||||
|
{{- /* Honor the deprecated extraVolumeMounts variable when defined */ -}}
|
||||||
|
{{- if gt (len .Values.extraContainerVolumeMounts) 0 -}}
|
||||||
|
{{- toYaml .Values.extraContainerVolumeMounts -}}
|
||||||
|
{{- else if gt (len .Values.extraVolumeMounts) 0 -}}
|
||||||
|
{{- toYaml .Values.extraVolumeMounts -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
@ -63,6 +63,41 @@ stringData:
|
|||||||
export "ENV_TO_INI__${masked_section^^}__${setting^^}=${value}" # '^^' makes the variable content uppercase
|
export "ENV_TO_INI__${masked_section^^}__${setting^^}=${value}" # '^^' makes the variable content uppercase
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function env2ini::reload_preset_envs() {
|
||||||
|
env2ini::log "Reloading preset envs..."
|
||||||
|
|
||||||
|
while read -r line; do
|
||||||
|
if [[ -z "${line}" ]]; then
|
||||||
|
# skip empty line
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 'xargs echo -n' trims all leading/trailing whitespaces and a trailing new line
|
||||||
|
local setting="$(awk -F '=' '{print $1}' <<< "${line}" | xargs echo -n)"
|
||||||
|
|
||||||
|
if [[ -z "${setting}" ]]; then
|
||||||
|
env2ini::log ' ! invalid setting'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local value=''
|
||||||
|
local regex="^${setting}(\s*)=(\s*)(.*)"
|
||||||
|
if [[ $line =~ $regex ]]; then
|
||||||
|
value="${BASH_REMATCH[3]}"
|
||||||
|
else
|
||||||
|
env2ini::log ' ! invalid setting'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
env2ini::log " + '${setting}'"
|
||||||
|
|
||||||
|
export "${setting^^}=${value}" # '^^' makes the variable content uppercase
|
||||||
|
done < "/tmp/existing-envs"
|
||||||
|
|
||||||
|
rm /tmp/existing-envs
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function env2ini::process_config_file() {
|
function env2ini::process_config_file() {
|
||||||
local config_file="${1}"
|
local config_file="${1}"
|
||||||
local section="$(basename "${config_file}")"
|
local section="$(basename "${config_file}")"
|
||||||
@ -82,6 +117,7 @@ stringData:
|
|||||||
function env2ini::load_config_sources() {
|
function env2ini::load_config_sources() {
|
||||||
local path="${1}"
|
local path="${1}"
|
||||||
|
|
||||||
|
if [[ -d "${path}" ]]; then
|
||||||
env2ini::log "Processing $(basename "${path}")..."
|
env2ini::log "Processing $(basename "${path}")..."
|
||||||
|
|
||||||
while read -d '' configFile; do
|
while read -d '' configFile; do
|
||||||
@ -89,6 +125,7 @@ stringData:
|
|||||||
done < <(find "${path}" -type l -not -name '..data' -print0)
|
done < <(find "${path}" -type l -not -name '..data' -print0)
|
||||||
|
|
||||||
env2ini::log "\n"
|
env2ini::log "\n"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function env2ini::generate_initial_secrets() {
|
function env2ini::generate_initial_secrets() {
|
||||||
@ -100,16 +137,22 @@ stringData:
|
|||||||
export ENV_TO_INI__SECURITY__INTERNAL_TOKEN=$(gitea generate secret INTERNAL_TOKEN)
|
export ENV_TO_INI__SECURITY__INTERNAL_TOKEN=$(gitea generate secret INTERNAL_TOKEN)
|
||||||
export ENV_TO_INI__SECURITY__SECRET_KEY=$(gitea generate secret SECRET_KEY)
|
export ENV_TO_INI__SECURITY__SECRET_KEY=$(gitea generate secret SECRET_KEY)
|
||||||
export ENV_TO_INI__OAUTH2__JWT_SECRET=$(gitea generate secret JWT_SECRET)
|
export ENV_TO_INI__OAUTH2__JWT_SECRET=$(gitea generate secret JWT_SECRET)
|
||||||
|
export ENV_TO_INI__SERVER__LFS_JWT_SECRET=$(gitea generate secret LFS_JWT_SECRET)
|
||||||
|
|
||||||
env2ini::log "...Initial secrets generated\n"
|
env2ini::log "...Initial secrets generated\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
env | (grep ENV_TO_INI || [[ $? == 1 ]]) > /tmp/existing-envs
|
||||||
|
|
||||||
# MUST BE CALLED BEFORE OTHER CONFIGURATION
|
# MUST BE CALLED BEFORE OTHER CONFIGURATION
|
||||||
env2ini::generate_initial_secrets
|
env2ini::generate_initial_secrets
|
||||||
|
|
||||||
env2ini::load_config_sources '/env-to-ini-mounts/inlines/'
|
env2ini::load_config_sources '/env-to-ini-mounts/inlines/'
|
||||||
env2ini::load_config_sources '/env-to-ini-mounts/additionals/'
|
env2ini::load_config_sources '/env-to-ini-mounts/additionals/'
|
||||||
|
|
||||||
|
# load existing envs to override auto generated envs
|
||||||
|
env2ini::reload_preset_envs
|
||||||
|
|
||||||
env2ini::log "=== All configuration sources loaded ===\n"
|
env2ini::log "=== All configuration sources loaded ===\n"
|
||||||
|
|
||||||
# safety to prevent rewrite of secret keys if an app.ini already exists
|
# safety to prevent rewrite of secret keys if an app.ini already exists
|
||||||
@ -118,10 +161,12 @@ stringData:
|
|||||||
env2ini::log ' - security.INTERNAL_TOKEN'
|
env2ini::log ' - security.INTERNAL_TOKEN'
|
||||||
env2ini::log ' - security.SECRET_KEY'
|
env2ini::log ' - security.SECRET_KEY'
|
||||||
env2ini::log ' - oauth2.JWT_SECRET'
|
env2ini::log ' - oauth2.JWT_SECRET'
|
||||||
|
env2ini::log ' - server.LFS_JWT_SECRET'
|
||||||
|
|
||||||
unset ENV_TO_INI__SECURITY__INTERNAL_TOKEN
|
unset ENV_TO_INI__SECURITY__INTERNAL_TOKEN
|
||||||
unset ENV_TO_INI__SECURITY__SECRET_KEY
|
unset ENV_TO_INI__SECURITY__SECRET_KEY
|
||||||
unset ENV_TO_INI__OAUTH2__JWT_SECRET
|
unset ENV_TO_INI__OAUTH2__JWT_SECRET
|
||||||
|
unset ENV_TO_INI__SERVER__LFS_JWT_SECRET
|
||||||
fi
|
fi
|
||||||
|
|
||||||
environment-to-ini -o $GITEA_APP_INI -p ENV_TO_INI
|
environment-to-ini -o $GITEA_APP_INI -p ENV_TO_INI
|
||||||
|
@ -21,6 +21,13 @@ spec:
|
|||||||
externalIPs:
|
externalIPs:
|
||||||
{{- toYaml .Values.service.http.externalIPs | nindent 4 }}
|
{{- toYaml .Values.service.http.externalIPs | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.service.http.ipFamilyPolicy }}
|
||||||
|
ipFamilyPolicy: {{ .Values.service.http.ipFamilyPolicy }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.service.http.ipFamilies }}
|
||||||
|
ipFamilies:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end -}}
|
||||||
{{- if .Values.service.http.externalTrafficPolicy }}
|
{{- if .Values.service.http.externalTrafficPolicy }}
|
||||||
externalTrafficPolicy: {{ .Values.service.http.externalTrafficPolicy }}
|
externalTrafficPolicy: {{ .Values.service.http.externalTrafficPolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -26,7 +26,7 @@ stringData:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
mkdir -p /data/git/.ssh
|
mkdir -p /data/git/.ssh
|
||||||
chmod -R 700 /data/git/.ssh
|
chmod -R 700 /data/git/.ssh
|
||||||
[ ! -d /data/gitea ] && mkdir -p /data/gitea/conf
|
[ ! -d /data/gitea/conf ] && mkdir -p /data/gitea/conf
|
||||||
|
|
||||||
# prepare temp directory structure
|
# prepare temp directory structure
|
||||||
mkdir -p "${GITEA_TEMP}"
|
mkdir -p "${GITEA_TEMP}"
|
||||||
@ -40,31 +40,15 @@ stringData:
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
{{- if include "db.servicename" . }}
|
|
||||||
# Connection retry inspired by https://gist.github.com/dublx/e99ea94858c07d2ca6de
|
|
||||||
function test_db_connection() {
|
|
||||||
local RETRY=0
|
|
||||||
local MAX=30
|
|
||||||
|
|
||||||
echo 'Wait for database to become avialable...'
|
|
||||||
until [ "${RETRY}" -ge "${MAX}" ]; do
|
|
||||||
nc -vz -w2 {{ include "db.servicename" . }} {{ include "db.port" . }} && break
|
|
||||||
RETRY=$[${RETRY}+1]
|
|
||||||
echo "...not ready yet (${RETRY}/${MAX})"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "${RETRY}" -ge "${MAX}" ]; then
|
|
||||||
echo "Database not reachable after '${MAX}' attempts!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
test_db_connection
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
echo '==== BEGIN GITEA CONFIGURATION ===='
|
echo '==== BEGIN GITEA CONFIGURATION ===='
|
||||||
|
|
||||||
|
{ # try
|
||||||
gitea migrate
|
gitea migrate
|
||||||
|
} || { # catch
|
||||||
|
echo "Gitea migrate might fail due to database connection...This init-container will try again in a few seconds"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
{{- if or .Values.gitea.admin.existingSecret (and .Values.gitea.admin.username .Values.gitea.admin.password) }}
|
{{- if or .Values.gitea.admin.existingSecret (and .Values.gitea.admin.username .Values.gitea.admin.password) }}
|
||||||
function configure_admin_user() {
|
function configure_admin_user() {
|
||||||
|
@ -26,6 +26,13 @@ spec:
|
|||||||
externalIPs:
|
externalIPs:
|
||||||
{{- toYaml .Values.service.ssh.externalIPs | nindent 4 }}
|
{{- toYaml .Values.service.ssh.externalIPs | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.service.ssh.ipFamilyPolicy }}
|
||||||
|
ipFamilyPolicy: {{ .Values.service.ssh.ipFamilyPolicy }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.service.ssh.ipFamilies }}
|
||||||
|
ipFamilies:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end -}}
|
||||||
{{- if .Values.service.ssh.externalTrafficPolicy }}
|
{{- if .Values.service.ssh.externalTrafficPolicy }}
|
||||||
externalTrafficPolicy: {{ .Values.service.ssh.externalTrafficPolicy }}
|
externalTrafficPolicy: {{ .Values.service.ssh.externalTrafficPolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -2,6 +2,10 @@ apiVersion: apps/v1
|
|||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "gitea.fullname" . }}
|
name: {{ include "gitea.fullname" . }}
|
||||||
|
annotations:
|
||||||
|
{{- if .Values.statefulset.annotations }}
|
||||||
|
{{- toYaml .Values.statefulset.annotations | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
@ -35,15 +39,13 @@ spec:
|
|||||||
{{- if .Values.schedulerName }}
|
{{- if .Values.schedulerName }}
|
||||||
schedulerName: "{{ .Values.schedulerName }}"
|
schedulerName: "{{ .Values.schedulerName }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- include "gitea.images.pullSecrets" . | nindent 6 }}
|
||||||
imagePullSecrets:
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-directories
|
- name: init-directories
|
||||||
image: "{{ include "gitea.image" . }}"
|
image: "{{ include "gitea.image" . }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
command: ["/usr/sbin/init_directory_structure.sh"]
|
command: ["/usr/sbin/init_directory_structure.sh"]
|
||||||
env:
|
env:
|
||||||
- name: GITEA_APP_INI
|
- name: GITEA_APP_INI
|
||||||
@ -67,13 +69,12 @@ spec:
|
|||||||
{{- if .Values.persistence.subPath }}
|
{{- if .Values.persistence.subPath }}
|
||||||
subPath: {{ .Values.persistence.subPath }}
|
subPath: {{ .Values.persistence.subPath }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.extraVolumeMounts }}
|
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
||||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||||
- name: init-app-ini
|
- name: init-app-ini
|
||||||
image: "{{ include "gitea.image" . }}"
|
image: "{{ include "gitea.image" . }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
command: ["/usr/sbin/config_environment.sh"]
|
command: ["/usr/sbin/config_environment.sh"]
|
||||||
env:
|
env:
|
||||||
- name: GITEA_APP_INI
|
- name: GITEA_APP_INI
|
||||||
@ -87,6 +88,9 @@ spec:
|
|||||||
{{- if .Values.statefulset.env }}
|
{{- if .Values.statefulset.env }}
|
||||||
{{- toYaml .Values.statefulset.env | nindent 12 }}
|
{{- toYaml .Values.statefulset.env | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.gitea.additionalConfigFromEnvs }}
|
||||||
|
{{- toYaml .Values.gitea.additionalConfigFromEnvs | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /usr/sbin
|
mountPath: /usr/sbin
|
||||||
@ -103,14 +107,13 @@ spec:
|
|||||||
- name: additional-config-sources-{{ $idx }}
|
- name: additional-config-sources-{{ $idx }}
|
||||||
mountPath: "/env-to-ini-mounts/additionals/{{ $idx }}/"
|
mountPath: "/env-to-ini-mounts/additionals/{{ $idx }}/"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.extraVolumeMounts }}
|
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
||||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||||
- name: configure-gitea
|
- name: configure-gitea
|
||||||
image: "{{ include "gitea.image" . }}"
|
image: "{{ include "gitea.image" . }}"
|
||||||
command: ["/usr/sbin/configure_gitea.sh"]
|
command: ["/usr/sbin/configure_gitea.sh"]
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- /* By default this container runs as user 1000 unless otherwise stated */ -}}
|
{{- /* By default this container runs as user 1000 unless otherwise stated */ -}}
|
||||||
{{- $csc := deepCopy .Values.containerSecurityContext -}}
|
{{- $csc := deepCopy .Values.containerSecurityContext -}}
|
||||||
@ -194,9 +197,7 @@ spec:
|
|||||||
{{- if .Values.persistence.subPath }}
|
{{- if .Values.persistence.subPath }}
|
||||||
subPath: {{ .Values.persistence.subPath }}
|
subPath: {{ .Values.persistence.subPath }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.extraVolumeMounts }}
|
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
||||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
terminationGracePeriodSeconds: {{ .Values.statefulset.terminationGracePeriodSeconds }}
|
terminationGracePeriodSeconds: {{ .Values.statefulset.terminationGracePeriodSeconds }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
@ -228,23 +229,26 @@ spec:
|
|||||||
ports:
|
ports:
|
||||||
- name: ssh
|
- name: ssh
|
||||||
containerPort: {{ .Values.gitea.config.server.SSH_LISTEN_PORT }}
|
containerPort: {{ .Values.gitea.config.server.SSH_LISTEN_PORT }}
|
||||||
|
{{- if .Values.service.ssh.hostPort }}
|
||||||
|
hostPort: {{ .Values.service.ssh.hostPort }}
|
||||||
|
{{- end }}
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ .Values.gitea.config.server.HTTP_PORT }}
|
containerPort: {{ .Values.gitea.config.server.HTTP_PORT }}
|
||||||
{{- if .Values.gitea.config.server.ENABLE_PPROF }}
|
{{- if .Values.gitea.config.server.ENABLE_PPROF }}
|
||||||
- name: profiler
|
- name: profiler
|
||||||
containerPort: 6060
|
containerPort: 6060
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.gitea.livenessProbe }}
|
{{- if .Values.gitea.livenessProbe.enabled }}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
{{- toYaml .Values.gitea.livenessProbe | nindent 12 }}
|
{{- toYaml (omit .Values.gitea.livenessProbe "enabled") | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.gitea.readinessProbe }}
|
{{- if .Values.gitea.readinessProbe.enabled }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
{{- toYaml .Values.gitea.readinessProbe | nindent 12 }}
|
{{- toYaml (omit .Values.gitea.readinessProbe "enabled") | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.gitea.startupProbe }}
|
{{- if .Values.gitea.startupProbe.enabled }}
|
||||||
startupProbe:
|
startupProbe:
|
||||||
{{- toYaml .Values.gitea.startupProbe | nindent 12 }}
|
{{- toYaml (omit .Values.gitea.startupProbe "enabled") | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
@ -263,9 +267,7 @@ spec:
|
|||||||
{{- if .Values.persistence.subPath }}
|
{{- if .Values.persistence.subPath }}
|
||||||
subPath: {{ .Values.persistence.subPath }}
|
subPath: {{ .Values.persistence.subPath }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.extraVolumeMounts }}
|
{{- include "gitea.container-additional-mounts" . | nindent 12 }}
|
||||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
@ -277,6 +279,10 @@ spec:
|
|||||||
{{- with .Values.tolerations }}
|
{{- with .Values.tolerations }}
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.dnsConfig }}
|
||||||
|
dnsConfig:
|
||||||
|
{{- toYaml .Values.dnsConfig | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
volumes:
|
volumes:
|
||||||
- name: init
|
- name: init
|
||||||
@ -287,7 +293,7 @@ spec:
|
|||||||
secret:
|
secret:
|
||||||
secretName: {{ include "gitea.fullname" . }}
|
secretName: {{ include "gitea.fullname" . }}
|
||||||
defaultMode: 110
|
defaultMode: 110
|
||||||
{{- if .Values.extraVolumes }}
|
{{- if gt (len .Values.extraVolumes) 0 }}
|
||||||
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: inline-config-sources
|
- name: inline-config-sources
|
||||||
@ -329,9 +335,7 @@ spec:
|
|||||||
{{- range .Values.persistence.accessModes }}
|
{{- range .Values.persistence.accessModes }}
|
||||||
- {{ . | quote }}
|
- {{ . | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.persistence.storageClass }}
|
{{- include "gitea.persistence.storageClass" . | indent 8 }}
|
||||||
storageClassName: {{ .Values.persistence.storageClass | quote }}
|
|
||||||
{{- end }}
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: {{ .Values.persistence.size | quote }}
|
storage: {{ .Values.persistence.size | quote }}
|
||||||
|
250
values.yaml
250
values.yaml
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user