mirror of https://github.com/status-im/consul.git
Add kubebuilder annotations to enums (#19454)
This commit is contained in:
parent
f115cdb1d5
commit
64db2d9c58
|
@ -24,6 +24,8 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// +kubebuilder:validation:Enum=FAILOVER_MODE_UNSPECIFIED;FAILOVER_MODE_SEQUENTIAL;FAILOVER_MODE_ORDER_BY_LOCALITY
|
||||
// +kubebuilder:validation:Type=string
|
||||
type FailoverMode int32
|
||||
|
||||
const (
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -25,6 +25,8 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// +kubebuilder:validation:Enum=HEALTH_ANY;HEALTH_PASSING;HEALTH_WARNING;HEALTH_CRITICAL;HEALTH_MAINTENANCE
|
||||
// +kubebuilder:validation:Type=string
|
||||
type Health int32
|
||||
|
||||
const (
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue