Skip to content

Commit

Permalink
Merge pull request #176 from jakefhyde/data-dir-rfc
Browse files Browse the repository at this point in the history
Add support for CATTLE_AGENT_VAR_DIR in suc plan
  • Loading branch information
jakefhyde authored Jul 3, 2024
2 parents b2ef254 + be9a514 commit bf4eb09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package/Dockerfile.suc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ RUN /usr/bin/kubectl version --client
ARG ALPINE=alpine:3.18
FROM ${ALPINE}

ENV CATTLE_AGENT_VAR_DIR="/var/lib/rancher/agent"

RUN mkdir /opt/rancher-system-agent-suc
COPY install.sh /opt/rancher-system-agent-suc/install.sh
COPY system-agent-uninstall.sh /opt/rancher-system-agent-suc/system-agent-uninstall.sh
Expand Down
3 changes: 2 additions & 1 deletion package/suc/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

set -x -e

TMPDIRBASE=/var/lib/rancher/agent/tmp
CATTLE_AGENT_VAR_DIR=${CATTLE_AGENT_VAR_DIR:-/var/lib/rancher/agent}
TMPDIRBASE=${CATTLE_AGENT_VAR_DIR}/tmp

mkdir -p "/host${TMPDIRBASE}"

Expand Down

0 comments on commit bf4eb09

Please sign in to comment.