Skip to content

Improve the ValidationAdmissionPolicy docs #38504

Open
@samos123

Description

@samos123

This is a Feature Request

What would you like to be added

  • End-to-end example: Add example of adding a label environment=test to one of the namespace
  • Add explanation to the examples
  • Add a note about how to enable the admissionregistration.k8s.io/v1alpha1 API or link to another doc that talks about runtimeConfig
  • remove all the example.com parts since it was mostly confusing
  • Link to API docs for the various objects mentioned in the doc
  • Move all examples to separate files and ensure they are tested, this would prevent issues like ValidationAdmissionPolicy binding example is incorrect #38495 from occurring again, see comment from @tengqm below

comment from @tengqm:
Issues like this would be easy to detect if we make the manifest an example YAML.
For example:

  1. move the YAML snippet into a separate file content/en/examples/policy/validating-admission-ex.yaml and,
  2. reference it as {{< codenew file="policy/validating-admission-ex.yaml" >}} in the markdown page,
  3. (optionally) amend content/en/examples/examples_test.go so that it can be validated against current and future k8s releases.

Why is this needed
Current docs was hard to follow for a new user like myself

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.language/enIssues or PRs related to English languageneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.priority/backlogHigher priority than priority/awaiting-more-evidence.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions