Skip to content

feat: add toYaml and fromYaml to functions map#176

Merged
norwoodj merged 1 commit intonorwoodj:masterfrom
jasondamour:master
Jul 6, 2024
Merged

feat: add toYaml and fromYaml to functions map#176
norwoodj merged 1 commit intonorwoodj:masterfrom
jasondamour:master

Conversation

@jasondamour
Copy link
Copy Markdown
Contributor

@jasondamour jasondamour commented Mar 29, 2023

Adds toYaml and fromYaml functions from helm src

@jasondamour
Copy link
Copy Markdown
Contributor Author

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

@johanneskastl
Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
Contributor Author

@Nepo26 Need anything from me to move this?

@Nepo26
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

ebuildy commented Mar 28, 2024

hello, this look fantastic, may I help?

@ebuildy
Copy link
Copy Markdown
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
Copy Markdown
Contributor

ebuildy commented May 11, 2024

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

@norwoodj
Copy link
Copy Markdown
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
Copy Markdown
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.

@norwoodj norwoodj merged commit 65110a3 into norwoodj:master Jul 6, 2024
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.

6 participants