Hi all, I'm using Rancher v2.9 and something unus...
# general
b
Hi all, I'm using Rancher v2.9 and something unusual is happening. I have this in my values.yaml. The only thing you need to see is the pipe at the beginning of the script.
Copy code
initContainers:
  - args:
    - |
      set -ex
      EMPTY_DIR_MOUNT="/emptydir"
      PROVIDERS_SUBDIR="app-providers-dir"

      FINAL_DEST_DIR="$EMPTY_DIR_MOUNT/$PROVIDERS_SUBDIR" 
      mkdir -p "$FINAL_DEST_DIR"

      THEME_JAR_NAME="keycloak-theme.jar" 
      DOWNLOAD_URL="<https://github.com/my-repo/keycloak-theme/releases/download/v0.0.1/keycloak-theme-for-kc-all-other-versions.jar>" 

      FORCE_DOWNLOAD="${FORCE_THEME_DOWNLOAD:-false}"

      THEME_JAR_PATH="$FINAL_DEST_DIR/$THEME_JAR_NAME"

      if [[ "$FORCE_DOWNLOAD" == "true" || ! -e "$THEME_JAR_PATH" ]]; then
        echo "Downloading theme..."
        curl -L -f -S -o "$THEME_JAR_PATH" "$DOWNLOAD_URL"
        echo "Download complete."
      else
        echo "Theme already downloaded or force download is disabled. Skipping download."
      fi

      echo "Setting ownership and permissions for theme file and directory..."
      chown -R 1001:1001 "$EMPTY_DIR_MOUNT"

      echo "Verifying contents and permissions in emptyDir before exit:"
      ls -la "$EMPTY_DIR_MOUNT"/

      echo "Verifying contents and permissions in providers subdirectory:"
      ls -la "$FINAL_DEST_DIR"/

      echo "Init container complete."
When I save the file/ start the upgrade, Rancher changes it to this:
Copy code
initContainers:
  - args:
      - > # now an arrow instead of the pipe.
And some of the lines are incorrectly formated. If I happen to update again with this change, the script doesn't work properly. Why is Rancher changing the pipe to an arrow and reformatting the script code? Scott
b
@witty-jelly-95845 - Thanks, but that doesn't answer my question. I know the difference between a pipe and an arrow in yaml. Rancher is changing my pipe to an arrow and thus screwing up my script. Scott