Skip to content

Commit

Permalink
Add kubebuilder annotations to enums (#19454)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashwin Venkatesh authored Nov 7, 2023
1 parent f115cdb commit 64db2d9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proto-public/pbcatalog/v2beta1/failover_policy.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions proto-public/pbcatalog/v2beta1/failover_policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ message FailoverDestination {
string datacenter = 3;
}

// +kubebuilder:validation:Enum=FAILOVER_MODE_UNSPECIFIED;FAILOVER_MODE_SEQUENTIAL;FAILOVER_MODE_ORDER_BY_LOCALITY
// +kubebuilder:validation:Type=string
enum FailoverMode {
FAILOVER_MODE_UNSPECIFIED = 0;
FAILOVER_MODE_SEQUENTIAL = 1;
Expand Down
2 changes: 2 additions & 0 deletions proto-public/pbcatalog/v2beta1/health.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions proto-public/pbcatalog/v2beta1/health.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ message HealthStatus {
string output = 4;
}

// +kubebuilder:validation:Enum=HEALTH_ANY;HEALTH_PASSING;HEALTH_WARNING;HEALTH_CRITICAL;HEALTH_MAINTENANCE
// +kubebuilder:validation:Type=string
enum Health {
// buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
HEALTH_ANY = 0;
Expand Down

0 comments on commit 64db2d9

Please sign in to comment.