-
-
Notifications
You must be signed in to change notification settings - Fork 754
Open
Description
在解析转换containerd服务的配置文件时,镜像仓库地址会包含“:”等特殊符号,导致解析失败
export HOSTS_REGI="http://sealos.hub:5000"
yq -i -p=toml -o=toml '.server = strenv(HOSTS_REGI)' /tmp/hosts-1.toml
yq -i -p=toml -o=toml 'with(.host[strenv(HOSTS_REGI)]; .capabilities = ["pull", "resolve", "push"] | .skip_verify = true)' /tmp/hosts-1.toml生成后的toml文件host中的http://sealos.hub:5000并未带引号
server = "http://sealos.hub:5000"
host = { http://sealos.hub:5000 = { capabilities = ["pull", "resolve", "push"], skip_verify = true } }再次解析报错
yq -i -p=toml -o=toml '.server = "xxx"' /tmp/hosts-1.toml
Error: bad file '/tmp/hosts.toml': expected character =Reactions are currently unavailable