gitea: begin to phase in postgres
This commit is contained in:
parent
d5b6d704e4
commit
986d510802
2 changed files with 55 additions and 3 deletions
|
@ -15,7 +15,7 @@ type: application
|
|||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
version: 0.1.2
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
|
|
@ -35,6 +35,16 @@ spec:
|
|||
mountPath: "/etc/nginx/conf.d/"
|
||||
- name: etcletsencrypt
|
||||
mountPath: "/etc/letsencrypt"
|
||||
- name: postgres
|
||||
image: postgres:13
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ tpl .Values.identifier . }}-postgres-config
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: "/var/lib/postgresql/data"
|
||||
- name: gitea
|
||||
image: gitea/gitea:1.14
|
||||
ports:
|
||||
|
@ -45,6 +55,25 @@ spec:
|
|||
value: "1000"
|
||||
- name: USER_GID
|
||||
value: "1000"
|
||||
- name: GITEA__database__DB_TYPE
|
||||
value: "postgres"
|
||||
- name: GITEA__database__HOST
|
||||
value: "localhost"
|
||||
- name: GITEA__database__NAME
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{ tpl .Values.identifier . }}-postgres-config
|
||||
key: dbname
|
||||
- name: GITEA__database__USER
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{ tpl .Values.identifier . }}-postgres-config
|
||||
key: user
|
||||
- name: GITEA__database__PASSWD
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{ tpl .Values.identifier . }}-postgres-config
|
||||
key: password
|
||||
volumeMounts:
|
||||
- name: etcletsencrypt
|
||||
mountPath: "/etc/letsencrypt"
|
||||
|
@ -57,11 +86,13 @@ spec:
|
|||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ tpl .Values.identifier . }}-data
|
||||
- name: postgres-data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ tpl .Values.identifier . }}-postgres-data
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: {{ tpl .Values.identifier . }}-nginx-config
|
||||
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
@ -113,6 +144,18 @@ spec:
|
|||
storage: 100Mi
|
||||
storageClassName: rook-cephfs
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ tpl .Values.identifier . }}-postgres-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 500Mi
|
||||
storageClassName: rook-ceph-block
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
|
@ -151,7 +194,7 @@ spec:
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-nginx-config
|
||||
name: {{ tpl .Values.identifier . }}-nginx-config
|
||||
data:
|
||||
default.conf: |
|
||||
server {
|
||||
|
@ -169,3 +212,12 @@ data:
|
|||
proxy_pass http://localhost:3000;
|
||||
}
|
||||
}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ tpl .Values.identifier . }}-postgres-config
|
||||
data:
|
||||
POSTGRES_USER: gitea
|
||||
POSTGRES_PASSWORD: aiJohtoqueeng0oosh8ohfoh1chahPh3
|
||||
POSTGRES_DB: gitea
|
||||
|
|
Loading…
Reference in a new issue