Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: sealos add lost the custom env #4536

Closed
wisheen opened this issue Feb 23, 2024 · 2 comments · Fixed by #4540
Closed

BUG: sealos add lost the custom env #4536

wisheen opened this issue Feb 23, 2024 · 2 comments · Fixed by #4540
Labels
kind/bug Something isn't working

Comments

@wisheen
Copy link
Contributor

wisheen commented Feb 23, 2024

Sealos Version

5.0.0 beta4

How to reproduce the bug?

  1. sealos run --env myenv=xxx registry.cn-shanghai.aliyuncs.com/labring/kubernetes-docker:v1.28.7 registry.cn-shanghai.aliyuncs.com/labring/helm:v3.9.4 --masters xxx --node
    cat /root/.sealos/default/Clusterfile
status:
  conditions:
  - lastHeartbeatTime: "2024-02-23T10:39:47Z"
    ...
  mounts:
  - env:
      SEALOS_SYS_CRI_ENDPOINT: /var/run/cri-dockerd.sock
      SEALOS_SYS_IMAGE_ENDPOINT: /var/run/image-cri-shim.sock
      criData: /var/lib/docker
      criDockerdData: /var/lib/cri-dockerd
      defaultVIP: 10.103.97.2
      myenv: xxx
      registryConfig: /etc/registry
      registryData: /var/lib/registry
      registryDomain: sealos.hub
      registryPassword: passw0rd
      registryPort: "5000"
      registryUsername: admin
      sandboxImage: pause:3.9
    imageName: registry.cn-shanghai.aliyuncs.com/labring/kubernetes-docker:v1.28.7
    ...
  - cmd:
    - cp -a opt/helm /usr/bin/
    env:
      myenv: xxx
    imageName: registry.cn-shanghai.aliyuncs.com/labring/helm:v3.9.4
    labels:
      io.buildah.version: 1.25.0-dev
    mountPoint: /var/lib/containers/storage/overlay/76e9b39f868eac3751ff3f936f4006263da680f422cc0066c14ecf4558260b64/merged    
  1. sealos add --nodes xxxx
    Clusterfile has been rewrite, labring/kubernetes-docker:v1.28.7 lost the myenv variable, but labring/helm:v3.9.4 is not missing
    cat /root/.sealos/default/Clusterfile
  - env:
      SEALOS_SYS_CRI_ENDPOINT: /var/run/cri-dockerd.sock
      SEALOS_SYS_IMAGE_ENDPOINT: /var/run/image-cri-shim.sock
      criData: /var/lib/docker
      criDockerdData: /var/lib/cri-dockerd
      defaultVIP: 10.103.97.2
      registryConfig: /etc/registry
      registryData: /var/lib/registry
      registryDomain: sealos.hub
      registryPassword: passw0rd
      registryPort: "5000"
      registryUsername: admin
      sandboxImage: pause:3.9
    imageName: registry.cn-shanghai.aliyuncs.com/labring/kubernetes-docker:v1.28.7
    ...
  - cmd:
    - cp -a opt/helm /usr/bin/
    env:
      myenv: xxx
    imageName: registry.cn-shanghai.aliyuncs.com/labring/helm:v3.9.4

What is the expected behavior?

myenv environment variables are retained

What do you see instead?

No response

Operating environment

- Sealos version: 5.0.0 beta 
- Docker version: 1.25
- Kubernetes version: 1.28
- Operating system: ubuntu 22.04
- Runtime environment:
- Cluster size:
- Additional information:

Additional information

No response

@wisheen wisheen added the kind/bug Something isn't working label Feb 23, 2024
fengxsong added a commit to fengxsong/sealos that referenced this issue Feb 28, 2024
Signed-off-by: fengxusong <fengxsong@outlook.com>
@fengxsong
Copy link
Collaborator

Hi there, can you try to rerun those commands using binary from https://github.com/labring/sealos/actions/runs/8075039402/artifacts/1281114577

@wisheen
Copy link
Contributor Author

wisheen commented Feb 28, 2024

fixed

@wisheen wisheen closed this as completed Feb 28, 2024
cuisongliu pushed a commit that referenced this issue Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants