NAS-123809 / 24.04 / Gitea fix strategy (#1493)

* fix gitea update stratetgy

* add db details to notes.txt
This commit is contained in:
Stavros Kois
2023-08-30 14:20:09 +03:00
committed by GitHub
parent c9e6527733
commit ce4572265b
4 changed files with 25 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ description: Gitea - Git with a cup of tea
annotations:
title: Gitea
type: application
version: 1.0.15
version: 1.0.16
apiVersion: v2
appVersion: '1.19.0'
kubeVersion: '>=1.16.0-0'

View File

@@ -15,6 +15,11 @@
{{- $dbPass = ((index .data "POSTGRES_PASSWORD") | b64dec) -}}
{{- end -}}
{{/* Temporary set dynamic db details on values,
so we can print them on the notes */}}
{{- $_ := set .Values "giteaDbPass" $dbPass -}}
{{- $_ := set .Values "giteaDbHost" $dbHost -}}
{{ $dbURL := (printf "postgres://%s:%s@%s:5432/%s?sslmode=disable" $dbUser $dbPass $dbHost $dbName) }}
secret:
postgres-creds:

View File

@@ -11,7 +11,7 @@ RE_STABLE_VERSION = re.compile(r'[0-9]+\.[0-9]+\.[0-9]+-rootless')
def newer_mapping(image_tags):
key = list(image_tags.keys())[0]
tags = {t: t for t in image_tags[key] if RE_STABLE_VERSION.fullmatch(t)}
tags = {t.strip('-rootless'): t for t in image_tags[key] if RE_STABLE_VERSION.fullmatch(t)}
version = semantic_versioning(list(tags))
if not version:
return {}

View File

@@ -38,3 +38,21 @@ giteaStorage:
pgBackup:
type: ixVolume
datasetName: pgBackup
notes:
custom: |
## Database
You can connect to the database using the pgAdmin App from the catalog
<details>
<summary>Database Details</summary>
- Database: `gitea`
- Username: `gitea`
- Password: `{{ .Values.giteaDbPass }}`
- Host: `{{ .Values.giteaDbHost }}.{{ .Release.Namespace }}.svc.cluster.local`
- Port: `5432`
</details>
{{- $_ := unset .Values "giteaDbPass" }}
{{- $_ := unset .Values "giteaDbHost" }}