Utilize bjw-s's common
Helm library. #13
|
@ -1,7 +1,7 @@
|
|||
Vikunja Helm Chart
|
||||
===
|
||||
|
||||
Deployes both frontend and backend. Also, you can deploy bitnami's PostgreSQL and Redis as subcharts if you want.
|
||||
Deployes both frontend and api. Also, you can deploy bitnami's PostgreSQL and Redis as subcharts if you want.
|
||||
konrad marked this conversation as resolved
Outdated
|
||||
|
||||
## Requirements
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{- define "vikunja.backend.hardcodedValues" -}}
|
||||
{{- define "vikunja.api.hardcodedValues" -}}
|
||||
global:
|
||||
nameOverride: backend
|
||||
nameOverride: api
|
||||
perfectra1n marked this conversation as resolved
Outdated
konrad
commented
Is this a special "backend" or the api service? If it's the api, it should be called api. (I know there are still parts of Vikunja's documentation where it's called "backend" but I'd like to get rid of that anyway) Is this a special "backend" or the api service? If it's the api, it should be called api.
(I know there are still parts of Vikunja's documentation where it's called "backend" but I'd like to get rid of that anyway)
perfectra1n
commented
Gotchya, I'll rename that to be Gotchya, I'll rename that to be `api` instead. I saw `backend` in the docs like you said, so I just ran with that.
|
||||
|
||||
service:
|
||||
main:
|
||||
|
@ -23,12 +23,21 @@ env:
|
|||
VIKUNJA_TYPESENSE_ENABLED: "true"
|
||||
{{ 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 }}"
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ if .Values.backend.enabled }}
|
||||
{{ if .Values.api.enabled }}
|
||||
{{- $ctx := deepCopy . -}}
|
||||
{{- $_ := get .Values "backend" | mergeOverwrite $ctx.Values -}}
|
||||
{{- $_ = include "vikunja.backend.hardcodedValues" . | fromYaml | merge $ctx.Values -}}
|
||||
{{- $_ := get .Values "api" | mergeOverwrite $ctx.Values -}}
|
||||
{{- $_ = include "vikunja.api.hardcodedValues" . | fromYaml | merge $ctx.Values -}}
|
||||
{{- include "bjw-s.common.loader.all" $ctx }}
|
||||
{{ end }}
|
|
@ -5,14 +5,14 @@ global:
|
|||
service:
|
||||
main:
|
||||
enabled: true
|
||||
{{- if not .Values.backend.enabled -}}
|
||||
{{- if not .Values.api.enabled -}}
|
||||
primary: true
|
||||
{{- end }}
|
||||
type: ClusterIP
|
||||
ports:
|
||||
http:
|
||||
enabled: true
|
||||
{{- if not .Values.backend.enabled -}}
|
||||
{{- if not .Values.api.enabled -}}
|
||||
primary: true
|
||||
{{- end }}
|
||||
port: 80
|
||||
|
|
27
values.yaml
|
@ -1,9 +1,10 @@
|
|||
## This chart relies on the common library chart from bjw-s
|
||||
## You can find it and the values you can provide and modify, at https://github.com/bjw-s/helm-charts/tree/main/charts/library/common
|
||||
## Refer there for more detail about the supported values
|
||||
|
||||
# These entries are shared between all the vikunja components
|
||||
## You can find it and the values you can provide and modify, at https://github.com/bjw-s/helm-charts/tree/a081de53024d8328d1ae9ff7e4f6bc500b0f3a29/charts/library/common
|
||||
## Here's the link to the values.yaml file: https://github.com/bjw-s/helm-charts/blob/a081de53024d8328d1ae9ff7e4f6bc500b0f3a29/charts/library/common/values.yaml
|
||||
## Refer there for more detail about the supported values.
|
||||
## Any values that you find in the above `values.yaml` can be provided to this chart and are then rendered.
|
||||
|
||||
# These environment variables are shared between all the vikunja components
|
||||
env:
|
||||
perfectra1n marked this conversation as resolved
Outdated
konrad
commented
Is there a reason we're using env here and not the config directly? We should still be able to configure Vikunja as it can be done currently: https://kolaente.dev/vikunja/helm-chart/src/branch/main/values.yaml#L142 There are things that can't be configured via env like openid providers. Is there a reason we're using env here and not the config directly?
We should still be able to configure Vikunja as it can be done currently: https://kolaente.dev/vikunja/helm-chart/src/branch/main/values.yaml#L142
There are things that can't be configured via env like openid providers.
perfectra1n
commented
Ah, didn't know that. I thought everything was configurable via Ah, didn't know that. I thought everything was configurable via `env` variables (which I've always found easier to manage), but I'll go ahead and use the `config` instead.
|
||||
VIKUNJA_REDIS_HOST: '{{ printf "%s-redis-master" .Release.Name }}'
|
||||
VIKUNJA_REDIS_DB: "{{ .Release.Name }}"
|
||||
|
@ -15,7 +16,7 @@ env:
|
|||
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: '{{ printf "http://%s-backend:3456" .Release.Name }}'
|
||||
VIKUNJA_API_URL: '{{ .Values.backened.ingress.main.hosts[0].host }}'
|
||||
|
||||
konrad marked this conversation as resolved
Outdated
konrad
commented
Doesn't this need a link to the docs with the default config? Doesn't this need a link to the docs with the default config?
perfectra1n
commented
fixed fixed
https://kolaente.dev/vikunja/helm-chart/commit/d8500214e98def13755bad78e31e9b2e39404df1
|
||||
image:
|
||||
tag: 0.21.0
|
||||
|
@ -27,12 +28,16 @@ storage:
|
|||
# You have to specify an existing PVC to use
|
||||
existingClaim:
|
||||
|
||||
# vikunja components
|
||||
######################
|
||||
# VIKUNJA COMPONENTS #
|
||||
######################
|
||||
frontend:
|
||||
enabled: true
|
||||
# https://github.com/bjw-s/helm-charts/blob/a081de53024d8328d1ae9ff7e4f6bc500b0f3a29/charts/library/common/values.yaml#L63-L69
|
||||
image:
|
||||
repository: vikunja/frontend
|
||||
pullPolicy: IfNotPresent
|
||||
# https://github.com/bjw-s/helm-charts/blob/a081de53024d8328d1ae9ff7e4f6bc500b0f3a29/charts/library/common/values.yaml#L393-L436
|
||||
konrad marked this conversation as resolved
Outdated
konrad
commented
Why Why `vikunja.local`?
perfectra1n
commented
The existing chart has “chart-example.local”, I figured that changing that to “vikunja.local” would be more Vikunja “branded”, if you will, lol. I can change it back if you would prefer! The existing chart has “chart-example.local”, I figured that changing that to “vikunja.local” would be more Vikunja “branded”, if you will, lol.
I can change it back if you would prefer!
konrad
commented
I'm fine with either but it should be clear that the value is only an example value and should be changed. I'm fine with either but it should be clear that the value is only an example value and should be changed.
perfectra1n
commented
https://kolaente.dev/vikunja/helm-chart/commit/7d2f43fee3d21c2a5844ac71bcf54c7da96cf1b9
|
||||
ingress:
|
||||
main:
|
||||
enabled: true
|
||||
|
@ -45,7 +50,7 @@ frontend:
|
|||
- path: "/"
|
||||
tls: []
|
||||
|
||||
backend:
|
||||
api:
|
||||
enabled: true
|
||||
image:
|
||||
repository: vikunja/api
|
||||
|
@ -69,7 +74,12 @@ backend:
|
|||
- path: "/api"
|
||||
tls: []
|
||||
|
||||
# Dependencies
|
||||
##########################
|
||||
# END VIKUNJA COMPONENTS #
|
||||
##########################
|
||||
|
||||
|
||||
# Optional Dependencies
|
||||
postgresql:
|
||||
enabled: true
|
||||
global:
|
||||
|
@ -103,6 +113,7 @@ typesense:
|
|||
tag: 0.25.1
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
# https://github.com/bjw-s/helm-charts/blob/a081de53024d8328d1ae9ff7e4f6bc500b0f3a29/charts/library/common/values.yaml#L85-L94
|
||||
serviceAccount:
|
||||
# -- Specifies whether a service account should be created
|
||||
create: false
|
||||
|
|
Typo: Should be "deploys"
oops, thanks for catching that! fat finger
d8500214e9