[FEAT] Run on Kubernetes with config map for ddclient.conf file
Is this a new feature request?
- [X] I have searched the existing issues
Wanted change
I'm moving my stuff to Kubernetes and while moving this I don't want to have to create a volume for it but only creating a configmap, it's a configuration file and it makes sense to be a configmap instead of giving it a volume only for a config file.
Reason for change
it's a configuration file and it makes sense to be a configmap instead of giving it a volume only for a config file. I tried doing it, but it's trying to change the owner of the file some some reason
chown: changing ownership of '/config/ddclient.conf': Read-only file system **** Permissions could not be set. This is probably because your volume mounts are remote or read-only. **** **** The app may not work properly and we will not provide support for it. **** chmod: changing permissions of '/config/ddclient.conf': Read-only file system s6-rc: warning: unable to start service init-ddclient-config: command exited 1
Proposed code change
No response
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
This is what I did as a workaround. Note that this will not capture upstream changes on the run shell script so you will want to pin the version of the container and review any upstream changes if you update it. This will allow you to not have to build your own Docker image.
spec:
volumes:
- name: ddclient-config-file
secret:
secretName: ddclient-secret
- name: run
emptyDir: {}
containers:
- name: ddclient
image: linuxserver/ddclient:4.0.0
imagePullPolicy: Always
command: ["/bin/bash"]
args: ["-c", "echo -e \"#!/usr/bin/with-contenv bash\nmkdir -p /run/ddclient-cache /run/ddclient && chmod 700 /config /run/ddclient-cache;\" > /etc/s6-overlay/s6-rc.d/init-ddclient-config/run && /init"]
env:
- name: LSIO_NON_ROOT_USER
value: "true"
volumeMounts:
- mountPath: /config/ddclient.conf
subPath: ddclient.conf
name: ddclient-config-file
- mountPath: /run
name: run
Related https://github.com/linuxserver/docker-ddclient/issues/68 and https://github.com/linuxserver/docker-ddclient/issues/48
PS> kubectl logs -l app=ddclient -n ddclient -f
User GID: 0
───────────────────────────────────────
Linuxserver.io version: v4.0.0-ls189
Build-date: 2025-02-11T06:52:39+00:00
───────────────────────────────────────
[custom-init] No custom files found, skipping...
Setting up watches.
Watches established.
[ls.io-init] done.
WARNING: [file /config/ddclient.conf]> file must be accessible only by its owner
WARNING: [file /config/ddclient.conf]> file must not be accessible by others.
WARNING: [file /config/ddclient.conf]> file must be accessible only by its owner
WARNING: [file /config/ddclient.conf]> file must not be accessible by others.
SUCCESS: [cloudflare][xx.com]> IPv4 address set to xx
SUCCESS: [cloudflare][xx.xx.com]> IPv4 address set to xx
SUCCESS: [cloudflare][xx.xx.com]> IPv4 address set to xx
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
I really would love this to happen but my last attempt was shot down by the maintainers sadly if memory serves correctly...
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is locked due to inactivity