Skip to content

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

@aireilly

Description

@aireilly

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

Metadata

Metadata

Assignees

Labels

OpenShiftAsciiDocIssues with the OpenShiftAsciiDoc rule set only

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions