diff --git a/.gitignore b/.gitignore index f899a70..67f5729 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ charts/*.tgz *.tgz +output.yaml diff --git a/templates/backend.yaml b/templates/api.yaml similarity index 63% rename from templates/backend.yaml rename to templates/api.yaml index 5343347..0ce46b2 100644 --- a/templates/backend.yaml +++ b/templates/api.yaml @@ -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 . -}} diff --git a/values.yaml b/values.yaml index 8a0d503..3db65b5 100644 --- a/values.yaml +++ b/values.yaml @@ -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 #