Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

Homer persistence enabled fails to create a pvc #1464

Open
sudo-rm-rf-slash opened this issue Mar 23, 2022 · 6 comments
Open

Homer persistence enabled fails to create a pvc #1464

sudo-rm-rf-slash opened this issue Mar 23, 2022 · 6 comments

Comments

@sudo-rm-rf-slash
Copy link

sudo-rm-rf-slash commented Mar 23, 2022

Details

Helm chart name and version:

homer-7.1.0

Container name and tag:

b4bz/homer:21.09.2
I also tested b4bz/homer:latest (Latest Image was 20/03/2022)

What steps did you take and what happened:

The homer chart ignores persistence enabled: true and does not attempt to create a pvc.
I have used multiple helm charts by k8s-at-home and they all work fine and create a pvc.

Relevant Helm values:

persistence:
  config:
    enabled: true
    mountPath: /www/assets
    storageClass: freenas-nfs-csi
    accessMode: ReadWriteMany
    size: 1Gi

What did you expect to happen:

I expected a homer PVC to be created.

Anything else you would like to add:

I am running MicroK8s v1.23.4-2+98fc2022f3ad3e on Ubunutu 20.03 AMD64 in a 3 node cluster.
My NAS NFS target is TrueNAS Core 12.

I am using https://github.com/democratic-csi/democratic-csi provisioner for nfs
I also got the same result when using the nfs.csi.k8s.io provisioner v1.20

Additional Information:

After applying the helm chart when I query the cluster for a pvc there is no homer pvc.
You can see two succesful PVC claims for other deployments that are Bound.
One is using the freenas-nfs-csi strorage class.

$ kubectl get pvc --all-namespaces
NAMESPACE   NAME                       STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS        AGE
default     photoprism-config          Bound    pvc-04f8b44a-ee1f-437f-bcd0-b6ee796c9748   1Gi        RWX            freenas-nfs-csi     22h
default     data-wikijs-postgresql-0   Bound    pvc-638e8615-bb7f-4102-ae92-64814ca83cfc   10Gi       RWO            freenas-iscsi-csi   21h
@sudo-rm-rf-slash sudo-rm-rf-slash changed the title Homer PVC not working Homer persistence enabled fails to create a pvc Mar 23, 2022
@bjw-s
Copy link
Contributor

bjw-s commented Apr 25, 2022

Do you happen to have https://github.com/k8s-at-home/charts/blob/master/charts/stable/homer/values.yaml#L50enabled?
In that case the config persistence item would be overwritten by the configured configMap.

I'll add a note to the README about this behavior if that is indeed what is causing it for you.

@sudo-rm-rf-slash
Copy link
Author

Yes. I have configmap enabled.

@ghost
Copy link

ghost commented Jun 25, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Categorises a PR or issue that has not been active for a specified time. label Jun 25, 2022
@sudo-rm-rf-slash
Copy link
Author

Any chance we can get this issue resolved? Configmap is required. That is how the homer config is stored.

@onedr0p
Copy link
Member

onedr0p commented Jun 26, 2022

Hi @sudo-rm-rf-slash we're a very small team (2-3 people maintaining these charts) and it's unfortunate to say we don't prioritize applications we do not use ourselves. Any help would be great from you or the the community to help fix issues. I hope you understand.

@ghost ghost removed the stale Categorises a PR or issue that has not been active for a specified time. label Jun 27, 2022
@djjudas21
Copy link
Contributor

@sudo-rm-rf-slash as a workaround, you can just change this:

persistence:
  config:
    enabled: true
    mountPath: /www/assets
    storageClass: freenas-nfs-csi
    accessMode: ReadWriteMany
    size: 1Gi

to

persistence:
  whatever:
    enabled: true
    mountPath: /www/assets
    storageClass: freenas-nfs-csi
    accessMode: ReadWriteMany
    size: 1Gi

and mount your PVC under a different name whatever so it doesn't clash with the configmap.

For what it's worth, looks like our setups are almost identical (MicroK8s, TrueNAS, Democratic CSI). For my Homer instance, instead of making such a lightweight app rely on persistent storage, I store my assets in a configmap and mount that into the pod as a directory.

Relevant part of my values.yaml:

# make a configmap under a different name and mount it as a dir
persistence:
  images:
    name: homer-images
    enabled: true
    mountPath: /www/assets/custom
    type: configMap

configmap:
  # configmap with images
  images:
    enabled: true
  # regular Homer config here
  config:
    # -- Store homer configuration as a ConfigMap
    enabled: true
    # -- Homer configuration. See [image documentation](https://github.com/bastienwirtz/homer/blob/main/docs/configuration.md) for more information.
    # @default -- See values.yaml
    data:

Then the images are stored with my values.yaml in a subdirectory called images and are loaded into the configmap at deploy time, like this:

#!/bin/sh
helm upgrade -i --create-namespace -n homer homer -f values.yaml k8s-at-home/homer
kubectl create configmap -n homer homer-images --from-file=logos --dry-run -o yaml | kubectl apply -f -

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants