Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
519 changes: 49 additions & 470 deletions api/mesh/options.pb.go

Large diffs are not rendered by default.

74 changes: 6 additions & 68 deletions api/mesh/options.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,81 +7,19 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh";
import "google/protobuf/descriptor.proto";

message DubboResourceOptions {
// Name of the Dubbo resource struct.
// Name and type of the dubbo resource struct.
string name = 1;

// Name and value of the modelResourceType constant.
string type = 2;

// True if this resource has global scope. Otherwise it will be mesh scope.
bool global = 3;
// The name of the resource showed as plural
string plural_name = 2;

// Name of the resource's Go package.
string package = 4;

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

DubboDdsOptions dds = 10;
DubboWsOptions ws = 7;

// Whether scope is "Namespace"; Otherwise to "Cluster".
bool scope_namespace = 11;

// Whether to skip generation of native API helper functions.
bool skip_kubernetes_wrappers = 12;

// Whether to generate Inspect API endpoint
bool allow_to_inspect = 13;

// If resource has more than one version, then the flag defines which version
// is used in the storage. All other versions must be convertible to it.
bool storage_version = 14;

// The name of the policy showed as plural to be displayed in the UI and maybe
// CLI
string plural_display_name = 15;

// Is Experimental indicates if a policy is in experimental state (might not
// be production ready).
bool is_experimental = 16;

// Columns to set using `+kubebuilder::printcolumns`
repeated string additional_printer_columns = 17;

// Whether the resource has a matching insight type
bool has_insights = 18;
}

message DubboWsOptions {
// Name is the name of the policy for resource name usage in path.
string name = 1;
// Plural is only to be set if the plural of the resource is irregular (not
// just adding a 's' at the end).
string plural = 2;
// ReadOnly if the resource is read only.
bool read_only = 3;
// AdminOnly whether this entity requires admin auth to access these
// endpoints.
bool admin_only = 4;
}

message DubboDdsOptions {
// SendToGlobal whether this entity will be sent from zone cp to global cp
bool send_to_global = 1;
// SendToZone whether this entity will be sent from global cp to zone cp
bool send_to_zone = 2;
}
string package = 3;

message DubboPolicyOptions {
// Whether to skip type registration for this resource.
bool skip_registration = 1;
// An optional alternative plural form if this is unset default to a standard
// derivation of the name
string plural = 2;
// Is Experimental indicates if a resource is in experimental state.
bool is_experimental = 4;
}

extend google.protobuf.MessageOptions {
DubboResourceOptions resource = 43534533; // 'dubbo'
DubboPolicyOptions policy = 43534534; // 'dubbo'
}
41 changes: 20 additions & 21 deletions api/mesh/v1alpha1/affinity_route.pb.go

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

15 changes: 7 additions & 8 deletions api/mesh/v1alpha1/affinity_route.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1";
import "api/mesh/options.proto";

message AffinityRoute {
option (dubbo.mesh.resource).name = "AffinityRouteResource";
option (dubbo.mesh.resource).type = "AffinityRoute";
option (dubbo.mesh.resource).name = "AffinityRoute";
option (dubbo.mesh.resource).plural_name = "AffinityRoutes";
option (dubbo.mesh.resource).package = "mesh";
option (dubbo.mesh.resource).dds.send_to_zone = true;
option (dubbo.mesh.resource).ws.name = "affinityroute";
option (dubbo.mesh.resource).ws.plural = "affinityroutes";
option (dubbo.mesh.resource).allow_to_inspect = true;
option (dubbo.mesh.resource).is_experimental = false;

string configVersion = 1;
string scope = 2; // must be chosen from `service` and `application`
string key = 3; // specifies which service or application the rule body acts on
// scope must be chosen from `service` and `application`
string scope = 2;
// key specifies which service or application the rule body acts on
string key = 3;
bool runtime = 4;
bool enabled = 5;
AffinityAware affinity = 6;
Expand Down
58 changes: 24 additions & 34 deletions api/mesh/v1alpha1/application.pb.go

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

12 changes: 4 additions & 8 deletions api/mesh/v1alpha1/application.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@ import "api/mesh/options.proto";


message Application {
option (dubbo.mesh.resource).name = "ApplicationResource";
option (dubbo.mesh.resource).type = "Application";
option (dubbo.mesh.resource).name = "Application";
option (dubbo.mesh.resource).plural_name = "Applications";
option (dubbo.mesh.resource).package = "mesh";
option (dubbo.mesh.resource).ws.name = "application";
option (dubbo.mesh.resource).ws.plural = "applications";
option (dubbo.mesh.resource).ws.read_only = true;
option (dubbo.mesh.resource).scope_namespace = true;
option (dubbo.mesh.resource).allow_to_inspect = true;
option (dubbo.mesh.resource).is_experimental = true;

string name = 1;

map<string, string> features = 99;
int64 instanceCount = 2;

}
13 changes: 5 additions & 8 deletions api/mesh/v1alpha1/condition_route.pb.go

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

9 changes: 3 additions & 6 deletions api/mesh/v1alpha1/condition_route.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1";
import "api/mesh/options.proto";

message ConditionRoute {
option (dubbo.mesh.resource).name = "ConditionRouteResource";
option (dubbo.mesh.resource).type = "ConditionRoute";
option (dubbo.mesh.resource).name = "ConditionRoute";
option (dubbo.mesh.resource).plural_name = "ConditionRoutes";
option (dubbo.mesh.resource).package = "mesh";
option (dubbo.mesh.resource).dds.send_to_zone = true;
option (dubbo.mesh.resource).ws.name = "conditionroute";
option (dubbo.mesh.resource).ws.plural = "conditionroutes";
option (dubbo.mesh.resource).allow_to_inspect = true;
option (dubbo.mesh.resource).is_experimental = false;

message v3 {
string configVersion = 1;
Expand Down
Loading
Loading