Skip to content

Commit

Permalink
Tasking Manager DB charts (#331)
Browse files Browse the repository at this point in the history
* Add TM database

* Add values

* Fix tm postgres uri

* Add a section in cronjob to backup TM - DB

* Add values to create ClusterIssuer

* Update if statement

* Update name for tm - db

* Update tm-db endpoint

* Update pv claim for tmdb

* Update tm api name

* Update tm api name - deployment

* Update postgres URI for tm - api

* Update tiler db for backup

* Fix endpoint for tm db
  • Loading branch information
Rub21 authored May 31, 2024
1 parent 2cb4571 commit 8cf67bb
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion osm-seed/templates/db/db-backup-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
{{ if eq $job.name "tm-db" }}
# DB credentials
- name: POSTGRES_HOST
value: {{ $.Release.Name }}-tm-db
value: {{ $.Release.Name }}-tasking-manager-db
- name: POSTGRES_DB
value: {{ $.Values.tmDb.env.POSTGRES_DB }}
- name: POSTGRES_PASSWORD
Expand Down
6 changes: 3 additions & 3 deletions osm-seed/templates/tasking-manager-api/tm-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "osm-seed.fullname" . }}-tasking-manager-api
name: {{ .Release.Name }}-tasking-manager-api
labels:
app: {{ template "osm-seed.name" . }}
component: tasking-manager-api-deployment
Expand Down Expand Up @@ -46,7 +46,7 @@ spec:
{{- end }}
env:
- name: POSTGRES_HOST
value: {{ .Release.Name }}-tm-db
value: {{ .Release.Name }}-tasking-manager-db
- name: POSTGRES_DB
value: {{ .Values.tmDb.env.POSTGRES_DB }}
- name: POSTGRES_PASSWORD
Expand All @@ -56,7 +56,7 @@ spec:
- name: POSTGRES_PORT
value: "5432"
- name: TM_DB
value: {{ printf "postgresql://%s:%s@%s-tm-db/%s" .Values.tmDb.env.POSTGRES_USER .Values.tmDb.env.POSTGRES_PASSWORD .Release.Name .Values.tmDb.env.POSTGRES_DB }}
value: {{ printf "postgresql://%s:%s@%s-tasking-manager-db/%s" .Values.tmDb.env.POSTGRES_USER .Values.tmDb.env.POSTGRES_PASSWORD .Release.Name .Values.tmDb.env.POSTGRES_DB }}
- name: TM_ORG_NAME
value: {{ .Values.tmApi.env.TM_ORG_NAME }}
- name: TM_ORG_CODE
Expand Down
2 changes: 1 addition & 1 deletion osm-seed/templates/tasking-manager-api/tm-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
pathType: Prefix
backend:
service:
name: {{ template "osm-seed.fullname" . }}-tasking-manager-api
name: {{ .Release.Name }}-tasking-manager-api
port:
number: 80
{{- end }}
2 changes: 1 addition & 1 deletion osm-seed/templates/tasking-manager-api/tm-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "osm-seed.fullname" . }}-tasking-manager-api
name: {{ .Release.Name }}-tasking-manager-api
labels:
app: {{ template "osm-seed.name" . }}
component: tasking-manager-api-service
Expand Down
6 changes: 3 additions & 3 deletions osm-seed/templates/tasking-manager-db/tm-db-pd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Release.Name }}-tm-db-pv
name: {{ .Release.Name }}-tasking-manager-db-pv
labels:
app: {{ template "osm-seed.name" . }}
component: tm-db-pd
Expand Down Expand Up @@ -48,7 +48,7 @@ spec:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-tm-db-pv-claim
name: {{ .Release.Name }}-tasking-manager-db-pv-claim
labels:
app: {{ template "osm-seed.name" . }}
component: db-pd
Expand All @@ -62,7 +62,7 @@ spec:
############## Other providers ##############
storageClassName: ""
{{- end }}
volumeName: {{ .Release.Name }}-tm-db-pv
volumeName: {{ .Release.Name }}-tasking-manager-db-pv
accessModes:
- ReadWriteOnce
resources:
Expand Down
4 changes: 2 additions & 2 deletions osm-seed/templates/tasking-manager-db/tm-db-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-tm-db
name: {{ .Release.Name }}-tasking-manager-db
labels:
app: {{ template "osm-seed.name" . }}
component: tm-db-service
Expand All @@ -15,5 +15,5 @@ spec:
selector:
app: {{ template "osm-seed.name" . }}
release: {{ .Release.Name }}
run: {{ .Release.Name }}-tm-db
run: {{ .Release.Name }}-tasking-manager-db
{{- end }}
12 changes: 6 additions & 6 deletions osm-seed/templates/tasking-manager-db/tm-db-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ .Release.Name }}-tm-db
name: {{ .Release.Name }}-tasking-manager-db
labels:
app: {{ template "osm-seed.name" . }}
component: db-tm-statefulset
Expand All @@ -14,14 +14,14 @@ spec:
matchLabels:
app: {{ template "osm-seed.name" . }}
release: {{ .Release.Name }}
run: {{ .Release.Name }}-tm-db
serviceName: {{ .Release.Name }}-tm-db
run: {{ .Release.Name }}-tasking-manager-db
serviceName: {{ .Release.Name }}-tasking-manager-db
template:
metadata:
labels:
app: {{ template "osm-seed.name" . }}
release: {{ .Release.Name }}
run: {{ .Release.Name }}-tm-db
run: {{ .Release.Name }}-tasking-manager-db
spec:
containers:
- name: {{ .Chart.Name }}-tm-db
Expand All @@ -32,7 +32,7 @@ spec:
protocol: TCP
env:
- name: POSTGRES_HOST
value: {{ .Release.Name }}-tm-db
value: {{ .Release.Name }}-tasking-manager-db
- name: POSTGRES_DB
value: {{ .Values.tmDb.env.POSTGRES_DB }}
- name: POSTGRES_PASSWORD
Expand Down Expand Up @@ -90,7 +90,7 @@ spec:
- name: postgres-storage
{{- if .Values.tmDb.persistenceDisk.enabled }}
persistentVolumeClaim:
claimName: {{ .Release.Name }}-tm-db-pv-claim
claimName: {{ .Release.Name }}-tasking-manager-db-pv-claim
{{- else }}
emptyDir: {}
{{- end }}
Expand Down

0 comments on commit 8cf67bb

Please sign in to comment.