【问题标题】:ValidationError(Ingress.spec.rules[0].http): missing required field "paths"ValidationError(Ingress.spec.rules[0].http):缺少必填字段“路径”
【发布时间】:2021-12-10 13:50:05
【问题描述】:

我的 values.yaml 文件中有以下代码:

ingress:
  kind: Ingress
  hostname: auth.localhost
  enabled: true
  metadata: fusionauth-ingress
  hosts:
    - host: auth.local
  spec:
    rules:
      http:
        paths: "/"
      path:
        pathType: Prefix
        backend:
          service:
            name: web
            port:
              number: 8080
            serviceName: fusionauth
            servicePort: 9011

当我跑步时:helm upgrade --install fusionauth-init --values fusionauth/values.yaml fusionauth

我收到以下错误:Error: UPGRADE FAILED: error validating "": error validating data: ValidationError(Ingress.spec.rules[0].http): missing required field "paths" in io.k8s.api.networking.v1.HTTPIngressRuleValue

我是 Helm 的新手,但我似乎无法找到我的逻辑中的错误所在。

提前感谢您的帮助。

【问题讨论】:

  • 您发布的代码似乎不完整,或者缩进很有趣,或者不是 kubernetes Ingress 资源,或者可能是这些资源的某种组合,但您会发现 the reference guide 对于了解官方代码是无价的应该是成型的。祝你好运
  • 这里没有缩进。但是,helm lint 可以正常工作,所以我知道 YAML 在我的源代码中是有效的。

标签: kubernetes yaml fusionauth helm3


【解决方案1】:

基于chart source,你的值都是无效的。 FusionAuth不能直接复制K8s ingress spec,需要遵循structure of the chart values.yaml,图表值含义为here。如果您之前按照 here 的说明创建 K8s Ingress 资源,则不需要使用 helm 再次部署 Ingress。

【讨论】:

  • 谢谢。这是我的一个误解。我按要求更改了它,一切正常。非常感谢您指出这一点。不幸的是,使用 helm 依赖项的文档不是很清楚..
猜你喜欢
  • 2021-03-13
  • 2020-04-16
  • 1970-01-01
  • 2014-08-02
  • 1970-01-01
  • 1970-01-01
  • 2013-05-30
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多