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: Kubefile CMD not support Standard environment variable format #2047

Closed
willzhang opened this issue Nov 5, 2022 · 2 comments
Closed
Labels
kind/bug Something isn't working
Milestone

Comments

@willzhang
Copy link
Contributor

Sealos Version

v4.1.4-rc1

How to reproduce the bug?

CMD env must be $(CONT_IMG_VER)

FROM scratch

ENV CONT_IMG_VER=${CONT_IMG_VER:-v1.0.0}

CMD ["echo $(CONT_IMG_VER)"]

1、it let Ordinary users do not know this special situation
2、can not support ${CONT_IMG_VER:-v1.0.0}

What is the expected behavior?

CMD env should support ${CONT_IMG_VER} or $CONT_IMG_VER

What do you see instead?

No response

Operating environment

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

Additional information

No response

@willzhang
Copy link
Contributor Author

willzhang commented Nov 5, 2022

Sealos treats variable parameters as commands

root@node1:~# sealos run -f registry.cn-shenzhen.aliyuncs.com/cnmirror/env:v1.0  --env HELM_SET="externalURL=https://core.harbor.domain,core.image.repository=goharbor/harbor-core"
2022-11-05T21:57:12 info start to install app in this cluster
are you sure to override these app? Yes [y/yes], No [n/no] : y
2022-11-05T21:57:56 info pulling images [registry.cn-shenzhen.aliyuncs.com/cnmirror/env:v1.0] for platform linux/amd64
96cee5efb728e8afa76ff80c53d302d4b214d5c615ed49202d5f8ff117105665
default-xpa2lcg9
2022-11-05T21:57:57 info guest cmd is echo $(HELM_SET)
bash: line 1: HELM_SET: command not found

2022-11-05T21:57:57 info succeeded install app in this cluster
2022-11-05T21:57:57 info no nodes that need to be scaled
2022-11-05T21:57:57 info 
      ___           ___           ___           ___       ___           ___
     /\  \         /\  \         /\  \         /\__\     /\  \         /\  \
    /::\  \       /::\  \       /::\  \       /:/  /    /::\  \       /::\  \
   /:/\ \  \     /:/\:\  \     /:/\:\  \     /:/  /    /:/\:\  \     /:/\ \  \
  _\:\~\ \  \   /::\~\:\  \   /::\~\:\  \   /:/  /    /:/  \:\  \   _\:\~\ \  \
 /\ \:\ \ \__\ /:/\:\ \:\__\ /:/\:\ \:\__\ /:/__/    /:/__/ \:\__\ /\ \:\ \ \__\
 \:\ \:\ \/__/ \:\~\:\ \/__/ \/__\:\/:/  / \:\  \    \:\  \ /:/  / \:\ \:\ \/__/
  \:\ \:\__\    \:\ \:\__\        \::/  /   \:\  \    \:\  /:/  /   \:\ \:\__\
   \:\/:/  /     \:\ \/__/        /:/  /     \:\  \    \:\/:/  /     \:\/:/  /
    \::/  /       \:\__\         /:/  /       \:\__\    \::/  /       \::/  /
     \/__/         \/__/         \/__/         \/__/     \/__/         \/__/

                  Website :https://www.sealos.io/
                  Address :github.com/labring/sealos
                BuildVersion: 4.1.4-rc1-990b821d

root@node1:~# 

@cuisongliu cuisongliu added this to the release-v4.2.0 milestone Jan 6, 2023
@willzhang
Copy link
Contributor Author

willzhang commented Feb 5, 2023

maybe this fixed? i can use ${env} in sealos v4.1.5-alpha2

https://github.com/labring-actions/cluster-image/blob/main/applications/kube-vip/latest/Kubefile

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

No branches or pull requests

3 participants