sealos icon indicating copy to clipboard operation
sealos copied to clipboard

BUG: The `sealos run` command parameter --env cannot read variables containing commas.

Open bxy4543 opened this issue 1 year ago • 7 comments

Sealos Version

4.3, 5.0, main

How to reproduce the bug?

sealos run docker.io/labring/victoria-metrics-k8s-stack:v1.96.0 -e HELM_OPTS="--set grafana.enabled=false,vmsingle.enabled=false,vmcluster.enabled=true" 2024-04-07T08:28:08 info start to install app in this cluster 2024-04-07T08:28:08 info Executing SyncStatusAndCheck Pipeline in InstallProcessor 2024-04-07T08:28:08 info Executing ConfirmOverrideApps Pipeline in InstallProcessor 2024-04-07T08:28:08 info are you sure to override these following apps? docker.io/labring/victoria-metrics-k8s-stack:v1.96.0 Yes [y/yes], No [n/no]: y ✔ Yes [y/yes], No [n/no]: y█ 2024-04-07T08:28:10 info Executing pipeline MountRootfs in InstallProcessor. 2024-04-07T08:28:10 info Executing pipeline MirrorRegistry in InstallProcessor. 2024-04-07T08:28:10 info trying default http mode to sync images to hosts [192.168.0.55:22] 2024-04-07T08:28:12 info Executing UpgradeIfNeed Pipeline in InstallProcessor bash: line 1: export: vmcluster.enabled=true': not a valid identifier bash: line 1: export: vmsingle.enabled=false': not a valid identifier

What is the expected behavior?

https://github.com/labring-actions/cluster-image/tree/main/applications/victoria-metrics-k8s-stack#configuration

-e HELM_OPTS="--set grafana.enabled=false,vmsingle.enabled=false,vmcluster.enabled=true" can be executed successfully.

What do you see instead?

  - cmd:
    - bash entrypoint.sh
    env:
      HELM_OPTS: --set grafana.enabled=false
      vmcluster.enabled: "true"
      vmsingle.enabled: "false"
    imageName: docker.io/labring/victoria-metrics-k8s-stack:v1.96.0

env parsing error, should be: env: HELM_OPTS: --set grafana.enabled=false,vmcluster.enabled: "true",vmsingle.enabled: "false"

Operating environment

- Sealos version:
- Docker version:
- Kubernetes version:
- Operating system:
- Runtime environment:
- Cluster size:
- Additional information:

Additional information

No response

bxy4543 avatar Apr 07 '24 08:04 bxy4543

The execution of env can be read correctly:

sealos run -e HELM_OPTS="--set grafana.enabled=false --set vmsingle.enabled=false --set vmcluster.enabled=true" docker.io/labring/victoria-metrics-k8s-stack:v1.96.0

bxy4543 avatar Apr 11 '24 03:04 bxy4543

I have also encountered this issue, which can result in long commands.

weironz avatar Apr 21 '24 07:04 weironz

This issue has been automatically closed because we haven't heard back for more than 60 days, please reopen this issue if necessary.

stale[bot] avatar Jun 20 '24 07:06 stale[bot]

This issue has been automatically closed because we haven't heard back for more than 60 days, please reopen this issue if necessary.

stale[bot] avatar Aug 20 '24 06:08 stale[bot]