简体   繁体   English

Skaffold setValues 缺少 helm 值

[英]Skaffold setValues is getting missing helm values

Skaffold setValues is getting missing helm values. Skaffold setValues缺少 helm 值。

Instead of setValues , when I save the relevant values in the values.yml file and use valuesFiles , there is no problem and the rendering is successful.而不是setValues ,当我将相关值保存在values.yml文件中并使用valuesFiles时,没有问题并且渲染成功。

I guess setValues doesn't recognize nested arrays.我猜setValues不识别嵌套数组。 Please review the example below.请查看下面的示例。

Why the ingress.tls[0].hosts doesn't exist?为什么ingress.tls[0].hosts不存在?

skaffold.yaml脚手架.yaml

apiVersion: skaffold/v2beta29
kind: Config
build:
  local:
    push: false
  tagPolicy:
    sha256: {}
  artifacts:
  - image: example
    jib: {}
    sync:
      auto: false
deploy:
  helm:
    releases:
    - name: example
      chartPath: backend-app
      artifactOverrides:
        image: example
      imageStrategy:
        helm: {}
      setValues:
        ingress:
          enabled: true
          className: nginx
          hosts:
            - host: example.minikube
              paths:
                - path: /
                  pathType: ImplementationSpecific
          tls:
            - secretName: example-tls
              hosts:
                - example.minikube

skaffold run脚手架运行

skaffold run -v TRACE
# Output
[...]
[...]
[...]
DEBU[0106] Running command: [
helm --kube-context minikube install example backend-app --set-string image.repository=example,image.tag=6ad72230060e482fef963b295c0422e8d2f967183aeaca0229838daa7a1308c3 --set ingress.className=nginx --set --set ingress.enabled=true --set ingress.hosts[0].host=example.minikube --set ingress.hosts[0].paths[0].path=/ --set ingress.hosts[0].paths[0].pathType=ImplementationSpecific --set ingress.tls[0].secretName=example-tls]  subtask=0 task=Deploy
[...]
[...]
[...]

Ingress Manifest入口清单

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: example
spec:
  ingressClassName: nginx
  tls:
    - hosts:
      secretName: example-tls
  rules:
    - host: "example.minikube"
      http:
        paths:
          - path: /
            pathType: ImplementationSpecific
            backend:
              service:
                name: example
                port:
                  number: 80

This was fixed recently via the PR here: https://github.com/GoogleContainerTools/skaffold/pull/8152这是最近通过这里的 PR 修复的: https ://github.com/GoogleContainerTools/skaffold/pull/8152

This is currently in skaffold in main and will be available in the v2.1.0 Skaffold release (to be released 12/7/2022 ) and onward目前在main中的 skaffold 中,将在v2.1.0 Skaffold 版本(将于12/7/2022发布)及以后版本中提供

EDIT: v2.1.0 release is delayed w/ some of the maintainers on holiday.编辑: v2.1.0的发布因一些维护人员休假而延迟。 Currently planned to be available late Dec or early Jan目前计划于 12 月底或 1 月初上市

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

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