xml - 在 xml 文件中进行模板化
问题描述
我正在通过 helm 包中的 values.yaml 进行输入,并尝试在 xml 文件中使用该值。但它失败了。请指出我做错了什么。Values.yaml 包含:
ere:
AdmServerPort: "9090"
在文件中,我将其用作:
<Argument Name="Port" Value="{{ .Values.ere.AdmServerPort | default "9090" }}"/>
在动态编辑后,我正在使用 configmap 将其放入我的 pod 中。请帮忙。提前致谢!
编辑: 我没有粘贴错误,因为它包含整个 xml。我尝试了 helm upgrade,但由于渲染错误而失败。我还尝试更改我修改的行(仅是这些提到的行),因为它以前肯定可以工作。但这没有帮助。
Error: UPGRADE FAILED: render error in "eric-em-ere/templates/deployment-ere.yaml": template: eric-em-ere/templates/deployment-ere.yaml:25:28: executing "eric-em-ere/templates/deployment-ere.yaml" at <include (print $.Tem...>: error calling include: template: eric-em-ere/templates/configmap.yaml:14:22: executing "eric-em-ere/templates/configmap.yaml" at <tpl (.Files.Get "fil...>: error calling tpl: Error during tpl function execution for "<PoolServer>...
整个错误与 xml 模板一起出现并以:
: parse error in "eric-em-ere/templates/deployment-ere.yaml": template: eric-em-ere/templates/deployment-ere.yaml:36: bad character U+002D '-'
解决方案
推荐阅读
- django - 有一种方法可以使用它来管理表 Manytomany Filter_horizontal
- ajax - 无需重新加载页面的 Cakephp ajax 请求
- python - 我可以让决策树对假阴性更敏感吗?
- angular - 未触摸时将默认返回值设置为复选框的 false
- python - 没有运算符与给定的名称和参数类型匹配。您可能需要添加显式类型转换
- docker - 是否可以在不实际部署映像的情况下在 GCE 上配置容器优化的 OS VM?
- python - 让处理 2400 万条记录的 python 代码更快
- azure-api-management - APIM 在将错误请求返回给用户之前等待接收整个请求
- intellij-idea - IntelliJ 插件 - 通过代码修改运行配置属性
- github - git clone 中的周期性速度增加