舵条件模板 [英] Helm Conditional Templates

查看:56
本文介绍了舵条件模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现我们可以创建子图表,并按如下所述有条件地包含它们: Helm有条件地安装子图表

I found that we can create subcharts and conditionally include them as described here: Helm conditionally install subchart

我只有一个模板,希望有条件地包含在图表中,但是我在文档中找不到任何内容.有这样的功能吗?

I have just one template that I want conditionally include in my chart but I could not find anything in the docs. Is there such feature?

推荐答案

我发现未加载空模板.我通过将yaml文件内容包装在if条件下来解决此问题.

I discovered that empty templates are not loaded. I solved it by wrapping my yaml file content in an if condition.

{{ if .Values.something }}
content of yaml file
{{ end }}

这篇关于舵条件模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆