doe*_*331 9 yaml kubernetes kubernetes-helm
什么是将helm子图服务名称引用到我的入口控制器中的最佳方法,该控制器将位于父图表中
values.yaml
---
ingress:
paths:
- serviceName: app-1
path: /app-1/*
port: 8080
- serviceName: app-2
path: /app-2/*
port: 8080
ingress.yaml
---
{{- range .Values.ingress.paths }}
- path: {{ .path }}
backend:
{{- $subchart := .serviceName -}}
serviceName: {{- include "$subchart.fullname" .}}
servicePort: {{ .port }}
{{- end }}
Run Code Online (Sandbox Code Playgroud)
模板:没有与模板"gotpl"相关联的模板"$ subchart.fullname"
小智 9
helm 3.7版本已经解决了问题
https://github.com/helm/helm/pull/9957。
你可以这样使用
{{ template "bar.fullname" .Subcharts.bar }}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1557 次 |
| 最近记录: |