首页 > 解决方案 > 解决错误不能为非函数 hasKey 提供参数

问题描述

我无法找到有关此错误的任何信息;我正在尝试使用 helm chart ( v3.0.3 ) 安装 GitLab 特定版本 (12.7.5) 并继续收到此错误。

错误:模板:gitlab/templates/NOTES.txt:39:3:在 <include "gitlab.deprecations" .> 处执行 "gitlab/templates/NOTES.txt":
错误调用包括:模板:gitlab/templates/_deprecations.tpl :31:39:
在<include“gitlab.deprecate.registry.replicas”处执行“gitlab.deprecations”。>:
错误调用包括:模板:gitlab/templates/_deprecations.tpl:135:7:
执行“gitlab.deprecate. <(hasKey .Values.registry "minReplicas") 或 (hasKey .Values.registry "maxReplicas")> 处的registry.replicas":不能为非函数hasKey .Values.registry "minReplicas"
helm.go 提供参数: 88:[调试]模板:gitlab/templates/NOTES.txt:39:3:在<执行“gitlab/templates/NOTES.txt”包括“gitlab.deprecations”。>:
错误调用包括:模板:gitlab/templates/_deprecations.tpl:31:39:
在<include“gitlab.deprecate.registry.replicas”处执行“gitlab.deprecations”。>:
错误调用包括:模板:gitlab/templates/_deprecations .tpl:135:7:在 <(hasKey .Values.registry "minReplicas") 或 (hasKey .Values.registry "maxReplicas")> 处执行“gitlab.deprecate.registry.replicas”:
不能给非函数 hasKey .Values.registry "minReplicas"

有人可以告诉我该如何处理吗?

Helm 版本
{Version:"v3.6.3", GitCommit:"d506314abfb5d21419df8c7e7e68012379db2354", GitTreeState:"clean", GoVersion:"go1.16.5"}

Kubernetes 版本
客户端版本:version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12: 59:11Z", GoVersion:"go1.16.5", 编译器:"gc", 平台:"linux/amd64"} 服务器版本: version.Info{Major:"1", Minor:"18", GitVersion:"v1 .18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:51:04Z", GoVersion:"go1.13.9", 编译器:"gc", 平台:"linux/amd64 "}

标签: kubernetesgitlabkubernetes-helm

解决方案


事实证明,该特定版本的 helm chart (v3.0.3) 存在错误


推荐阅读