sl1pm4t / k2tf

Kubernetes YAML to Terraform HCL converter
Mozilla Public License 2.0
1.18k stars 108 forks source link

Empty data fields are stripped from result #29

Open kim0 opened 5 years ago

kim0 commented 5 years ago

When converting this

apiVersion: v1
kind: Secret
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard-csrf
  namespace: kubernetes-dashboard
type: Opaque
data:
  csrf: ""

The result does not contain the data.csrf field, while it should exist and be an empty value.

sl1pm4t commented 5 years ago

Hi @kim0 - thanks for opening the issue. With the way k2tf currently works, this is harder to fix than it may seem without introducing undesirable side-effects. It will likely be a while before I can implement a fix.

daxzhuo commented 4 years ago

I also encountered this problem, where replicas cannot set to zero.