Fix the name violation in apiextensions.k8s.io/v1,CustomResourceConversion, remove the failures file

This commit is contained in:
Hao Ruan 2023-01-19 22:08:29 +08:00
parent 2adb95c376
commit b64dcf862d
3 changed files with 6 additions and 13 deletions

View File

@ -1 +0,0 @@
./staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1

View File

@ -56,16 +56,10 @@ find_files() {
versioned_api_files=$(find_files) || true
failure_file="${KUBE_ROOT}/hack/.fieldname_docs_failures"
failing_groups=()
while IFS='' read -r line; do failing_groups+=("${line}"); done < <(cat "${failure_file}")
for file in ${versioned_api_files}; do
package="${file%"/types.go"}"
if ! kube::util::array_contains "${package}" "${failing_groups[@]}"; then
echo "Checking ${package}"
${fieldnamedocscheck} -s "${file}" || result=$?
fi
package="${file%"/types.go"}"
echo "Checking ${package}"
${fieldnamedocscheck} -s "${file}" || result=$?
done
exit ${result}

View File

@ -74,12 +74,12 @@ type CustomResourceDefinitionSpec struct {
// CustomResourceConversion describes how to convert different versions of a CR.
type CustomResourceConversion struct {
// strategy specifies how custom resources are converted between versions. Allowed values are:
// - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource.
// - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information
// - `"None"`: The converter only change the apiVersion and would not touch any other field in the custom resource.
// - `"Webhook"`: API Server will call to an external webhook to do the conversion. Additional information
// is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.
Strategy ConversionStrategyType `json:"strategy" protobuf:"bytes,1,name=strategy"`
// webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`.
// webhook describes how to call the conversion webhook. Required when `strategy` is set to `"Webhook"`.
// +optional
Webhook *WebhookConversion `json:"webhook,omitempty" protobuf:"bytes,2,opt,name=webhook"`
}