fix(homepage) minor improvements for Helm users (#18729)

**Description**
Small fixes and clean up things to make the Homepage chart easier to
install for Helm users. This seems to work fine for me installing with
Helm, and I think it should work for all platforms.

I think this is a breaking change for Helm users and I added a bit to
the Changelog to explain it too. Let me know and I can format that
differently. For right now it's just a link to the repository since the
PR doesn't exist yet.

The bugfix is fixing the path on force-services-config. The rest is a
bit of templating to make things easier to swap between editing the
config in the configmaps vs in the container.

⚒️ Fixes  # N/A

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [X] 🪛 Bugfix
- [X] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [X] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
I ran this values.yaml file in my own k3s cluster using Helm with
ingress added. I didn't repackage the chart to test locally or anything,
but I think testing the values.yaml file is enough. Let me know and I
can do some more testing.

**📃 Notes:**
I've been learning k8s and Helm recently for fun and found some of
these. Any feedback is appreciated.

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [X] 👀 I have performed a self-review of my own code
- [X] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [X] ⬆️ I increased versions for any altered app according to semantic
versioning

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._

---------

Signed-off-by: Kjeld Schouten <info@kjeldschouten.nl>
Co-authored-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
This commit is contained in:
mgale456
2024-03-01 10:23:40 +01:00
committed by GitHub
co-authored by Kjeld Schouten
parent 4d41312666
commit c469dcd318
2 changed files with 27 additions and 27 deletions
+1 -1
View File
@@ -33,4 +33,4 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/homepage - https://github.com/truecharts/charts/tree/master/charts/stable/homepage
- https://ghcr.io/gethomepage/homepage - https://ghcr.io/gethomepage/homepage
type: application type: application
version: 7.2.0 version: 7.2.1
+26 -26
View File
@@ -33,7 +33,7 @@ workload:
echo "Config file copied, you can now edit it at /app/config/settings.yaml" echo "Config file copied, you can now edit it at /app/config/settings.yaml"
fi fi
if [ ! -f /app/config/widgets.yaml ]; then if [ ! -f /app/config/widgets.yaml ]; then
echo "wdigets file not found, copying dummy..." echo "widgets file not found, copying dummy..."
cp /dummy-config/widgets.yaml /app/config/widgets.yaml cp /dummy-config/widgets.yaml /app/config/widgets.yaml
echo "Config file copied, you can now edit it at /app/config/widgets.yaml" echo "Config file copied, you can now edit it at /app/config/widgets.yaml"
fi fi
@@ -70,8 +70,8 @@ persistence:
type: "configmap" type: "configmap"
objectName: config objectName: config
bookmarks-config: bookmarks-config:
# Only enable when not using homepageConfig # Only enable when not using forceConfigFromValues
enabled: true enabled: "{{ not .Values.forceConfigFromValues }}"
mountPath: /dummy-config/bookmarks.yaml mountPath: /dummy-config/bookmarks.yaml
subPath: bookmarks.yaml subPath: bookmarks.yaml
readOnly: true readOnly: true
@@ -81,16 +81,16 @@ persistence:
main: main:
init-config: {} init-config: {}
force-bookmarks-config: force-bookmarks-config:
# Only enable when not using homepageConfig # Only enable when using forceConfigFromValues
enabled: false enabled: "{{ .Values.forceConfigFromValues }}"
mountPath: /app/config/bookmarks.yaml mountPath: /app/config/bookmarks.yaml
subPath: bookmarks.yaml subPath: bookmarks.yaml
readOnly: true readOnly: true
type: "configmap" type: "configmap"
objectName: config objectName: config
settings-config: settings-config:
# Only enable when not using homepageConfig # Only enable when not using forceConfigFromValues
enabled: true enabled: "{{ not .Values.forceConfigFromValues }}"
mountPath: /dummy-config/settings.yaml mountPath: /dummy-config/settings.yaml
subPath: settings.yaml subPath: settings.yaml
readOnly: true readOnly: true
@@ -100,16 +100,16 @@ persistence:
main: main:
init-config: {} init-config: {}
force-settings-config: force-settings-config:
# Only enable when not using homepageConfig # Only enable when using forceConfigFromValues
enabled: false enabled: "{{ .Values.forceConfigFromValues }}"
mountPath: /app/config/settings.yaml mountPath: /app/config/settings.yaml
subPath: settings.yaml subPath: settings.yaml
readOnly: true readOnly: true
type: "configmap" type: "configmap"
objectName: config objectName: config
services-config: services-config:
# Only enable when not using homepageConfig # Only enable when not using forceConfigFromValues
enabled: true enabled: "{{ not .Values.forceConfigFromValues }}"
mountPath: /dummy-config/services.yaml mountPath: /dummy-config/services.yaml
subPath: services.yaml subPath: services.yaml
readOnly: true readOnly: true
@@ -119,16 +119,16 @@ persistence:
main: main:
init-config: {} init-config: {}
force-services-config: force-services-config:
# Only enable when not using homepageConfig # Only enable when using forceConfigFromValues
enabled: false enabled: "{{ .Values.forceConfigFromValues }}"
mountPath: /app/services/services.yaml mountPath: /app/config/services.yaml
subPath: services.yaml subPath: services.yaml
readOnly: true readOnly: true
type: "configmap" type: "configmap"
objectName: config objectName: config
widgets-config: widgets-config:
# Only enable when not using homepageConfig # Only enable when not using forceConfigFromValues
enabled: true enabled: "{{ not .Values.forceConfigFromValues }}"
mountPath: /dummy-config/widgets.yaml mountPath: /dummy-config/widgets.yaml
subPath: widgets.yaml subPath: widgets.yaml
readOnly: true readOnly: true
@@ -138,16 +138,16 @@ persistence:
main: main:
init-config: {} init-config: {}
force-widgets-config: force-widgets-config:
# Only enable when not using homepageConfig # Only enable when using forceConfigFromValues
enabled: false enabled: "{{ .Values.forceConfigFromValues }}"
mountPath: /app/config/widgets.yaml mountPath: /app/config/widgets.yaml
subPath: widgets.yaml subPath: widgets.yaml
readOnly: true readOnly: true
type: "configmap" type: "configmap"
objectName: config objectName: config
custom-css-config: custom-css-config:
# Only enable when not using homepageConfig # Only enable when not using forceConfigFromValues
enabled: true enabled: "{{ not .Values.forceConfigFromValues }}"
mountPath: /dummy-config/custom.css mountPath: /dummy-config/custom.css
subPath: custom.css subPath: custom.css
readOnly: true readOnly: true
@@ -157,16 +157,16 @@ persistence:
main: main:
init-config: {} init-config: {}
force-custom-css-config: force-custom-css-config:
# Only enable when not using homepageConfig # Only enable when using forceConfigFromValues
enabled: false enabled: "{{ .Values.forceConfigFromValues }}"
mountPath: /app/config/custom.css mountPath: /app/config/custom.css
subPath: custom.css subPath: custom.css
readOnly: true readOnly: true
type: "configmap" type: "configmap"
objectName: config objectName: config
custom-js-config: custom-js-config:
# Only enable when not using homepageConfig # Only enable when not using forceConfigFromValues
enabled: true enabled: "{{ not .Values.forceConfigFromValues }}"
mountPath: /dummy-config/custom.js mountPath: /dummy-config/custom.js
subPath: custom.js subPath: custom.js
readOnly: true readOnly: true
@@ -176,8 +176,8 @@ persistence:
main: main:
init-config: {} init-config: {}
force-custom-js-config: force-custom-js-config:
# Only enable when not using homepageConfig # Only enable when using forceConfigFromValues
enabled: false enabled: "{{ .Values.forceConfigFromValues }}"
mountPath: /app/config/custom.js mountPath: /app/config/custom.js
subPath: custom.js subPath: custom.js
readOnly: true readOnly: true