{{- define "vikunja.api.hardcodedValues" -}} global: nameOverride: api service: main: enabled: true primary: true type: ClusterIP ports: http: enabled: true primary: true port: 3456 protocol: HTTP persistence: config: enabled: true type: configMap name: "{{ .Release.Name }}-api-config" mountPath: /etc/vikunja/config.yml subPath: config.yml probes: liveness: &probes enabled: true custom: true spec: httpGet: path: /api/v1/info port: http initialDelaySeconds: 0 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 3 readiness: *probes startup: enabled: false env: {{ if .Values.redis.enabled }} VIKUNJA_REDIS_ENABLED: "true" {{ end }} {{ if .Values.typesense.enabled }} VIKUNJA_TYPESENSE_ENABLED: "true" {{ end }} {{ if and .Values.frontend.ingress.enabled .Values.api.configMaps.config.enabled}} # The configuration for Vikunja's api. # https://vikunja.io/docs/config-options/ VIKUNJA_SERVICE_FRONTENDURL: "http://{{ index .Values.frontend.ingress.main.hosts 0 "host" }}{{ index .Values.frontend.ingress.main.hosts 0 "path" }}" {{ end }} # Logic to decide what the api URL should be {{ 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 }} {{ if .Values.api.enabled }} {{- $ctx := deepCopy . -}} {{- $_ := get .Values "api" | mergeOverwrite $ctx.Values -}} {{- $_ = include "vikunja.api.hardcodedValues" . | fromYaml | merge $ctx.Values -}} {{- include "bjw-s.common.loader.all" $ctx }} {{ end }}