java Helm图表无法将数组解组到Go结构字段Volume.spec.template.spec.volumes.configMap中

qacovj5a  于 2023-02-14  发布在  Java
关注(0)|答案(1)|浏览(119)
Reason: Failed to Install Helm Chart [ fk-m3-matching-engine-cache-service:1.4.6 ] =\u003e cannot patch \"matching-engine-cache-service\" with kind Rollout: admission webhook \"webhook-svc.webhook.svc\" denied the request: unmarshal raw request object to rollout failed: json: cannot unmarshal array into Go struct field Volume.spec.template.spec.volumes.configMap of type v1.ConfigMapVolumeSource\n","severity":0}

cfg-config.yml配置文件--〉

apiVersion: v1
kind: ConfigMap
metadata:  
name: cs-config  
namespace: {{ .Values.metadata.namespace }}
data:   
 cfg-api: |+
    host=10.83.47.156

我不知道为什么这个文件会抛出错误。就当我是kube中的noob吧,数据host=10.83.47.156应该打印在cfg-api文件中。

lrpiutwd

lrpiutwd1#

不确定,但数据:cfg-api没有正确的缩进

apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ .Release.Name }}-configmap
data:
  cfg-api: |-
    host=10.83.47.156

代替主机正确设置 Helm 模板

相关问题