arttor / helmify

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

Extract args as values #110

Closed bigkevmcd closed 1 year ago

bigkevmcd commented 1 year ago

This change extracts the args from a PodTemplate as values allowing configuring the passed-in parameters.

bigkevmcd commented 1 year ago

@arttor I ran it against main, and there are updates there too.

arttor commented 1 year ago

Thank you for updating the examples, Template looks good but I've run it locally and got an incorrect indent after helm template test ./examples/app.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-app-myapp
...
spec:
  template:
    spec:
      containers:
      - args:
          - --health-probe-bind-address=:8081
          - --metrics-bind-address=127.0.0.1:8080
          - --leader-elect
        command:
        - /manager
...

There also might be a problem with the indent for Job and CronJob which also use pod processor but needs a different indent.

bigkevmcd commented 1 year ago

@arttor I think that should work, rearranged the test and fixed the indent.

arttor commented 1 year ago

@bigkevmcd please fix lint error ineffectual assignment to err (ineffassign). Github Action log doesn't show the line number but you can run golang-ci lint locally to check.