From a3b1362968f46a7baf26e564198700a31400d232 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sun, 16 Oct 2022 22:41:13 +0300 Subject: [PATCH] fix(docker-compose): remove /mnt and /root (#4115) Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/stable/docker-compose/Chart.yaml | 2 +- charts/stable/docker-compose/questions.yaml | 29 ++++++++--------- charts/stable/docker-compose/values.yaml | 35 +++++++++------------ 3 files changed, 30 insertions(+), 36 deletions(-) diff --git a/charts/stable/docker-compose/Chart.yaml b/charts/stable/docker-compose/Chart.yaml index 5fed49b3907..4bcf866d347 100644 --- a/charts/stable/docker-compose/Chart.yaml +++ b/charts/stable/docker-compose/Chart.yaml @@ -21,7 +21,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/docker-compose - https://hub.docker.com/_/docker type: application -version: 2.0.52 +version: 2.1.0 annotations: truecharts.org/catagories: | - docker diff --git a/charts/stable/docker-compose/questions.yaml b/charts/stable/docker-compose/questions.yaml index d83f40f69eb..0565e9ff273 100644 --- a/charts/stable/docker-compose/questions.yaml +++ b/charts/stable/docker-compose/questions.yaml @@ -11,17 +11,18 @@ questions: # Include{controllerExpert} # Include{controllerExpertExtraArgs} - variable: env - group: "Container Configuration" - label: "Image Environment" + group: Container Configuration + label: Image Environment schema: additional_attrs: true type: dict attrs: - variable: COMPOSE_FILE - label: "COMPOSE_FILE" - description: "Path on the host of the composefile you want to load. Supported are paths inside /mnt, /root and /cluster" + label: Docker Compose File + description: Path on the host of the compose file you want to load. You MUST mount the storage yourself schema: type: string + default: "" # Include{containerConfig} # Include{serviceExpertRoot} default: true @@ -32,42 +33,42 @@ questions: # Include{security} # Include{securityContextAdvancedRoot} - variable: privileged - label: "Privileged mode" + label: Privileged mode schema: type: boolean default: true - variable: readOnlyRootFilesystem - label: "ReadOnly Root Filesystem" + label: ReadOnly Root Filesystem schema: type: boolean default: false - variable: allowPrivilegeEscalation - label: "Allow Privilege Escalation" + label: Allow Privilege Escalation schema: type: boolean default: true - variable: runAsNonRoot - label: "runAsNonRoot" + label: runAsNonRoot schema: type: boolean default: false # Include{securityContextAdvanced} # Include{podSecurityContextRoot} - variable: runAsUser - label: "runAsUser" - description: "The UserID of the user running the application" + label: runAsUser + description: The UserID of the user running the application schema: type: int default: 0 - variable: runAsGroup - label: "runAsGroup" - description: "The groupID this App of the user running the application" + label: runAsGroup + description: The groupID this App of the user running the application schema: type: int default: 0 - variable: fsGroup - label: "fsGroup" - description: "The group that should own ALL storage." + label: fsGroup + description: The group that should own ALL storage. schema: type: int default: 0 diff --git a/charts/stable/docker-compose/values.yaml b/charts/stable/docker-compose/values.yaml index 124f69f6bf9..fa7c1eb228c 100644 --- a/charts/stable/docker-compose/values.yaml +++ b/charts/stable/docker-compose/values.yaml @@ -46,26 +46,26 @@ service: type: HTTPS env: - DOCKER_TLS_CERTDIR: "/certs" + DOCKER_TLS_CERTDIR: /certs COMPOSE_FILE: "" lifecycle: postStart: exec: command: - - "/bin/bash" - - "-c" + - /bin/bash + - -c - | if [ "${COMPOSE_FILE}" ]; then - counter=0; - while ! docker info > /dev/null 2>&1 && [[ ${counter} -lt 10 ]]; do - echo "docker not running yet. Waiting..." >> /proc/1/fd/1; - sleep 5; - counter=$((counter+1)); - done - docker-compose -f "${COMPOSE_FILE}" up -d && echo "Loading COMPOSE_FILE at location ${COMPOSE_FILE}" >> /proc/1/fd/1; + counter=0; + while ! docker info > /dev/null 2>&1 && [[ ${counter} -lt 10 ]]; do + echo "docker not running yet. Waiting..." >> /proc/1/fd/1; + sleep 5; + counter=$((counter+1)); + done + docker-compose -f "${COMPOSE_FILE}" up -d && echo "Loading COMPOSE_FILE at location ${COMPOSE_FILE}" >> /proc/1/fd/1; else - echo "COMPOSE_FILE not set, not auto-loading compose-file" >> /proc/1/fd/1; + echo "COMPOSE_FILE not set, not auto-loading compose-file" >> /proc/1/fd/1; fi probes: liveness: @@ -81,24 +81,17 @@ probes: persistence: varrun: enabled: false - root: - enabled: true - type: hostPath - hostPath: /root - mountPath: /root - hostPathType: "" - readOnly: false docker-certs-ca: enabled: true - mountPath: "/config" + mountPath: /config volumeClaimTemplates: docker-certs-client: enabled: true - mountPath: "/certs/client" + mountPath: /certs/client docker: enabled: true - mountPath: "/var/lib/docker" + mountPath: /var/lib/docker portal: enabled: false