working api configmap

This commit is contained in:
perf3ct 2023-10-04 14:31:06 -07:00
parent f7731a71f6
commit ca27726852
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232
3 changed files with 39 additions and 9 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
charts/*.tgz
*.tgz
output.yaml

View File

@ -14,6 +14,14 @@ service:
port: 3456
protocol: HTTP
persistence:
config:
enabled: true
type: configMap
name: "{{ .Release.Name }}-api-config"
mountPath: /etc/vikunja/config.yml
subPath: config.yml
env:
{{ if .Values.redis.enabled }}
@ -24,16 +32,12 @@ env:
{{ end }}
# Logic to decide what the api URL should be
{{ if .Values.ingress.enabled }}
VIKUNJA_API_URL: "https://{{ .Values.ingress.host }}{{ .Values.ingress.path }}"
{{ else if .Values.service.main.enabled }}
VIKUNJA_API_URL: "http://{{ .Values.service.main.name }}.{{ .Values.service.main.namespace }}.svc.cluster.local:{{ .Values.service.main.ports.http.port }}{{ .Values.ingress.path }}"
{{ else }}
VIKUNJA_API_URL: "http://localhost:3456{{ .Values.ingress.path }}"
{{ if .Values.frontend.ingress.enabled }}
VIKUNJA_FRONTEND_URL: "http://{{ index .Values.frontend.ingress.main.hosts 0 "host" }}{{ index .Values.frontend.ingress.main.hosts 0 "path" }}"
{{ end }}
{{ end }}
{{ end }}
{{ if .Values.api.enabled }}
{{- $ctx := deepCopy . -}}

View File

@ -15,8 +15,6 @@ env:
VIKUNJA_DATABASE_PASSWORD: "{{ .Values.postgresql.global.postgresql.auth.password }}"
VIKUNJA_TYPESENSE_APIKEY: "{{ .Values.typesense.env.TYPESENSE_API_KEY }}"
VIKUNJA_TYPESENSE_URL: '{{ printf "%s-typesense" .Release.Name }}'
VIKUNJA_FRONTEND_URL: '{{ printf "http://%s-frontend" .Release.Name }}'
VIKUNJA_API_URL: '{{ .Values.backened.ingress.main.hosts[0].host }}'
image:
tag: 0.21.0
@ -31,12 +29,21 @@ storage:
######################
# VIKUNJA COMPONENTS #
######################
# You can find the default values
frontend:
enabled: true
# You can add any of the top-level keys in the common chart's `values.yaml` to override them here.
# For example, this values.yaml file overrides the image values, located here:
# https://github.com/bjw-s/helm-charts/blob/a081de53024d8328d1ae9ff7e4f6bc500b0f3a29/charts/library/common/values.yaml#L63-L69
image:
repository: vikunja/frontend
pullPolicy: IfNotPresent
# You can use either a `service` or an `ingress`. `Ingress` is recommended. You can make changes the service created by this chart, by overriding the values found here:
# https://github.com/bjw-s/helm-charts/blob/a081de53024d8328d1ae9ff7e4f6bc500b0f3a29/charts/library/common/values.yaml#L294-L354
service:
main:
type: ClusterIP
# https://github.com/bjw-s/helm-charts/blob/a081de53024d8328d1ae9ff7e4f6bc500b0f3a29/charts/library/common/values.yaml#L393-L436
ingress:
main:
@ -49,6 +56,12 @@ frontend:
paths:
- path: "/"
tls: []
configMaps:
# The configuration for Vikunja's frontend.
# https://vikunja.io/docs/config-options/
config:
enabled: true
data: {}
api:
enabled: true
@ -73,6 +86,18 @@ api:
paths:
- path: "/api"
tls: []
configMaps:
# The configuration for Vikunja's backend.
# https://vikunja.io/docs/config-options/
config:
enabled: true
data:
service:
# Vikunja needs to know the frontend URL for password reset emails.
frontendUrl: http://vikunja.local
# env:
# VIKUNJA_FRONTEND_URL: http://vikunja.local/api
##########################
# END VIKUNJA COMPONENTS #