Skip to content

Commit

Permalink
fix(ci): format files
Browse files Browse the repository at this point in the history
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Jul 3, 2024
1 parent 0610174 commit 7223851
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 91 deletions.
18 changes: 9 additions & 9 deletions api/mesh/v1alpha1/dataplane.proto
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ message Dataplane {
// next to, e.g. `kuma.io/service=web`, `version=1.0`. You can then
// reference these tags in policies like MeshTrafficPermission.
// `kuma.io/service` tag is mandatory.
map<string, string> tags = 2
[ (validate.rules).map.min_pairs = 1 ];
map<string, string> tags = 2 [ (validate.rules).map.min_pairs = 1 ];

// Health describes the status of an inbound
message Health {
Expand Down Expand Up @@ -194,7 +193,6 @@ message Dataplane {
}
}


// Gateway describes a service that ingress should not be proxied.
message Gateway {
enum GatewayType {
Expand All @@ -210,8 +208,7 @@ message Dataplane {
// Tags associated with a gateway of this data plane to, e.g.
// `kuma.io/service=gateway`, `env=prod`. `kuma.io/service` tag is
// mandatory.
map<string, string> tags = 1
[ (validate.rules).map.min_pairs = 1 ];
map<string, string> tags = 1 [ (validate.rules).map.min_pairs = 1 ];

// Type of gateway this data plane proxy manages.
// There are two types: `DELEGATED` and `BUILTIN`. Defaults to
Expand All @@ -231,13 +228,16 @@ message Dataplane {
// TransparentProxying describes configuration for transparent proxying.
message TransparentProxying {
enum IpFamilyMode {
// This value is to support backward compatibility and should not be used in new data plane objects.
// This value is to support backward compatibility and should not be
// used in new data plane objects.
UnSpecified = 0;
// Enables transparent proxying for both IPv4 and IPv6 traffic, This is the default.
// Enables transparent proxying for both IPv4 and IPv6 traffic, This is
// the default.
DualStack = 1;
// Enables transparent proxying for IPv4 traffic only.
IPv4 = 2;
// Enables transparent proxying for IPv6 traffic only. This mode is to be supported in the future.
// Enables transparent proxying for IPv6 traffic only. This mode is to
// be supported in the future.
IPv6 = 3;
}

Expand Down Expand Up @@ -267,7 +267,7 @@ message Dataplane {
repeated string reachable_services = 5;

// The IP family mode to enable for. Can be "IPv4" or "DualStack".
IpFamilyMode ip_family_mode = 6;
IpFamilyMode ip_family_mode = 6;
}

// Gateway describes a configuration of the gateway of the data plane proxy.
Expand Down
3 changes: 1 addition & 2 deletions api/mesh/v1alpha1/externalservice.proto
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,5 @@ message ExternalService {

// Tags associated with the external service,
// e.g. kuma.io/service=web, kuma.io/protocol, version=1.0.
map<string, string> tags = 2
[ (validate.rules).map.min_pairs = 1 ];
map<string, string> tags = 2 [ (validate.rules).map.min_pairs = 1 ];
}
66 changes: 20 additions & 46 deletions api/mesh/v1alpha1/gateway_route.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,15 @@ message MeshGatewayRoute {
// weight is computed as "weight/sum(all weights)".
//
// A weight of 0 means that the destination will be ignored.
uint32 weight = 1
[ (validate.rules).message = {required : true} ];
uint32 weight = 1 [ (validate.rules).message = {required : true} ];

// Destination is a selector to match the individual endpoints to
// which the gateway will forward.
map<string, string> destination = 2 [
(validate.rules).map = {
min_pairs : 1,
keys : {string : {min_len : 1}},
values : {string : {min_len : 1}}
}
];
map<string, string> destination = 2 [ (validate.rules).map = {
min_pairs : 1,
keys : {string : {min_len : 1}},
values : {string : {min_len : 1}}
} ];
};

// TCP routes are valid for listeners that accept connections over TCP.
Expand All @@ -49,8 +46,7 @@ message MeshGatewayRoute {
[ (validate.rules).repeated .min_items = 1 ];
};

repeated Rule rules = 1
[ (validate.rules).repeated .min_items = 1 ];
repeated Rule rules = 1 [ (validate.rules).repeated .min_items = 1 ];
};

// HTTP routes are valid for listeners that accept HTTP/1.1 and HTTP/2 over
Expand Down Expand Up @@ -98,14 +94,10 @@ message MeshGatewayRoute {
MatchType match = 1;

// Name of the HTTP header containing the value to match.
string name = 2 [
(validate.rules).message = {required : true}
];
string name = 2 [ (validate.rules).message = {required : true} ];

// Value that the HTTP header value should be matched against.
string value = 3 [
(validate.rules).message = {required : true}
];
string value = 3 [ (validate.rules).message = {required : true} ];
};

// Query matches against HTTP request query parameters.
Expand All @@ -118,14 +110,10 @@ message MeshGatewayRoute {
MatchType match = 1;

// Name of the query parameter containing the value to match.
string name = 2 [
(validate.rules).message = {required : true}
];
string name = 2 [ (validate.rules).message = {required : true} ];

// Value that the query parameter value should be matched against.
string value = 3 [
(validate.rules).message = {required : true}
];
string value = 3 [ (validate.rules).message = {required : true} ];
};

Path path = 1;
Expand All @@ -137,12 +125,8 @@ message MeshGatewayRoute {
message Filter {
message HeaderFilter {
message Header {
string name = 1 [
(validate.rules).message = {required : true}
];
string value = 2 [
(validate.rules).message = {required : true}
];
string name = 1 [ (validate.rules).message = {required : true} ];
string value = 2 [ (validate.rules).message = {required : true} ];
}

repeated Header set = 1;
Expand All @@ -155,9 +139,7 @@ message MeshGatewayRoute {
message Mirror {
// Backend denotes the service to which requests will be mirrored. The
// "weight" field must not be given.
Backend backend = 1 [
(validate.rules).message = {required : true}
];
Backend backend = 1 [ (validate.rules).message = {required : true} ];

// Percentage specifies the percentage of requests to mirror to
// the backend (in the range 0.0 - 100.0, inclusive).
Expand Down Expand Up @@ -187,14 +169,10 @@ message MeshGatewayRoute {
// redirect message.
message Redirect {
// The scheme for the redirect URL. Usually "http" or "https".
string scheme = 1 [
(validate.rules).message = {required : true}
];
string scheme = 1 [ (validate.rules).message = {required : true} ];

// The hostname to redirect to.
string hostname = 2 [
(validate.rules).message = {required : true}
];
string hostname = 2 [ (validate.rules).message = {required : true} ];

// The port to redirect to.
uint32 port = 3 [ (validate.rules).uint32.lt = 65535 ];
Expand All @@ -221,8 +199,7 @@ message MeshGatewayRoute {
message Rule {
// Matches are checked in order. If any match is successful, the
// rule is selected (OR semantics).
repeated Match matches = 1
[ (validate.rules).repeated .min_items = 1 ];
repeated Match matches = 1 [ (validate.rules).repeated .min_items = 1 ];

// Filters are request processing steps that are applied to
// matched requests.
Expand All @@ -245,8 +222,7 @@ message MeshGatewayRoute {
repeated string hostnames = 1;

// Rules specifies how the gateway should match and process HTTP requests.
repeated Rule rules = 2
[ (validate.rules).repeated .min_items = 1 ];
repeated Rule rules = 2 [ (validate.rules).repeated .min_items = 1 ];
};

message Conf {
Expand All @@ -264,10 +240,8 @@ message MeshGatewayRoute {
};

// Selectors is used to match this resource to MeshGateway listener.
repeated Selector selectors = 1
[ (validate.rules).repeated .min_items = 1 ];
repeated Selector selectors = 1 [ (validate.rules).repeated .min_items = 1 ];

// Conf specifies the route configuration.
Conf conf = 2
[ (validate.rules).message.required = true ];
Conf conf = 2 [ (validate.rules).message.required = true ];
}
29 changes: 11 additions & 18 deletions api/mesh/v1alpha1/health_check.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ message HealthCheck {

// List of selectors to match dataplanes that should be configured to do
// health checks.
repeated Selector sources = 1
[ (validate.rules).repeated .min_items = 1 ];
repeated Selector sources = 1 [ (validate.rules).repeated .min_items = 1 ];

// List of selectors to match services that need to be health checked.
repeated Selector destinations = 2
Expand All @@ -32,29 +31,23 @@ message HealthCheck {
// Conf defines configuration for various types of health checking.
message Conf {
// Interval between consecutive health checks.
google.protobuf.Duration interval = 1 [
(validate.rules).duration = {
required : true,
gt {}
}
];
google.protobuf.Duration interval = 1 [ (validate.rules).duration = {
required : true,
gt {}
} ];

// Maximum time to wait for a health check response.
google.protobuf.Duration timeout = 2 [
(validate.rules).duration = {
required : true,
gt {}
}
];
google.protobuf.Duration timeout = 2 [ (validate.rules).duration = {
required : true,
gt {}
} ];

// Number of consecutive unhealthy checks before considering a host
// unhealthy.
uint32 unhealthy_threshold = 3
[ (validate.rules).uint32 = {gt : 0} ];
uint32 unhealthy_threshold = 3 [ (validate.rules).uint32 = {gt : 0} ];

// Number of consecutive healthy checks before considering a host healthy.
uint32 healthy_threshold = 4
[ (validate.rules).uint32 = {gt : 0} ];
uint32 healthy_threshold = 4 [ (validate.rules).uint32 = {gt : 0} ];

// If specified, Envoy will start health checking after for a random time in
// ms between 0 and initial_jitter. This only applies to the first health
Expand Down
3 changes: 1 addition & 2 deletions api/mesh/v1alpha1/rate_limit.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ message RateLimit {
option (kuma.mesh.resource).allow_to_inspect = true;

// List of selectors to match dataplanes that rate limit will be applied for
repeated Selector sources = 1
[ (validate.rules).repeated .min_items = 1 ];
repeated Selector sources = 1 [ (validate.rules).repeated .min_items = 1 ];

// List of selectors to match services that need to be rate limited.
repeated Selector destinations = 2
Expand Down
3 changes: 1 addition & 2 deletions api/mesh/v1alpha1/retry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ message Retry {

// List of selectors to match dataplanes that retry policy should be
// configured for
repeated Selector sources = 1
[ (validate.rules).repeated .min_items = 1 ];
repeated Selector sources = 1 [ (validate.rules).repeated .min_items = 1 ];

// List of selectors to match services that need to be health checked.
repeated Selector destinations = 2
Expand Down
18 changes: 7 additions & 11 deletions api/mesh/v1alpha1/traffic_route.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ message TrafficRoute {
option (kuma.mesh.resource).allow_to_inspect = true;

// List of selectors to match data plane proxies that are sources of traffic.
repeated Selector sources = 1
[ (validate.rules).repeated .min_items = 1 ];
repeated Selector sources = 1 [ (validate.rules).repeated .min_items = 1 ];

// List of selectors to match services that are destinations of traffic.
//
Expand All @@ -46,13 +45,11 @@ message TrafficRoute {
// Notice that an endpoint can be either inside or outside the mesh.
// In the former case an endpoint corresponds to a data plane proxy,
// in the latter case an endpoint is an External Service.
map<string, string> destination = 2 [
(validate.rules).map = {
min_pairs : 1,
keys : {string : {min_len : 1}},
values : {string : {min_len : 1}}
}
];
map<string, string> destination = 2 [ (validate.rules).map = {
min_pairs : 1,
keys : {string : {min_len : 1}},
values : {string : {min_len : 1}}
} ];
};

// LoadBalancer defines the load balancing policy and configuration.
Expand Down Expand Up @@ -222,6 +219,5 @@ message TrafficRoute {
}

// Configuration for the route.
Conf conf = 3
[ (validate.rules).message.required = true ];
Conf conf = 3 [ (validate.rules).message.required = true ];
}
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module github.com/kumahq/kuma


go 1.22.5

require (
Expand Down

0 comments on commit 7223851

Please sign in to comment.