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

Add docs tags to acceptance test #256

Merged
merged 5 commits into from
Sep 27, 2024
Merged

Add docs tags to acceptance test #256

merged 5 commits into from
Sep 27, 2024

Conversation

JakeSCahill
Copy link
Contributor

Adds Asciidoc tagged regions to the user acceptance tests in code comments to allow docs to display the example manifests.

A GitHub Action defined in redpanda-data/docs#773 will pull all files in the acceptance/features directory into the docs repository whenever a change occurs or a run is triggered manually.

For an example of how these tags get used, see:

https://github.com/redpanda-data/docs/blob/6bc505bf00d0a6653748b408b4850cde0c29e57b/modules/manage/pages/kubernetes/security/authentication/k-user-controller.adoc?plain=1#L36

@CLAassistant
Copy link

CLAassistant commented Sep 26, 2024

CLA assistant check
All committers have signed the CLA.

Given there is no user "jason" in cluster "sasl"
And there are already the following ACLs in cluster "sasl":
| user | acls |
| jason | [{"type":"allow","resource":{"type":"cluster"},"operations":["Read"]}] |
When I apply Kubernetes manifest:
"""
# tag::manage-authn-only-manifest[]
# In this example manifest, a user called "jason" is created in a cluster called "sasl".
# The user's password is defined in a Secret called "jason-password".
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this sentence be more specific as behavior would be different based on the Secret created apriori the User custom resource.

  1. If Secret exist and key exist within that Secret that password would be used.
  2. If Secret exist but key does not exist then Secret is updated with autogenerated password.
  3. If Secret does not exist Secret with that key is created with autogenerated password.

@andrewstucki Maybe we should create more test cases to expose/show behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, nice! I didn't know about 2 and 3 👀

Copy link
Contributor

@RafalKorepta RafalKorepta left a comment

Choose a reason for hiding this comment

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

For me no blockers. We can address my comments later.

@RafalKorepta RafalKorepta merged commit ebf1295 into main Sep 27, 2024
5 checks passed
@RafalKorepta RafalKorepta deleted the docs-tags branch December 2, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants