nginx - deptno/deptno.github.io GitHub Wiki

nginx

Error from server (BadRequest): error when creating "config/nginx-static.yaml": ConfigMap in version "v1" cannot be handled as a ConfigMap: json: cannot unmarshal object into Go struct field ConfigMap.data of type string
Error from server (BadRequest): error when creating "config/nginx-static.yaml": ConfigMap in version "v1" cannot be handled as a ConfigMap: json: cannot unmarshal string into Go struct field ConfigMap.data of type map[string]string

μ•„λž˜μ™€ 같은 ν˜•νƒœμ—μ„œ μ—λŸ¬κ°€ λ°œμƒν–ˆλ‹€

kind: Config
apiVersion: v1
metadata:
  name: nameof
data:
  nfs:
    server: value
    path: value

μ•„λž˜μ™€ 같은 ν˜•μ‹μœΌλ‘œ μˆ˜μ •ν•œλ‹€

# ...
data:
  nfs: |
    server: value
    path: value

helm chart 에 μ •μ˜λœ νƒ€μž…μ— 쒅속적일텐데 μ°¨νŠΈμ—λŠ” μ•„λž˜μ™€ 같이 μ„ μ–Έλ˜μ–΄μžˆλ‹€

configMap:
  name: {{ printf "%s" (tpl .Values.staticSiteConfigmap $) -}}

link