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

Docs: Kubernetes policy primer example is missing output box #2177

Closed
rleekin opened this issue Mar 9, 2020 · 2 comments · Fixed by #2189
Closed

Docs: Kubernetes policy primer example is missing output box #2177

rleekin opened this issue Mar 9, 2020 · 2 comments · Fixed by #2189
Assignees

Comments

@rleekin
Copy link
Contributor

rleekin commented Mar 9, 2020

in the documentation, under the Policy Primer via Examples section, in the Deny Rules section. The last sentence of that section ends without an image or answer.

"When the deny rule is evaluated with the input above, the answer is:"

I think this is an error and I would be happy to fix it if you tell me what should be there. Thanks

@patrick-east
Copy link
Contributor

Thanks @rleekin that is indeed an error.

It looks like it should be showing the output of the "live doc" snippets above, the GitHub markdown renderer shows it a little different (although still broken) https://github.com/open-policy-agent/opa/blob/master/docs/content/kubernetes-primer.md#deny-rules

image

In the source code it has https://github.com/open-policy-agent/opa/blame/master/docs/content/kubernetes-primer.md#L83-L88 (linking to blame since all the nicer views hide the markdown 😢 ) Where the live:container_images:query:hidden section isn't closed, so it breaks the output section. For reference on those blocks take a look at https://github.com/open-policy-agent/opa/tree/master/docs#live-code-blocks

So.. I think what we need to do is add the ``` to close the query section, which should get the output box to appear. Then for the query we probably want `data.kubernetes.admission.deny` since it is referencing the policy up above, which should then populate the output box correctly with the result.

@rleekin
Copy link
Contributor Author

rleekin commented Mar 9, 2020

okay, I'll work on fixing this, please assign me to this. Thanks Patrick!

@patrick-east patrick-east changed the title Documentation on site Docs: Kubernetes policy primer example is missing output box Mar 12, 2020
rleekin pushed a commit to rleekin/opa that referenced this issue Mar 16, 2020
This commit adds a backtick to the live code block to fix
formatting issues in the documentation. This addresses the
examples in the *kubernetes-primer.md* document. The current
document does not render the live code block.

Fixes open-policy-agent#2177

Signed-off-by: Rachel Leekin <[email protected]>
patrick-east pushed a commit that referenced this issue Mar 17, 2020
This commit adds a backtick to the live code block to fix
formatting issues in the documentation. This addresses the
examples in the *kubernetes-primer.md* document. The current
document does not render the live code block.

Fixes #2177

Signed-off-by: Rachel Leekin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants