arttor / helmify

Creates Helm chart from Kubernetes yaml
MIT License
1.48k stars 136 forks source link

env var & fieldRef bug #74

Closed vbehar closed 1 year ago

vbehar commented 1 year ago

Hi,

https://github.com/arttor/helmify/pull/72 released in https://github.com/arttor/helmify/releases/tag/v0.3.24 introduced a bug in the env vars using a fieldRef, such as

        - name: OPERATOR_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace

which gets converted to

        - name: OPERATOR_NAMESPACE
          value: {{ .Values.controllerManager.manager.operatorNamespace }}
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace

because we don't handle fieldRef and resourceFieldRef - see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#envvarsource-v1-core

I'll open a PR tomorrow to fix it

arttor commented 1 year ago

@vbehar thank you for your contribution! changes are available in v0.3.25 release.

vbehar commented 1 year ago

great, thanks for the quick review and merge!