mittwald / mittwald/kube-httpcache

`cacheExtraArgs` suggests string but is initialized as map `cannot overwrite table with non table for SNIP.cacheExtraArgs (map[]))`

Open
#136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
313
Forks
82
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
The default values suggest to define a string for cacheExtraArgs - but due to the initialization as map Helm complains about a type mismatch:

cannot overwrite table with non table for {{SNIP}}.kube-httpcache.cacheExtraArgs (map[]))

ref: https://github.com/mittwald/kube-httpcache/blob/v0.7.0/chart/values.yaml#L50-L53

To Reproduce

  • add kube-httpcache as dependency of another helm chart
  • override the values / essentially comment in the sample values:
kube-httpcache:
  cacheExtraArgs: |
    - -v=8
    - -varnish-additional-parameters=vcc_allow_inline_c=on

https://github.com/mittwald/kube-httpcache/blob/v0.7.0/chart/values.yaml#L50-L53

Expected behavior

The chart should apply the extra args

Actual behavior

Applying the chart causes Helm to complain with a message like this:

coalesce.go:220: warning: cannot overwrite table with non table for {{SNIP}}.kube-httpcache.cacheExtraArgs (map[])

Environment:

  • Kubernetes version: 1.24.6
  • kube-httpcache version: v0.7.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with chart/values.yaml around lines 50–53 and compare the declared default for cacheExtraArgs with the documented override. Reproduce the issue by using kube-httpcache as a Helm dependency and applying the sample values; done means Helm accepts the override and the chart applies the extra arguments without the type-mismatch warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.