Skip to content

Commit

Permalink
Add support for CATTLE_AGENT_VAR_DIR in suc plan
Browse files Browse the repository at this point in the history
  • Loading branch information
jakefhyde committed Jul 3, 2024
1 parent b2ef254 commit be9a514
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 be9a514

Please sign in to comment.