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

Pick #3688 apiserver: move loglevel under spec #3689

Open
wants to merge 2 commits into
base: release-v1.37
Choose a base branch
from

Conversation

ti-afra
Copy link
Contributor

@ti-afra ti-afra commented Jan 9, 2025

Description

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

// +kubebuilder:validation:Enum=Fatal;Error;Warn;Info;Debug;Trace
// +kubebuilder:default=Info
// +optional
ApiServerLogLevel *string `json:"apiServerLogLevel,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ApiServerLogLevel *string `json:"apiServerLogLevel,omitempty"`
APIServerLogLevel *string `json:"apiServerLogLevel,omitempty"`

Same-case acryonyms :D

// +optional
ApiServerLogLevel *string `json:"apiServerLogLevel,omitempty"`

// +kubebuilder:validation:Enum=Fatal;Error;Warn;Info;Debug;Trace
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to define a type LogLevel string that can carry these validations / defaults rather than replicate them in both places? Not super important but might be a bit cleaner.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same thought that we should have a LogLevel type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants