Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage configmap: settings layout sorting #36

Open
urbaman opened this issue Nov 25, 2024 · 1 comment
Open

Homepage configmap: settings layout sorting #36

urbaman opened this issue Nov 25, 2024 · 1 comment

Comments

@urbaman
Copy link

urbaman commented Nov 25, 2024

Hi,

I put this in the helm values:

  settings:
    title: My Homelab Homepage
    headerStyle: boxed
    language: it
    layout:
      Media:
        style: row
        columns: 2
        tab: Services
      Strumenti:
        style: row
        columns: 4
        tab: Services
      Automation:
        style: row
        columns: 4
        tab: Services
      Database:
        tab: Services
      Domotica:
        tab: Services
      Finanza:
        tab: Services
      Cloud:
        tab: Services
      Storage:
        tab: Services
      Monitoring:
        style: row
        columns: 3
        tab: Infrastructure
      Kubernetes:
        style: row
        columns: 2
        tab: Infrastructure
      Management:
        style: row
        columns: 2
        tab: Infrastructure
      Proxy:
        tab: Infrastructure
      Network management:
        tab: Infrastructure
      Security:
        tab: Infrastructure

But get this in the configmap:

  settings.yaml: |
    headerStyle: boxed
    language: it
    layout:
      Automation:
        columns: 4
        style: row
        tab: Services
      Cloud:
        tab: Services
      Database:
        tab: Services
      Domotica:
        tab: Services
      Finanza:
        tab: Services
      Kubernetes:
        columns: 2
        style: row
        tab: Infrastructure
      Management:
        columns: 2
        style: row
        tab: Infrastructure
      Media:
        columns: 2
        style: row
        tab: Services
      Monitoring:
        columns: 3
        style: row
        tab: Infrastructure
      Network management:
        tab: Infrastructure
      Proxy:
        tab: Infrastructure
      Security:
        tab: Infrastructure
      Storage:
        tab: Services
      Strumenti:
        columns: 4
        style: row
        tab: Services
    title: My Homelab Homepage

Due to the sorting feature of the layout in homepage, I would need a way to properly set the settings content as fixed, not rearranged alphabetically.

@devRoemer
Copy link

It's caused by the toYaml in the configmap:

{{- .Values.config.settings | toYaml | nindent 4 }}

A fix would require to pass the value as string - breaking change in the chart

A workaround would be to create the configmap yourself and set it's name by the property "useExistingConfigMap"

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

No branches or pull requests

2 participants