Skip to content

Commit

Permalink
Service inventory changes for further protos review (istio#20)
Browse files Browse the repository at this point in the history
* Service inventory changes for further protos review:

- Consolidated all proto definitions into service.proto
- Minor changes to Makefile, client print formatting, etc.

* - Let inventory-server stay-up, and retry DB Ping, instead of exiting
- Test connection when DB ping fails

* Fixes based on earlier PR comments. Following are now taken care:

- Redefined service.proto to accommodate standards, reorganized/consolidated names, comments, etc.
- Reworked corresponding handler code proto references

* Additional fixes based on PR comments incorporating proto file reformatting,
service name changes, and similar. Corresponding code changes to accommodate these.

* Service proto changes, new service ListServices(ListServicesRequest),
added empty metadata; Retaining proto package as v1alpha as-is

* Follow-up PR review changes accommodating:

- rename proto package to "api/inventory/v1" from "api/inventory/v1alpha";
  corresponding go package import changes
- rearranged service.proto message definitions
- Proto major changes: Metadata.spec to Service.ports; Workload.ou to Metadata.ou
- gRPC client takes an address "inventory-client <address>"
- PSQL reconnect timer changed to 5s from 30s

* Continuation of earlier PR commit 2019604

* Service Inventory updates accommodating:

- Rid of DB population at init time, instead separated inventory-test to add entries to DB
- CreateServices now take Service protobuf as parameter to unmarshall protobuf into
  to PLSQL; Similarly, ListServices will now marshall's service protobuf to ListServicesResponse
- DB tables, macros, handler routines to persist/retrieve metadata, endpoint, cluster, workload

* Service Inventory changes accommodating:

- renamed "cmd/test" to "cmd/test-data" for populating test DB data
- batched unmarshalling of queries to populate DB rows
- updated service name to envoyfilter.yaml

* Service Inventory changes accommodating:
(included the rest)
- renamed "cmd/test" to "cmd/test-data" for populating test DB data
- batched unmarshalling of queries to populate DB rows
- updated service name to envoyfilter.yaml

Mirrored from https://github.com/tetrateio/tetrate @ 7b052834d21911a0ad1d1bc1613ddaff07c09155
  • Loading branch information
tetrate-ci committed Sep 26, 2019
1 parent 7a2ceb9 commit 2262153
Show file tree
Hide file tree
Showing 10 changed files with 1,055 additions and 1,129 deletions.
12 changes: 5 additions & 7 deletions inventory/v1alpha1/Makefile → inventory/v1/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Copyright (c) Tetrate, Inc 2018 All Rights Reserved.

TOPDIR := ${PWD}
VENDOR := ${GOPATH}/src/github.com/tetrateio/tetrate/third_party/protobuf
VENDOR := ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis

PROTO_SOURCES = $(wildcard *.proto)
PROTO_GO_SOURCES = $(patsubst %.proto,%.pb.go,$(PROTO_SOURCES))

${PROTO_GO_SOURCES}: ${PROTO_SOURCES}
@protoc \
-I ${TOPDIR}/ \
-I ${VENDOR} \
--go_out=plugins=grpc:. \
@protoc -I ${TOPDIR}/ \
-I${VENDOR} \
--go_out=plugins=grpc:${GOPATH}/src/ \
--descriptor_set_out=inventory.proto-descriptor --include_imports \
$?

Expand All @@ -20,5 +19,4 @@ all: ${PROTO_GO_SOURCES}
.PHONY: all

clean:
@rm -f ${PROTO_GO_SOURCES} inventory.proto-descriptor
@echo "Cleaned ${PROTO_GO_SOURCES}"
@echo "Cleaned nothing"
Binary file not shown.
Loading

0 comments on commit 2262153

Please sign in to comment.