Skip to content

Commit

Permalink
Add kubebuilder validation rules for operatorconfigs.csi.ceph.com
Browse files Browse the repository at this point in the history
Signed-off-by: nb-ohad <[email protected]>
  • Loading branch information
nb-ohad committed Jul 29, 2024
1 parent 9727975 commit d56a53e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v1alpha1/operatorconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ import (
// OperatorConfigSpec defines the desired state of OperatorConfig
type OperatorConfigSpec struct {
// Operator's log level
//+kubebuilder:validation:Optional
//+kubebuilder:validation:Minimum=0
//+kubebuilder:validation:Maximum=2
LogLevel int `json:"logLevel,omitempty"`

// Allow overwrite of hardcoded defaults for any driver managed by this operator
//+kubebuilder:validation:Optional
DriverSpecDefaults *DriverSpec `json:"driverSpecDefaults,omitempty"`
}

Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/csi.ceph.io_operatorconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6912,6 +6912,8 @@ spec:
type: object
logLevel:
description: Operator's log level
maximum: 2
minimum: 0
type: integer
type: object
status:
Expand Down

0 comments on commit d56a53e

Please sign in to comment.