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

Please use consistent casing in api fields #1146

Open
wmcnamee-coreweave opened this issue Nov 5, 2024 · 1 comment
Open

Please use consistent casing in api fields #1146

wmcnamee-coreweave opened this issue Nov 5, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@wmcnamee-coreweave
Copy link

the K8s convention is to use camalCase and some of the fields in this API do that, right along others that use snake_case. This is a terrible user experience.

@f41gh7
Copy link
Collaborator

f41gh7 commented Nov 6, 2024

Hello,

I agree, it could be confusing. Proposed standard by kubernetes operator's guide - use camelCase, since operator-sdk uses JSON formatted tags.

But all VictoriaMetrics and prometheus configurations use yaml with snake_case. It makes impossible to copy-paste non-operator and operator based configs. It'll require an additional effort for that. For instance, scrape_interval from vmagent configuration docs could require to be converted into scrapeInterval.
My main pain point was AlertmanagerConfig. It's too verbose and it could be a nightmare to migrate from non-operator configuration to operator managed AlertmanagerConfig.

I think the good solution to go:

  • use snake_case for configuration options names exist at VictoriaMetrics yaml configurations. It should be straight forward. On other hand it makes CRDs incompatible with prometheus-operator format.
  • use camelCase for operator deployment params, like replicaCount or nodeSelector.

@f41gh7 f41gh7 added enhancement New feature or request question Further information is requested labels Nov 6, 2024
@f41gh7 f41gh7 self-assigned this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants