Default values not working for PVC #15

Closed
opened 2023-11-15 16:09:12 +00:00 by hugosxm · 4 comments

Hi,

I just installed vikunja with the chart and I found that by default you loose project wallpaper and tasks attachements at pod restart. Taking a look at the chart I saw that the default pvc is mounted to /data.

So I added this :

  persistence:
    data:
      enabled: true
      accessMode: ReadWriteOnce
      size: 10Gi
      mountPath: /app/vikunja/files

I also did :

    config:
      enabled: true
      type: secret
      mountPath: /etc/vikunja/config.yml
      existingSecret: vikunja-api-config

So I can mount a secret to the config as the config contains the oauth secret. A comment in the default values should explain that possibilty I think ?

I could do a PR with my two little tweaks if you want ?

Vikunja is really cool, I will use it everyday now that i found the nice configuration :) keep the good work !

Hi, I just installed vikunja with the chart and I found that by default you loose project wallpaper and tasks attachements at pod restart. Taking a look at the chart I saw that the default pvc is mounted to /data. So I added this : ``` persistence: data: enabled: true accessMode: ReadWriteOnce size: 10Gi mountPath: /app/vikunja/files ``` I also did : ``` config: enabled: true type: secret mountPath: /etc/vikunja/config.yml existingSecret: vikunja-api-config ``` So I can mount a secret to the config as the config contains the oauth secret. A comment in the default values should explain that possibilty I think ? I could do a PR with my two little tweaks if you want ? Vikunja is really cool, I will use it everyday now that i found the nice configuration :) keep the good work !
Owner

Nice catch! A PR would be awesome.

Nice catch! A PR would be awesome.
konrad added the
bug
label 2023-11-15 17:56:55 +00:00
Author

Here it is : #16

My vim also deleted some white spaces you add in the README ^^

I edited the default values.yaml and the README to explain the use of secrets, tell me if you need anything

Here it is : https://kolaente.dev/vikunja/helm-chart/pulls/16 My vim also deleted some white spaces you add in the README ^^ I edited the default values.yaml and the README to explain the use of secrets, tell me if you need anything
Contributor

Yep, that would do it, and thanks for catching that. You're right, I had it mounted to /data by default on accident, and your line:

mountPath: /app/vikunja/files

Is 100% correct.

When it comes to the secrets, what you did is correct as well. However, you could do the following (from your user defined values.yaml) to mount your own secret as Vikunja's config:

api:
  persistence:
    config:
      type: secret
      name: asdf-my-custom-secret1

This way, you can set the name of the Secret you wish for the Vikunja api pod to mount as config.yml inside the pod. You also don't have to define mountPath again, as it's already defined here. Anything users define in their values.yaml will override what's in the chart's templates, which means you can override anything as you see fit.

Let me know if you have any questions @hugosxm, but I would suggest modifying the api values in your values.yaml as above, and modifying the README.md accordingly :)

Yep, that would do it, and thanks for catching that. You're right, I had it mounted to `/data` by default on accident, and your line: ```yaml mountPath: /app/vikunja/files ``` Is 100% correct. When it comes to the secrets, what you did is correct as well. However, you could do the following (from your user defined `values.yaml`) to mount your own secret as Vikunja's config: ```yaml api: persistence: config: type: secret name: asdf-my-custom-secret1 ``` This way, you ***can*** set the name of the `Secret` you wish for the Vikunja `api` pod to mount as `config.yml` inside the pod. You also don't have to define `mountPath` again, as it's already defined [here](https://kolaente.dev/vikunja/helm-chart/src/commit/62112e8df085b4868bb934f64c0debccee3d1545/templates/api.yaml#L22). Anything users define in their `values.yaml` will override what's in the chart's templates, which means you can override anything as you see fit. Let me know if you have any questions @hugosxm, but I would suggest modifying the `api` values in your `values.yaml` as above, and modifying the README.md accordingly :)
Author

Hi @perfectra1n , sorry I did this just before going abroad... Just went back and tried this :

    config:
      type: secret
      name: vikunja-api-config-testcustom

Works as intended :), so I will close this ticket and the PR as you did everything with #17 !

Thanks !

Hi @perfectra1n , sorry I did this just before going abroad... Just went back and tried this : ``` config: type: secret name: vikunja-api-config-testcustom ``` Works as intended :), so I will close this ticket and the PR as you did everything with https://kolaente.dev/vikunja/helm-chart/pulls/17 ! Thanks !
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/helm-chart#15
No description provided.