Skip to content

Commit

Permalink
address comments.
Browse files Browse the repository at this point in the history
Signed-off-by: morvencao <lcao@redhat.com>
  • Loading branch information
morvencao committed Feb 24, 2025
1 parent 070bf2e commit 30c1a9e
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ CLIENT_SECRET ?= maestro
ENABLE_JWT ?= true
ENABLE_AUTHZ ?= true
ENABLE_OCM_MOCK ?= false
ENABLE_GRPC_SERVER ?= false
ENABLE_GRPC_SERVER ?= true

# message driver type, mqtt or grpc, default is mqtt.
MESSAGE_DRIVER_TYPE ?= mqtt
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ ocm login --token=${OCM_ACCESS_TOKEN} --url=http://localhost:8000

```

#### List the resource bundle
#### List the consumers

This will be empty if no resource bundle is ever created
This will be empty if no consumer is ever created

```shell
$ ocm get /api/maestro/v1/resource-bundles
$ ocm get /api/maestro/v1/consumers
{
"items": [],
"kind": "ResourceBundleList",
"kind": "ConsumerList",
"page": 1,
"size": 0,
"total": 0
Expand Down
1 change: 0 additions & 1 deletion cmd/maestro/environments/e_integration_testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,5 @@ func (e *testingEnvImpl) Flags() map[string]string {
"enable-ocm-mock": "true",
"enable-sentry": "false",
"source-id": "maestro",
"enable-grpc-server": "true",
}
}
4 changes: 1 addition & 3 deletions docs/grpc.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# gRPC server

gPRC server is disabled by default. You can enable it by passing `--enable-grpc-server=true` to the maestro server command.
# Maestro gRPC server

## Authentication and Authorization

Expand Down
8 changes: 1 addition & 7 deletions examples/grpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@

## Preparation

1. Enable gRPC server by passing `--enable-grpc-server=true` to the maestro server start command:

```shell
$ kubectl -n maestro patch deploy/maestro --type=json -p='[{"op":"add","path":"/spec/template/spec/containers/0/command/-","value":"--enable-grpc-server=true"}]'
```

2. Do the port-forward the maestro-grpc service:
Do the port-forward the maestro-grpc service:

```shell
$ kubectl -n maestro port-forward svc/maestro-grpc 8090 &
Expand Down
8 changes: 1 addition & 7 deletions examples/manifestworkclient/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@

## Preparation

1. Enable gRPC server by passing `--enable-grpc-server=true` to the maestro server start command:

```shell
$ kubectl -n maestro patch deploy/maestro --type=json -p='[{"op":"add","path":"/spec/template/spec/containers/0/command/-","value":"--enable-grpc-server=true"}]'
```

2. Do the port-forward for the maestro and maestro-grpc services:
Do the port-forward for the maestro and maestro-grpc services:

```shell
$ kubectl -n maestro port-forward svc/maestro 8000 &
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/grpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewGRPCServerConfig() *GRPCServerConfig {
}

func (s *GRPCServerConfig) AddFlags(fs *pflag.FlagSet) {
fs.BoolVar(&s.EnableGRPCServer, "enable-grpc-server", false, "Enable gRPC server")
fs.BoolVar(&s.EnableGRPCServer, "enable-grpc-server", true, "Enable gRPC server")
fs.StringVar(&s.ServerBindPort, "grpc-server-bindport", "8090", "gPRC server bind port")
fs.StringVar(&s.BrokerBindPort, "grpc-broker-bindport", "8091", "gPRC broker bind port")
fs.Uint32Var(&s.MaxConcurrentStreams, "grpc-max-concurrent-streams", math.MaxUint32, "gPRC max concurrent streams")
Expand Down
1 change: 0 additions & 1 deletion test/e2e/setup/e2e_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ fi
# 7. deploy maestro into maestro namespace
export ENABLE_JWT=false
export ENABLE_OCM_MOCK=true
export ENABLE_GRPC_SERVER=true
export maestro_svc_type="NodePort"
export maestro_svc_node_port=30080
export grpc_svc_type="NodePort"
Expand Down

0 comments on commit 30c1a9e

Please sign in to comment.