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

Create a Vale rule that highlights custom CR names and suggests an example name #825

Open
aireilly opened this issue Jul 2, 2024 · 2 comments
Assignees
Labels
OpenShiftAsciiDoc Issues with the OpenShiftAsciiDoc rule set only

Comments

@aireilly
Copy link
Member

aireilly commented Jul 2, 2024

Sometimes CR names include customer sensitive information. For example:

apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: "customer-sensitive-name"
  namespace: openshift-sriov-network-operator

Write a vale rule that highlights any CR name field that does not match the following best practice naming (pseudo code below), and suggest the best practice when it is not found:

example-$(to_kebab_case(value_of(kind)), or in the above example, example-sriov-network-node-policy

https://vale.sh/docs/topics/actions/

Would also need an update to https://github.com/openshift/openshift-docs/blob/main/contributing_to_docs/doc_guidelines.adoc#yaml-formatting-for-kubernetes-and-openshift-api-objects around naming conventions in CRs

@aireilly aireilly added the OpenShiftAsciiDoc Issues with the OpenShiftAsciiDoc rule set only label Jul 2, 2024
@aireilly aireilly self-assigned this Jul 2, 2024
@rohennes
Copy link
Collaborator

rohennes commented Jul 24, 2024

Thanks Aidan - could include resourceName too. And I guess any field we think could potentially contain customer sensitive data/names.

@rohennes
Copy link
Collaborator

rohennes commented Jul 24, 2024

Slightly related might be a rule for something like this "lab.eng.*redhat.com" which might indicate an internal only resource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenShiftAsciiDoc Issues with the OpenShiftAsciiDoc rule set only
Projects
None yet
Development

No branches or pull requests

2 participants