fix(docs): update stale policy type API reference links#2048
Conversation
Signed-off-by: Suhani <suhani4630@gmail.com>
|
|
||
| ## Additional Fields | ||
|
|
||
| The `ImageValidatingPolicy` extends the [Kyverno ValidatingPolicy](/docs/policy-types/validating-policy) with the following additional fields for image verification features. A complete reference is provided in the [API specification](https://htmlpreview.github.io/?https://github.com/kyverno/kyverno/blob/release-1.14/docs/user/crd/index.html#policies.kyverno.io/v1alpha1.ImageValidatingPolicy). |
There was a problem hiding this comment.
We need the API specification, why did you remove it?
There was a problem hiding this comment.
I replaced the stale release-1.14 / v1alpha1 links with /docs/crds/ since the original references no longer matched the stable policies.kyverno.io/v1 examples.
I also tested release-1.18 HTMLPreview links, but the generated anchors were not resolving reliably during testing.
There was a problem hiding this comment.
How can we access the following link: https://htmlpreview.github.io/?https://github.com/kyverno/kyverno/blob/release-1.14/docs/user/crd/index.html#policies.kyverno.io/v1alpha1.ImageValidatingPolicy after your changes?
can you get me the link from the deploy artifacts?
There was a problem hiding this comment.
After this change, the API reference is reached via /docs/crds/, which links to the generated CRD reference through the "The complete Kyverno CRD reference can be viewed here" link.
There was a problem hiding this comment.
I'd make it more clear, I want to see the image validating policy crd such as in this link: https://htmlpreview.github.io/?https://github.com/kyverno/kyverno/blob/release-1.14/docs/user/crd/index.html#policies.kyverno.io/v1alpha1.ImageValidatingPolicy
After this change, the API reference is reached via /docs/crds/, which links to the generated CRD reference through the "The complete Kyverno CRD reference can be viewed here" link.
The complete Kyverno CRD reference is refering to this: https://htmlpreview.github.io/?https://github.com/kyverno/kyverno/blob/main/docs/user/crd/index.html
Which I can't find reference to ImageValidating Policy for example.
At least for me I use it, I'm not sure if there is a way to include them but referring to a link that does not include vpol, gpol, ivpol and mpol I think is not the correct way
@lucchmielowski is there a way to include them in that crd specification?
There was a problem hiding this comment.
Thanks for clarifying. I see your point now. My goal was to fix the stale release-1.14 / v1alpha1 references, but you're right that /docs/crds/ doesn't provide the policy-specific CRD definitions that the original links pointed to.
I'll revisit the approach and update the PR to preserve direct access to those API references while fixing the version mismatch.
Related issue
Fixes #2047
Proposed Changes
This PR updates stale API reference links in the policy type documentation.
The affected pages were linking to old hardcoded
release-1.14/policies.kyverno.io/v1alpha1API references while the examples and documentation use the stablepolicies.kyverno.io/v1API.Updated the following files:
src/content/docs/docs/policy-types/validating-policy.mdxsrc/content/docs/docs/policy-types/mutating-policy.mdxsrc/content/docs/docs/policy-types/image-validating-policy.mdxThe stale external links were replaced with the centralized internal CRD reference route:
Direct
release-1.18deep links were also tested, but the generated anchors did not reliably resolve to distinct policy-specific sections. To avoid replacing stale links with misleading or unstable deep links, this PR uses/docs/crds/as the stable API reference entry point.Testing
Verified stale references are removed:
grep -RniE "release-1\.14|policies\.kyverno\.io/v1alpha1|policies\.kyverno\.io%2fv1alpha1" src/content/docs/docs/policy-types/Result: no matches.
Verified updated references:
grep -Rni "/docs/crds/" src/content/docs/docs/policy-types/Build verification:
Build passed successfully.
Manual verification performed for:
/docs/policy-types/validating-policy//docs/policy-types/mutating-policy//docs/policy-types/image-validating-policy/Confirmed all API Reference links now resolve to
/docs/crds/.Checklist