Fluxer helm chart doesn't work when run on Windows due to EOF characters

(#4117) Bug Open: Needs triage packaging self-hosting

Reproduction steps

  1. Have a Windows computer to do the cluster management (kubectl and helm) steps from
  2. Follow kubernetes helm chart selfhosting docs on that windows machine
  3. Attempt to run helm install etc

Expected behaviour

Helm installs the chart successfully (including seaweedfs)

Actual behaviour

The installation errors out with a parser error, these are logs from the seaweedfs-init container:
/bin/sh: trap: line 0: INT
: invalid signal specification
/bin/sh: syntax error: unexpected word (expecting "do")
This was traced to a quirk of the golang parser that helm uses, which is used by the helm chart when placing the seaweedfs-init.sh into the helm chart via string substitution.

Build information

kubernetes helm charts yeehaw

Platform

Windows, Self-hosting

Evidence

Here is the fix, please update:
diff --git a/deploy/helm/fluxer/templates/seaweedfs.yaml b/deploy/helm/fluxer/templates/seaweedfs.yaml
index 20d54011b..ae82d86e8 100644
--- a/deploy/helm/fluxer/templates/seaweedfs.yaml
+++ b/deploy/helm/fluxer/templates/seaweedfs.yaml
@@ -4,7 +4,8 @@
 {{- $ctx := dict "root" $ "name" "seaweedfs" "component" "storage" "w" . }}
 {{- $healthz := dict "path" "/healthz" "port" "s3" }}
 {{- $secrets := include "fluxer.secretData" $ | fromJson }}
-{{- $init := $.Files.Get "files/seaweedfs-init.sh" }}
+{{- $init := $.Files.Get "files/seaweedfs-init.sh" | replace "\r" "" }}
+
 ---
 apiVersion: v1
 kind: Service

Comments

Sign in with Fluxer to comment and vote.

No comments yet.