helm / chart-releaser-action

A GitHub Action to turn a GitHub project into a self-hosted Helm chart repo, using helm/chart-releaser CLI tool
https://github.com/helm/chart-releaser
Apache License 2.0
559 stars 206 forks source link

Values table output broken due to unescaped pipe #131

Closed BWibo closed 1 year ago

BWibo commented 1 year ago

Hey there,

I have following in a values.yml:

readinessProbe:
  # -- Enable/disable readiness probe
  # [Readiness probe](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes)
  # See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe) for details.
  # Use `readinessProbe.probe: {}` to configure
  # [readinessProbe probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
  enabled: true
  initialDelaySeconds: 10
  periodSeconds: 5
  timeoutSeconds: 1
  successThreshold: 1
  failureThreshold: 5
  terminationGracePeriodSeconds:
  probe:
    exec:
      command: [ bash, -c, 'wget -S "http://127.0.0.1:3000/api/health" |& grep "200 OK"' ] 

Apparently, the pipe in the command is interpreted as a column separator in the generated markdown:

| readinessProbe.probe.exec.command[2] | string | `"wget -S \"http://127.0.0.1:3000/api/health\" |& grep \"200 OK\""` |  |

Rendered result: grafik

Escaping the pipe manually seems to help:

| readinessProbe.probe.exec.command[2] | string | `"wget -S \"http://127.0.0.1:3000/api/health\" \|& grep \"200 OK\""` |  |

grafik

Version info:

$ docker run --rm --volume "$PWD/helm/charts:/helm-docs" -u $(id -u) jnorwood/helm-docs:latest --version
helm-docs version 1.11.0
BWibo commented 1 year ago

Sorry, wrong repo.