Skip to content

Commit

Permalink
chore(tools): add to resource-gen.go generation of kumactl options (#…
Browse files Browse the repository at this point in the history
…2469) (#2504)

This removes some more manually written code that currently
makes policy creation error prone

Signed-off-by: Charly Molter <charly.molter@konghq.com>
(cherry picked from commit aa0bd89)

Co-authored-by: Charly Molter <charly.molter@konghq.com>
  • Loading branch information
mergify[bot] and lahabana authored Aug 11, 2021
1 parent 7d3c851 commit 4e676d9
Show file tree
Hide file tree
Showing 69 changed files with 977 additions and 877 deletions.
81 changes: 38 additions & 43 deletions api/mesh/options.pb.go

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

5 changes: 3 additions & 2 deletions api/mesh/options.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ message KumaResourceOptions {
// Name and value of the modelResourceType constant.
string type = 2;

// True if this resoure has global scope. Otherwise it will be mesh scope.
// True if this resource has global scope. Otherwise it will be mesh scope.
bool global = 3;

// Name of the resource's Go package.
Expand All @@ -24,6 +24,8 @@ message KumaResourceOptions {

// Whether to skip type registration for this resource.
bool skip_registration = 6;

KumaWsOptions ws = 7;
}

message KumaWsOptions {
Expand All @@ -41,5 +43,4 @@ message KumaWsOptions {

extend google.protobuf.MessageOptions {
KumaResourceOptions resource = 43534533; // 'kuma'
KumaWsOptions ws = 43534534;
}
20 changes: 10 additions & 10 deletions api/mesh/v1alpha1/circuit_breaker.pb.go

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

2 changes: 1 addition & 1 deletion api/mesh/v1alpha1/circuit_breaker.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ message CircuitBreaker {
option (kuma.mesh.resource).name = "CircuitBreakerResource";
option (kuma.mesh.resource).type = "CircuitBreaker";
option (kuma.mesh.resource).package = "mesh";
option (kuma.mesh.ws).name = "circuit-breaker";
option (kuma.mesh.resource).ws.name = "circuit-breaker";

// List of selectors to match dataplanes that are sources of traffic.
repeated Selector sources = 1;
Expand Down
14 changes: 7 additions & 7 deletions api/mesh/v1alpha1/dataplane.pb.go

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

2 changes: 1 addition & 1 deletion api/mesh/v1alpha1/dataplane.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ message Dataplane {
option (kuma.mesh.resource).name = "DataplaneResource";
option (kuma.mesh.resource).type = "Dataplane";
option (kuma.mesh.resource).package = "mesh";
option (kuma.mesh.ws).name = "dataplane";
option (kuma.mesh.resource).ws.name = "dataplane";

// Networking describes inbound and outbound interfaces of a dataplane.
message Networking {
Expand Down
Loading

0 comments on commit 4e676d9

Please sign in to comment.