最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

k3s - Traefik Helm Chart Installation Fails: "can't index item of type bool" - Stack Overflow

programmeradmin4浏览0评论

I'm trying to install Traefik using Helm on my Kubernetes cluster, but the installation fails with the following error:

coalesce.go:286: warning: cannot overwrite table with non table for traefik.ports.traefik.expose (map[default:false])
Error: INSTALLATION FAILED: template: traefik/templates/service.yaml:27:12: executing "traefik/templates/service.yaml" at <index (default dict $config.expose) $name>: error calling index: can't index item of type bool

It seems like Helm is treating a boolean value as a dictionary or vice versa, but I'm not sure how to resolve this issue.

The .yaml file:

apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: traefik
  namespace: kube-system
spec:
  valuesContent: |-
    globalArguments:
      - "--global.checknewversion=false"
      - "--global.sendanonymoususage=false"
    additionalArguments:
      - "--log.level=DEBUG"
    dashboard:
      enabled: true
    ports:
      traefik:
        expose: 
          default: true
      pacs:
        port: 104
        expose: true
        exposedPort: 104
        protocol: TCP

What was tried.

How it was:

ports:
  traefik:
    expose: ture

What was tired this:

ports:
  traefik:
    expose: 
      default: true

and this:

ports:
  traefik:
    expose: 
      enabled: true

However, I still can not deploy the pod properly.

I'm trying to install Traefik using Helm on my Kubernetes cluster, but the installation fails with the following error:

coalesce.go:286: warning: cannot overwrite table with non table for traefik.ports.traefik.expose (map[default:false])
Error: INSTALLATION FAILED: template: traefik/templates/service.yaml:27:12: executing "traefik/templates/service.yaml" at <index (default dict $config.expose) $name>: error calling index: can't index item of type bool

It seems like Helm is treating a boolean value as a dictionary or vice versa, but I'm not sure how to resolve this issue.

The .yaml file:

apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: traefik
  namespace: kube-system
spec:
  valuesContent: |-
    globalArguments:
      - "--global.checknewversion=false"
      - "--global.sendanonymoususage=false"
    additionalArguments:
      - "--log.level=DEBUG"
    dashboard:
      enabled: true
    ports:
      traefik:
        expose: 
          default: true
      pacs:
        port: 104
        expose: true
        exposedPort: 104
        protocol: TCP

What was tried.

How it was:

ports:
  traefik:
    expose: ture

What was tired this:

ports:
  traefik:
    expose: 
      default: true

and this:

ports:
  traefik:
    expose: 
      enabled: true

However, I still can not deploy the pod properly.

Share Improve this question edited Mar 10 at 23:32 Hilory 2,1577 gold badges14 silver badges30 bronze badges asked Mar 10 at 17:23 mitkomitko 111 bronze badge 1
  • 1 You wrote "ture" ?? in the "how it was"... – Stephan Kristyn Commented Mar 31 at 12:08
Add a comment  | 

1 Answer 1

Reset to default 1

From Version 27+ we ought use:

ports:
  traefik:
    expose:
      default: true
    port: xx
    exposedPort: xx
    protocol: TCP
发布评论

评论列表(0)

  1. 暂无评论