Commit Graph

12678 Commits

Author SHA1 Message Date
Freddy a9c3b53604
UI Service Dump Gateway Enhancements
This PR adds some enhancements needed for additional UI functionality related to gateways:

* ConnectedWithProxy and ConnectedWithGateway track whether a service is proxied by a gateway or Connect proxy.
* GatewayConfig.AssociatedServiceCount tracks the number of service names associated with a gateway
The main change is that Internal.ServiceDump now returns a dump of the gateway-services table, and we join the information from both of those on the client side.
2020-09-29 09:26:29 -06:00
freddygv 9fa1b13df9 Resolve conflicts 2020-09-29 08:59:18 -06:00
R.B. Boyer d2eb27e0a3
api: support GetMeta() and GetNamespace() on all config entry kinds (#8764)
Fixes #8755

Since I was updating the interface, i also added the missing `GetNamespace()`.

Depending upon how you look at it, this is a breaking change since it adds methods to the exported interface `api.ConfigEntry`. Given that you cannot define your own config entry kinds, and all of the machinery of the `api.Client` acts like a factory to construct the canned ones from the rest of the module, this feels like it's not a problematic change as it would only break someone who had reimplemented the `ConfigEntry` interface themselves for no apparent utility?
2020-09-29 09:11:57 -05:00
Daniel Nephin b7ca15e910 stream: move goroutine out of New
This change will make it easier to manage goroutine lifecycle from the caller.

Also expose EventPublisher from state.Store
2020-09-28 18:40:10 -04:00
Daniel Nephin 0fb2a5b992 state: use pbsubscribe.Topic for topic values 2020-09-28 18:40:10 -04:00
Daniel Nephin 7b1534ef05 state: rename and export EventPayload
The subscribe endpoint needs to be able to inspect the payload to filter
events, and convert them into the protobuf types.

Use the protobuf CatalogOp type for the operation field, for now. In the
future if we end up with multiple interfaces we should be able to remove
the protobuf dependency by changing this to an int32 and adding a test
for the mapping between the values.

Make the value of the payload a concrete type instead of interface{}. We
can create other payloads for other event types.
2020-09-28 18:34:30 -04:00
Daniel Nephin 20236e9b6e proto: Add a round trip test for converting types 2020-09-28 18:28:37 -04:00
Daniel Nephin 627449a870 Vendor gofuzz and google/go-cmp 2020-09-28 18:28:37 -04:00
Daniel Nephin 79f70181d8 proto: add code to convert between protobuf types and structs types
For streaming service health events.

Code generated using mog.
2020-09-28 18:28:37 -04:00
Daniel Nephin 98207e8524 proto: add convert function for protobuf/types.Struct
Co-authored-by: Paul Banks <banks@banksco.de>
2020-09-28 18:28:36 -04:00
Chris Piraino 97d39505ef
docs: specify what version usage metrics were added in (#8767) 2020-09-28 16:33:02 -05:00
Kit Patella eb8dad4383
Fix typos in telemetry.mdx 2020-09-28 13:50:11 -07:00
Jeff Escalante fdc4fe88fc
fix jepsen circular redirect (#8757) 2020-09-25 16:42:57 -04:00
Daniel Nephin 6200325e3b
Merge pull request #8726 from amenzhinsky/grpc-hc-error
Return grpc serving status in health check errors
2020-09-25 13:24:32 -04:00
Daniel Nephin edac9f943f Add changelog file 2020-09-25 12:03:49 -04:00
Daniel Nephin 5931df19f1
Merge pull request #8751 from karras/fix_docs_typo_services
Fix typo in Service Discovery/Services documentation
2020-09-25 11:33:07 -04:00
Hans Hasselberg 98d7ea82bd
fix ent error (#8750) 2020-09-25 10:31:42 -05:00
Michael Hofer ea0b56486b
Fix typo in Service Discovery/Services documentation 2020-09-25 10:36:32 +02:00
Petrik van der Velde 069d56797f
Improve the Azure cloud auto join documentation (#8530)
* Update the Azure cloud auto join documentation with more explicit information on how to configure the infrastructure.
* Add a note regarding the length of time taken for Azure to sync the MSI permissions.
* Update references from tag_name to tag_key in the Azure examples
Co-authored-by: Jono Sosulska <42216911+jsosulska@users.noreply.github.com>
2020-09-24 22:41:26 -04:00
Joel Watson c5301b98ac
Merge pull request #8678 from hashicorp/watsonian/upgrade-docs
docs: Add documentation for large version jump upgrades
2020-09-24 16:49:16 -05:00
R.B. Boyer 7eef25daf5
agent: when enable_central_service_config is enabled ensure agent reload doesn't revert check state to critical (#8747)
Likely introduced when #7345 landed.
2020-09-24 16:24:04 -05:00
R.B. Boyer 0064f1936e
server: make sure that the various replication loggers use consistent logging (#8745) 2020-09-24 15:49:38 -05:00
Daniel Nephin c52c5e466b
Merge pull request #8630 from hashicorp/streaming/add-protobuf-types
streaming: add protobuf for subscribe service and events
2020-09-24 16:11:12 -04:00
Mike Morris 85d223b73c
docs: highlight Vault service mesh CA integration (#8730) 2020-09-24 15:38:49 -04:00
Daniel Nephin f7f9879dab proto: split pbservice into multiple files
There are many types in this package, splitting them into node, service, healthcheck helps show the
relationship between these types.
2020-09-24 15:14:27 -04:00
Daniel Nephin 225a91ae3c proto: Add protos for subscribing to service health events.
Co-authored-by: Paul Banks <banks@banksco.de>
2020-09-24 15:09:17 -04:00
Daniel Nephin 24198cfc7f Update build-support/scripts/proto-gen.sh 2020-09-24 15:09:01 -04:00
R.B. Boyer 0fb088aac3
agent: make the json/hcl decoding of ConnectProxyConfig fully work with CamelCase and snake_case (#8741)
Fixes #7418
2020-09-24 13:58:52 -05:00
Hans Hasselberg ad4e189354
add -list-primary to `consul keyring` command (#8692)
* add -list-primary

* add docs

* use builder

* fix multiple actions
2020-09-24 20:04:20 +02:00
Daniel Nephin bdefc3dfee
Merge pull request #8735 from ncode/master
remove nodeName call when using -service
2020-09-24 13:31:09 -04:00
Daniel Nephin 4d04139678
Merge pull request #8667 from hashicorp/streaming/grpc-client-conn-router
streaming: grpc.ClientConnPool and grpc resolver
2020-09-24 13:26:50 -04:00
Daniel Nephin f14145e6d9 agent/grpc: always close the conn when dialing fails. 2020-09-24 12:53:14 -04:00
Daniel Nephin e6ffd987a3 agent/grpc: seed the rand for shuffling servers 2020-09-24 12:53:14 -04:00
Daniel Nephin 2294793357 agent/grpc: use router.Manager to handle the rebalance
The router.Manager is already rebalancing servers for other connection pools, so it can call into our resolver to do the same.
This change allows us to remove the serf dependency from resolverBuilder, and remove Datacenter from the config.

Also revert the change to refreshServerRebalanceTimer
2020-09-24 12:53:14 -04:00
Daniel Nephin 2273673500 grpc: restore integration tests for grpc client conn pool
Add a fake rpc Listener
2020-09-24 12:53:14 -04:00
Daniel Nephin 07b4507f1e router: remove grpcServerTracker from managers
It only needs to be refereced from the Router, because there is only 1 instance, and the
Router can call AddServer/RemoveServer like it does on the Manager.
2020-09-24 12:53:14 -04:00
Daniel Nephin bad4d3ff7c grpc: redeuce dependencies, unexport, and add godoc
Rename GRPCClient to ClientConnPool. This type appears to be more of a
conn pool than a client. The clients receive the connections from this
pool.

Reduce some dependencies by adjusting the interface baoundaries.

Remove the need to create a second slice of Servers, just to pick one and throw the rest away.

Unexport serverResolver, it is not used outside the package.

Use a RWMutex for ServerResolverBuilder, some locking is read-only.

Add more godoc.
2020-09-24 12:53:10 -04:00
Daniel Nephin 25f47b46e1 grpc: move client conn pool to grpc package 2020-09-24 12:48:12 -04:00
Daniel Nephin f936ca5aea grpc: client conn pool and resolver
Extracted from 936522a13c

Co-authored-by: Paul Banks <banks@banksco.de>
2020-09-24 12:46:22 -04:00
Daniel Nephin c18516ad7d
Merge pull request #8680 from hashicorp/dnephin/replace-consul-opts-with-base-deps
agent: Repalce ConsulOptions with a new struct from agent.BaseDeps
2020-09-24 12:45:54 -04:00
John Cowen 011b7b8570
ui: Correct readonly L7 Intentions API calls (#8725)
* Disable ability to select destination if not creating

* Add a LegacyID for intentions that don't have them

* Use `/exact/` endpoint for reading single intentions

* Fix up test for new API interaction

* Upgrade consul-api-double

* Comment out tests using destination for the moment

Also, removed any intention related things from the old page-navigation
tests
2020-09-24 16:07:13 +01:00
Paul Banks 7d58901ae8
Fix bad int -> string conversions caught by go vet changes in 1.15 (#8739) 2020-09-24 11:14:07 +01:00
danielehc 5bfd69fe55
Add alias-node option info (#8706) 2020-09-23 18:11:09 +02:00
Alvin Huang e918da9c40
fix command in cherry-picker script (#8738) 2020-09-23 09:59:17 -04:00
Juliano Martinez 5ce309a2f7 remove nodeName call when using -service
- fix #8734
2020-09-23 10:45:16 +02:00
John Cowen e4507ae11e
ui: Go back to expecting falsey values during config env tests (#8710) 2020-09-23 09:19:04 +01:00
Prabodh b87e6443cf
Update index.mdx (#8727)
Fixed a gramatical mistake.
2020-09-22 17:57:46 -04:00
Michael Ethridge 512250408e
Adding Vault ACL examples for Connect CA (#8536) 2020-09-22 16:02:06 -04:00
Alexander Mykolaichuk af753ee6a5
added permission denied error message (#8044) 2020-09-22 20:36:07 +02:00
Hans Hasselberg a89ee1a7ca
use service datacenter for dns name (#8704)
* Use args.Datacenter instead of configured datacenter
2020-09-22 20:34:09 +02:00