diff --git a/charts/stable/freeradius/Chart.yaml b/charts/stable/freeradius/Chart.yaml index cd9e790951a..012fec451b7 100644 --- a/charts/stable/freeradius/Chart.yaml +++ b/charts/stable/freeradius/Chart.yaml @@ -24,4 +24,4 @@ sources: - https://hub.docker.com/r/freeradius/freeradius-server/ - https://freeradius.org/ type: application -version: 1.7.12 +version: 1.7.13 diff --git a/charts/stable/freeradius/SCALE/questions.yaml b/charts/stable/freeradius/SCALE/questions.yaml index 3a00950ab56..1c022f7be06 100644 --- a/charts/stable/freeradius/SCALE/questions.yaml +++ b/charts/stable/freeradius/SCALE/questions.yaml @@ -558,6 +558,10 @@ questions: enum: - value: "pvc" description: "pvc" + - value: "emptyDir" + description: "emptyDir" + - value: "hostPath" + description: "hostPath" - variable: storageClass label: "(Advanced) storageClass" description: " Warning: Anything other than SCALE-ZFS will break rollback!" @@ -611,7 +615,7 @@ questions: description: "Path inside the container the storage is mounted" schema: type: string - default: "/config" + default: "/etc/raddb" hidden: true - variable: medium label: "EmptyDir Medium" diff --git a/charts/stable/freeradius/values.yaml b/charts/stable/freeradius/values.yaml index 8159592eed5..02a0abd5106 100644 --- a/charts/stable/freeradius/values.yaml +++ b/charts/stable/freeradius/values.yaml @@ -41,7 +41,7 @@ env: {} persistence: config: enabled: true - mountPath: "/config" + mountPath: "/etc/raddb" type: pvc accessMode: ReadWriteOnce size: "100Gi" diff --git a/containers/apps/freeradius/Dockerfile b/containers/apps/freeradius/Dockerfile index a137448c504..cd136c0827f 100644 --- a/containers/apps/freeradius/Dockerfile +++ b/containers/apps/freeradius/Dockerfile @@ -4,14 +4,13 @@ ARG VERSION FROM freeradius/freeradius-server:${VERSION} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -VOLUME /config # hadolint ignore=DL3008,DL3015,SC2086,SC2155 RUN \ rm /docker-entrypoint.sh && \ rm -Rf /etc/raddb - +VOLUME /etc/raddb COPY ./containers/apps/freeradius/entrypoint.sh /docker-entrypoint.sh LABEL "maintainer"="TrueCharts " diff --git a/containers/apps/freeradius/entrypoint.sh b/containers/apps/freeradius/entrypoint.sh index 990a191ed70..ce2fb0d1101 100755 --- a/containers/apps/freeradius/entrypoint.sh +++ b/containers/apps/freeradius/entrypoint.sh @@ -1,32 +1,32 @@ #!/bin/sh set -e -if [ -f "/config/clients.conf" ]; then +if [ -f "/etc/raddb/clients.conf" ]; then echo "Radius config already exists, skipping config copy..." else echo "Radius config does not exist, copying..." - cp -Rf /etc/freeradius/* /config/ + cp -Rf /etc/freeradius/* /etc/raddb/ fi -chown -R freerad:freerad /config +chown -R freerad:freerad /etc/raddb/ # this if will check if the first argument is a flag # but only works if all arguments require a hyphenated flag # -v; -SL; -f arg; etc will work, but not arg1 arg2 if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - set -- freeradius -d /config "$@" + set -- freeradius "$@" fi # check for the expected command if [ "$1" = 'freeradius' ]; then shift - exec freeradius -f -d /config "$@" + exec freeradius -f "$@" fi # many people are likely to call "radiusd" as well, so allow that if [ "$1" = 'radiusd' ]; then shift - exec freeradius -f -d /config "$@" + exec freeradius -f "$@" fi # else default to run whatever the user wanted like "bash" or "sh"