Utilize bjw-s's common Helm library. #13

Merged
konrad merged 41 commits from :new-helm-chart into main 2023-11-07 14:47:24 +00:00
2 changed files with 391 additions and 290 deletions
Showing only changes of commit 7882179087 - Show all commits

View File

@ -1,313 +1,101 @@
# ┐ ┬o┬┌ ┬ ┐┌┐┐ ┬┬─┐
# │┌┘│├┴┐│ ││││┌ ││─┤
# └┘ ┘┘ ┘┘─┘┘└┘└─┘┘ ┘
## This chart relies on the common library chart from bjw-s
## You can find it at https://github.com/bjw-s/helm-charts/tree/main/charts/library/common
## Refer there for more detail about the supported values
nameOverride: ""
fullnameOverride: ""
# These entries are shared between all the vikunja components
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# Extra labels
extraLabels: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
env:
REDIS_HOSTNAME: '{{ printf "%s-redis-master" .Release.Name }}'
perfectra1n marked this conversation as resolved Outdated

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.

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.

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.
DB_HOSTNAME: "{{ .Release.Name }}-postgresql"
DB_USERNAME: "{{ .Values.postgresql.global.postgresql.auth.username }}"
DB_DATABASE_NAME: "{{ .Values.postgresql.global.postgresql.auth.database }}"
# -- You should provide your own secret outside of this helm-chart and use `postgresql.global.postgresql.auth.existingSecret` to provide credentials to the postgresql instance
DB_PASSWORD: "{{ .Values.postgresql.global.postgresql.auth.password }}"
TYPESENSE_ENABLED: "{{ .Values.typesense.enabled }}"
TYPESENSE_API_KEY: "{{ .Values.typesense.env.TYPESENSE_API_KEY }}"
TYPESENSE_HOST: '{{ printf "%s-typesense" .Release.Name }}'
VIKUNJA_FRONTEND_URL: '{{ printf "http://%s-web:3000" .Release.Name }}'
VIKUNJA_API_URL: '{{ printf "http://%s-server:3001" .Release.Name }}'
# Extra labels that will be added to all resources
extraLabels: {}
image:
konrad marked this conversation as resolved Outdated

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?

fixed

d8500214e9

fixed https://kolaente.dev/vikunja/helm-chart/commit/d8500214e98def13755bad78e31e9b2e39404df1
tag: v1.69.0
# ┬─┐┬─┐┌─┐┌┐┐┌┐┐┬─┐┌┐┐┬─┐
# ├─ │┬┘│ ││││ │ ├─ ││││ │
# ┘ ┘└┘┘─┘┘└┘ ┘ ┴─┘┘└┘┘─┘
vikunja:
persistence:
# Main data store for all photos shared between different components.
library:
# Automatically creating the library volume is not supported by this chart
# You have to specify an existing PVC to use
existingClaim:
# vikunja components
frontend:
# Public API URL that client's browser will reach
apiUrl: ""
replicaCount: 1
enabled: true
image:
repository: vikunja/frontend
repository: ghcr.io/vikunja-app/vikunja-server
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
podSecurityContext: {}
# fsGroup: 1000
securityContext:
allowPrivilegeEscalation: false
runAsUser: 101 # nginx
capabilities:
drop:
- ALL
add:
- NET_BIND_SERVICE
service:
type: ClusterIP
port: 80
# If you want to set other fields, like externalName, externalTrafficPolicy, etc.
extraSpec: {}
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
initContainers: []
sidecarContainers: []
# Extra keys to set in deployment.spec.
# Useful if you want to set minReadySeconds, progressDeadlineSeconds, strategy
extraDeploymentSpec: {}
pdb:
enabled: false
# maxUnavailable: 50%
minAvailable: 50%
imagePullSecrets: []
podAnnotations: {}
nodeSelector: {}
tolerations: []
affinity: {}
extraVolumes: []
extraVolumeMounts: []
livenessProbe: {}
# httpGet:
# path: /ready
# port: http
readinessProbe: {}
# httpGet:
# path: /ready
# port: http
startupProbe: {}
# httpGet:
# path: /
# port: http
env: {}
envFrom: {}
# ┬─┐┬─┐o
# │─┤│─┘│
# ┘ ┘┘ ┘
main:
enabled: false
annotations:
konrad marked this conversation as resolved Outdated

Why vikunja.local?

Why `vikunja.local`?

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!

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.
https://kolaente.dev/vikunja/helm-chart/commit/7d2f43fee3d21c2a5844ac71bcf54c7da96cf1b9
# proxy-body-size is set to 0 to remove the body limit on file uploads
nginx.ingress.kubernetes.io/proxy-body-size: "0"
hosts:
- host: vikunja.local
paths:
- path: "/"
tls: []
api:
# Values for this config are described here https://vikunja.io/docs/config-options/
config:
service:
JWTSecret: ""
interface: ":3456"
frontendurl: ""
enableregistration: false
timezone: GMT
database:
type: sqlite
path: /sqlite/vikunja.db
cache:
enabled: true
type: redis
redis:
enabled: false
host: ""
password: ""
db: 0
cors:
enable: false
origins: []
mailer:
enabled: false
log:
path: null
files:
basepath: /files
defaultsettings:
avatar_provider: gravatar
discoverable_by_name: true
discoverable_by_email: true
week_start: 1
enabled: true
env:
REVERSE_GEOCODING_DUMP_DIRECTORY: /geodata-cache
persistence:
enabled: false
# Specifies whether a PVC should be created
create: true
# The name of the PVC to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
spec: {}
# accessModes: ["ReadWriteOnce"]
# resources:
# requests:
# storage: 1Gi
# storageClassName: openebs-hostpath
replicaCount: 1
geodata-cache:
enabled: true
size: 1Gi
# Optional: Set this to pvc to avoid downloading the geodata every start.
type: emptyDir
accessMode: ReadWriteMany
# storageClass: your-class
konrad marked this conversation as resolved Outdated

But the default value for this one is the one defined in the ingress, why define it here again?

But the default value for this one is the one defined in the ingress, why define it here again?

Fair, forgot to use the ingress value for that variable as well. I went ahead and fixed it. I also included a comment to to the user incase they aren't using an ingress resource (I was even using a Service behind a central Nginx until recently)

fixed!

Fair, forgot to use the `ingress` value for that variable as well. I went ahead and fixed it. I also included a comment to to the user incase they aren't using an `ingress` resource (I was even using a `Service` behind a central Nginx until recently) fixed!
https://kolaente.dev/vikunja/helm-chart/commit/9cd4680e707c57d06e718f8d1e6f524408965a32 and https://kolaente.dev/vikunja/helm-chart/commit/c601e5e449523ffb7feb7d35ca72389075769d9c
image:
repository: vikunja/api
repository: ghcr.io/vikunja-app/vikunja-server
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
securityContext:
capabilities:
add: [CAP_CHOWN]
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
# Dependencies
postgresql:
enabled: false
global:
postgresql:
auth:
username: vikunja
database: vikunja
password: vikunja
service:
type: ClusterIP
port: 80
# If you want to set other fields, like externalName, externalTrafficPolicy, etc.
extraSpec: {}
ingress:
redis:
enabled: false
architecture: standalone
auth:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
typesense:
enabled: false
env:
TYPESENSE_DATA_DIR: /tsdata
TYPESENSE_API_KEY: typesense
persistence:
tsdata:
# Enabling typesense persistence is recommended to avoid slow reindexing
enabled: false
accessMode: ReadWriteOnce
size: 1Gi
# storageClass: storage-class
image:
repository: docker.io/typesense/typesense
tag: 0.24.0
pullPolicy: IfNotPresent
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
initContainers: []
sidecarContainers: []
# Extra keys to set in deployment.spec.
# Useful if you want to set minReadySeconds, progressDeadlineSeconds, strategy
extraDeploymentSpec: {}
pdb:
enabled: false
# maxUnavailable: 50%
minAvailable: 50%
imagePullSecrets: []
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 1000
nodeSelector: {}
tolerations: []
affinity: {}
extraVolumes: []
extraVolumeMounts: []
livenessProbe: {}
# httpGet:
# path: /ready
# port: http
readinessProbe: {}
# httpGet:
# path: /ready
# port: http
startupProbe: {}
# httpGet:
# path: /
# port: http
env: {}
envFrom: {}
# ┬─┐┌─┐┐─┐┌┐┐┌─┐┬─┐┬─┐┐─┐┐─┐┬
# │─┘│ │└─┐ │ │ ┬│┬┘├─ └─┐│ ││
# ┘ ┘─┘──┘ ┘ ┘─┘┘└┘┴─┘──┘└─\┘─┘
postgresqlEnabled: false
# Please refer to PostgreSQL subchart for a full list of possible values
postgresql: {}
# ┬─┐┬─┐┬─┐o┐─┐
# │┬┘├─ │ ││└─┐
# ┘└┘┴─┘┘─┘┘──┘
redisEnabled: false
# Please refer to Redis subchart for a full list of possible values
redis: {}
# ┬─┐┬─┐┐ ┬
# │┬┘│─┤│││
# ┘└┘┘ ┘└┴┘
# You can create custom resources from the plaintext definition
raw: []

313
values.yaml.old Normal file
View File

@ -0,0 +1,313 @@
# ┐ ┬o┬┌ ┬ ┐┌┐┐ ┬┬─┐
# │┌┘│├┴┐│ ││││┌ ││─┤
# └┘ ┘┘ ┘┘─┘┘└┘└─┘┘ ┘
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# Extra labels
extraLabels: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
# Extra labels that will be added to all resources
extraLabels: {}
# ┬─┐┬─┐┌─┐┌┐┐┌┐┐┬─┐┌┐┐┬─┐
# ├─ │┬┘│ ││││ │ ├─ ││││ │
# ┘ ┘└┘┘─┘┘└┘ ┘ ┴─┘┘└┘┘─┘
frontend:
# Public API URL that client's browser will reach
apiUrl: ""
replicaCount: 1
image:
repository: vikunja/frontend
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
podSecurityContext: {}
# fsGroup: 1000
securityContext:
allowPrivilegeEscalation: false
runAsUser: 101 # nginx
capabilities:
drop:
- ALL
add:
- NET_BIND_SERVICE
service:
type: ClusterIP
port: 80
# If you want to set other fields, like externalName, externalTrafficPolicy, etc.
extraSpec: {}
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
initContainers: []
sidecarContainers: []
# Extra keys to set in deployment.spec.
# Useful if you want to set minReadySeconds, progressDeadlineSeconds, strategy
extraDeploymentSpec: {}
pdb:
enabled: false
# maxUnavailable: 50%
minAvailable: 50%
imagePullSecrets: []
podAnnotations: {}
nodeSelector: {}
tolerations: []
affinity: {}
extraVolumes: []
extraVolumeMounts: []
livenessProbe: {}
# httpGet:
# path: /ready
# port: http
readinessProbe: {}
# httpGet:
# path: /ready
# port: http
startupProbe: {}
# httpGet:
# path: /
# port: http
env: {}
envFrom: {}
# ┬─┐┬─┐o
# │─┤│─┘│
# ┘ ┘┘ ┘
api:
# Values for this config are described here https://vikunja.io/docs/config-options/
config:
service:
JWTSecret: ""
interface: ":3456"
frontendurl: ""
enableregistration: false
timezone: GMT
database:
type: sqlite
path: /sqlite/vikunja.db
cache:
enabled: true
type: redis
redis:
enabled: false
host: ""
password: ""
db: 0
cors:
enable: false
origins: []
mailer:
enabled: false
log:
path: null
files:
basepath: /files
defaultsettings:
avatar_provider: gravatar
discoverable_by_name: true
discoverable_by_email: true
week_start: 1
persistence:
enabled: false
# Specifies whether a PVC should be created
create: true
# The name of the PVC to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
spec: {}
# accessModes: ["ReadWriteOnce"]
# resources:
# requests:
# storage: 1Gi
# storageClassName: openebs-hostpath
replicaCount: 1
image:
repository: vikunja/api
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
securityContext:
capabilities:
add: [CAP_CHOWN]
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 80
# If you want to set other fields, like externalName, externalTrafficPolicy, etc.
extraSpec: {}
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
initContainers: []
sidecarContainers: []
# Extra keys to set in deployment.spec.
# Useful if you want to set minReadySeconds, progressDeadlineSeconds, strategy
extraDeploymentSpec: {}
pdb:
enabled: false
# maxUnavailable: 50%
minAvailable: 50%
imagePullSecrets: []
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 1000
nodeSelector: {}
tolerations: []
affinity: {}
extraVolumes: []
extraVolumeMounts: []
livenessProbe: {}
# httpGet:
# path: /ready
# port: http
readinessProbe: {}
# httpGet:
# path: /ready
# port: http
startupProbe: {}
# httpGet:
# path: /
# port: http
env: {}
envFrom: {}
# ┬─┐┌─┐┐─┐┌┐┐┌─┐┬─┐┬─┐┐─┐┐─┐┬
# │─┘│ │└─┐ │ │ ┬│┬┘├─ └─┐│ ││
# ┘ ┘─┘──┘ ┘ ┘─┘┘└┘┴─┘──┘└─\┘─┘
postgresqlEnabled: false
# Please refer to PostgreSQL subchart for a full list of possible values
postgresql: {}
# ┬─┐┬─┐┬─┐o┐─┐
# │┬┘├─ │ ││└─┐
# ┘└┘┴─┘┘─┘┘──┘
redisEnabled: false
# Please refer to Redis subchart for a full list of possible values
redis: {}
# ┬─┐┬─┐┐ ┬
# │┬┘│─┤│││
# ┘└┘┘ ┘└┴┘
# You can create custom resources from the plaintext definition
raw: []