简体   繁体   English

helm 获取子图表服务名称

[英]helm getting subchart service names

Whats the best way to get the helm subchart service names to reference into my ingress controller that will sit in the parent chart什么是让 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 }}

template: no template "$subchart.fullname" associated with template "gotpl"模板:没有与模板“gotpl”关联的模板“$subchart.fullname”

Whats the best way to get the helm subchart service names to reference into my ingress controller that will sit in the parent chart将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 }}

template: no template "$subchart.fullname" associated with template "gotpl"模板:没有与模板“ gotpl”相关联的模板“ $ subchart.fullname”

Whats the best way to get the helm subchart service names to reference into my ingress controller that will sit in the parent chart将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 }}

template: no template "$subchart.fullname" associated with template "gotpl"模板:没有与模板“ gotpl”相关联的模板“ $ subchart.fullname”

Whats the best way to get the helm subchart service names to reference into my ingress controller that will sit in the parent chart将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 }}

template: no template "$subchart.fullname" associated with template "gotpl"模板:没有与模板“ gotpl”相关联的模板“ $ subchart.fullname”

Whats the best way to get the helm subchart service names to reference into my ingress controller that will sit in the parent chart将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 }}

template: no template "$subchart.fullname" associated with template "gotpl"模板:没有与模板“ gotpl”相关联的模板“ $ subchart.fullname”

helm 3.7 version has solved the problem https://github.com/helm/helm/pull/9957 . helm 3.7 版本已经解决了这个问题https://github.com/helm/helm/pull/9957
You can use like this你可以这样使用

{{ template "bar.fullname" .Subcharts.bar }}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM