-
Notifications
You must be signed in to change notification settings - Fork 988
Open
kubernetes/kubernetes
#135683Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.needs-sigIndicates an issue or PR lacks a `sig/foo` label and requires one.Indicates an issue or PR lacks a `sig/foo` label and requires one.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Description
What happened?
When using kubectl describe on Custom Resources with camelCase field names containing acronyms followed by a lowercase letter, the field names are incorrectly humanized with unwanted spaces. For example, a field named respectPDBs is displayed as "Respect PD Bs" instead of "Respect PDBs".
Spec:
Respect PD Bs: true
What did you expect to happen?
The field name respectPDBs should be displayed as Respect PDBs with the acronym kept together, not split into separate parts.
How can we reproduce it (as minimally and precisely as possible)?
test-patchplan-instance.yaml
apiVersion: example.com/v1
kind: PatchPlan
metadata:
name: test-patchplan
spec:
respectPDBs: truetest-pdb-crd.yaml
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: patchplans.example.com
spec:
group: example.com
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
respectPDBs:
type: boolean
description: Whether to respect Pod Disruption Budgets
additionalPrinterColumns:
- name: Respect PDBs
type: boolean
jsonPath: .spec.respectPDBs
scope: Namespaced
names:
plural: patchplans
singular: patchplan
kind: PatchPlankubectl apply -f test-pdb-crd.yaml
kubectl apply -f test-patchplan-instance.yaml
kubectl describe patchplan test-patchplan | grep RespectAnything else we need to know?
No response
Kubernetes version
$ kubectl version
# paste output hereCloud provider
OS version
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here
# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output hereInstall tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.needs-sigIndicates an issue or PR lacks a `sig/foo` label and requires one.Indicates an issue or PR lacks a `sig/foo` label and requires one.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.