jenkins - Kubernetes 自定义 jenkins 图表抛出与 override_config_map 相关的错误
问题描述
我想使用最新的 jenkins.1.3.6 版本 helm chart 启动 jenkins 服务器。但是,在应用图表时,我收到了error calling include: template: no template "override_config_map" associated with template "gotpl"
错误:在“my-chart/charts/jenkins/templates/jenkins-master-deployment.yaml”中呈现错误:模板:my-chart/charts/jenkins/templates/jenkins-master-deployment.yaml:42:28:正在执行“my-chart/charts/jenkins/templates/jenkins-master-deployment.yaml”在:错误调用包括:模板:my-chart/charts/jenkins/templates/config.yaml:335:3:执行“my-chart /charts/jenkins/templates/config.yaml”在:错误调用包括:模板:没有与模板“gotpl”关联的模板“override_config_map”
解决方案
正如fdlk在对 CustomConfigMap 选项的评论中提到的那样会产生 override_config_map missing #4040 的错误:
它帮助我
helm lint my-chart
计算出我需要多少个括号。我config.tpl
现在看起来像这样:
{{- define "override_config_map" }}
apiVersion: v1
kind: ConfigMap
[...]
plugins.txt: |-
{{- if .Values.Master.InstallPlugins }}
{{- range $index, $val := .Values.Master.InstallPlugins }}
{{ $val | indent 4 }}
{{- end }}
{{- end }}
{{- end }}
使用 0.16.4
推荐阅读
- angular - 从角度材料表中动态删除行
- reactjs - 在 Typescript 中创建 React HOC 时出错
- apache-flink - Apache Flink:IDE 执行中的作业恢复未按预期工作
- reactjs - 使用 Devextreme React Scheduler 动态改变调度(react)
- python - 如何在 Tkinter 中滚动浏览一组标签小部件?
- python - 如何在 Windows 版 Git Bash 中启用 Python 上次命令历史记录?
- autohotkey - 我需要一个热键,例如“c”来启用脚本
- javascript - Camera js Web App无法获取相机供稿
- powershell - 将日历添加到组合框
- git - 如何获取 tfs 中两个变更集或 git 中两个分支的多个文件的所有更改?