Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add toYaml and fromYaml to functions map #176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jasondamour
Copy link

@jasondamour jasondamour commented Mar 29, 2023

Adds toYaml and fromYaml functions from helm src

@jasondamour
Copy link
Author

Hiya @norwoodj , can you approve my CI when you get time? Thanks

@johanneskastl
Copy link

I would love to see those functions, as they were used a lot by the k8s-at-home guys in their charts (which are deprecated, so I forked some and noticed the missing functions...)

@gabe565
Copy link

gabe565 commented Apr 17, 2023

This would be amazing. There's also a PR to add this in Masterminds/sprig#360

@Nepo26 Nepo26 mentioned this pull request Jul 3, 2023
12 tasks
@Nepo26 Nepo26 added this to the General Cleanup milestone Jul 25, 2023
@jasondamour
Copy link
Author

@Nepo26 Need anything from me to move this?

@Nepo26
Copy link
Collaborator

Nepo26 commented Oct 11, 2023

Honestly, only chart examples in the example-charts folder and test cases for automated testing. Any question you may ping me.

@norwoodj
Copy link
Owner

norwoodj commented Nov 2, 2023

@jasondamour Agreeing with @Nepo26, if you add an example chart that uses these, and a test case, we'll merge.

@norwoodj norwoodj added the enhancement New feature or request label Nov 2, 2023
@norwoodj norwoodj self-assigned this Nov 2, 2023
@ebuildy
Copy link
Contributor

ebuildy commented Mar 28, 2024

hello, this look fantastic, may I help?

@ebuildy
Copy link
Contributor

ebuildy commented Mar 28, 2024

I love you :-)

I can add an example and some tests, here my readme_template, to display storage class:

{{ $values := (.Files.Get "values.yaml") | fromYaml }}

## Snapshot classes

| name     | resource group | incremental |
|----------|----------------|-------------|
{{- range $name, $spec := $values.volumeSnapshotClass }}
{{- range $parameterIncr := list "true" "false" }}
| {{ $name }}{{- if eq $parameterIncr "true" -}}-incr{{- end }} | {{ $parameterIncr }} | {{ $spec.parameters.resourceGroup | default "" }} |
{{- end }}
{{- end }}

This work like a charm!

@ebuildy
Copy link
Contributor

ebuildy commented May 11, 2024

hello @norwoodj , I have added basic example on PR #230

@norwoodj
Copy link
Owner

I'm confused, you've added examples, but not the code from this PR. Did you generate the README in the example you included using the version of helm-docs from this PR?

@ebuildy
Copy link
Contributor

ebuildy commented May 21, 2024

I'm confused, you've added examples, but not the code from this PR. Did you generate the README in the example you included using the version of helm-docs from this PR?

yes exactly! I dont have write access to this PR fork, to avoid a PR of PR ^^ I prefer create the PR here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants