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

Update bindings.md with 'x_k8s_get()' example #1915

Merged
merged 4 commits into from
Sep 11, 2024
Merged

Update bindings.md with 'x_k8s_get()' example #1915

merged 4 commits into from
Sep 11, 2024

Conversation

jlucktay
Copy link
Contributor

@jlucktay jlucktay commented Sep 4, 2024

Explanation

Added a commented example on how to bind other objects with the x_k8s_get() function, then refer and assert against.

Related issue

Resolves #1897.

Proposed Changes

Documentation only, with an example test and contextual comments.

Checklist

  • I have read the contributing guidelines.
  • I have read the PR documentation guide and followed the process including adding proof manifests to this PR.
  • This is a bug fix and I have added unit tests that prove my fix is effective.

Further Comments

There is currently no documentation anywhere that I could find to describe how the x_k8s_get() function behaves, or what inputs it would take.

Sorry, something went wrong.

@eddycharly
Copy link
Member

Thanks @jlucktay !

I think we should create a dedicated page with jp functions examples.

@jlucktay
Copy link
Contributor Author

jlucktay commented Sep 4, 2024

Yes, of course, we can split it up and rearrange however you see fit.

I just wanted to capture some working samples for this functionality, because I think it's yet another example of how powerful Chainsaw can be. 💪

jlucktay and others added 2 commits September 11, 2024 13:07
Added a commented example on how to bind other objects with the 'x_k8s_get()' function, then refer and assert against.

Signed-off-by: James Lucktaylor <jlucktay@users.noreply.github.com>
Signed-off-by: James Lucktaylor <jlucktay+github@gmail.com>
@jlucktay
Copy link
Contributor Author

@eddycharly I moved the code sample to its own page, and pointed a couple of links there. Is that structure OK?

@eddycharly
Copy link
Member

@jlucktay you can't really do that in the functions reference docs, it is a generated page.

Can I push in your PR ?

@jlucktay
Copy link
Contributor Author

Can I push in your PR ?

Sure, please go ahead.
I don't really have any context on the tooling used for generating and maintaining these docs, and am glad to defer to someone who does.

@eddycharly
Copy link
Member

Ok, let's do that, thanks!

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Copy link
Member

@eddycharly eddycharly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jlucktay for initiating this change !

@eddycharly
Copy link
Member

/cherry-pick release-0.2

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.00%. Comparing base (e178df0) to head (97cb508).
Report is 28 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1915   +/-   ##
=======================================
  Coverage   70.00%   70.00%           
=======================================
  Files         134      134           
  Lines        5500     5500           
=======================================
  Hits         3850     3850           
  Misses       1335     1335           
  Partials      315      315           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eddycharly eddycharly merged commit 7f2229e into kyverno:main Sep 11, 2024
14 of 15 checks passed
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Sep 11, 2024
* Update bindings.md with 'x_k8s_get()' example

Added a commented example on how to bind other objects with the 'x_k8s_get()' function, then refer and assert against.

Signed-off-by: James Lucktaylor <jlucktay@users.noreply.github.com>

* docs: move x_k8s_get example to its own page

Signed-off-by: James Lucktaylor <jlucktay+github@gmail.com>

* restructure

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: James Lucktaylor <jlucktay@users.noreply.github.com>
Signed-off-by: James Lucktaylor <jlucktay+github@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
eddycharly added a commit that referenced this pull request Sep 11, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
* Update bindings.md with 'x_k8s_get()' example

Added a commented example on how to bind other objects with the 'x_k8s_get()' function, then refer and assert against.



* docs: move x_k8s_get example to its own page



* restructure



---------

Signed-off-by: James Lucktaylor <jlucktay@users.noreply.github.com>
Signed-off-by: James Lucktaylor <jlucktay+github@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: James Lucktaylor <jlucktay@users.noreply.github.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
@jlucktay jlucktay deleted the patch-1 branch September 11, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Question] Can an entire resource be a valid binding value?
2 participants