We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我使用配置文件 在[template] dest = "/tmp/{{getv "/nginx/path/server_name" }}" 动态从etcd获取目标路径值,但无法成功,chatgpt说可以实现,这个能支持吗
The text was updated successfully, but these errors were encountered:
报错信息:ERROR open /tmp/{{getv "/nginx/path/.server_name" }}236432004: no such file or directory
Sorry, something went wrong.
不要听AI跟你胡说八道,他又不背KPI。confd的template文件和template resource文件是分离的,只有template文件当中可以使用go template语法,而dest是template resource的一部分。你可以尝试将文件输出到固定的位置,在template第一行额外附加一个目标路径例如# dest="/tmp/{{getv "/nginx/path/server_name" }}"或者其他适合处理的格式,然后写一个reload脚本,读取第一行里面的路径之后把文件复制过去,如果需要的话删掉第一行。
# dest="/tmp/{{getv "/nginx/path/server_name" }}"
在nginx配置文件中,使用循环来生成server{}代码块也是一样的啊,不用动态生成文件
No branches or pull requests
我使用配置文件 在[template] dest = "/tmp/{{getv "/nginx/path/server_name" }}" 动态从etcd获取目标路径值,但无法成功,chatgpt说可以实现,这个能支持吗
The text was updated successfully, but these errors were encountered: