Reproduction steps
- Have a Windows computer to do the cluster management (kubectl and helm) steps from
- Follow kubernetes helm chart selfhosting docs on that windows machine
- Attempt to run
helm installetc
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:
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.
/bin/sh: trap: line 0: INT
: invalid signal specification
/bin/sh: syntax error: unexpected word (expecting "do")
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