This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
swap CA root watch from Consul Agent API to gRPC #443
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this PR:
RunWithClientAndHclog
for CA roots watch with gRPCpbconnectca.WatchRoots
WatchRoots
mock endpoint addedinternal/consul/certmanager_test.go
internal/commands/exec/exec_test.go
Defer to separate PR:
Add code extracted from Consul'sconnect
package for SPIFFE URI formatting and certificate signing request creation. This code has been isolated such that it should be possible to move into a standalone module at some future point.consul.Agent().ConnectCALeaf
withcertificates.GenerateNewLeaf
How I've tested this PR:
Walked through https://developer.hashicorp.com/consul/tutorials/kubernetes/kubernetes-api-gateway#install-consul with a Docker image built from this branch and loaded into the kind cluster, with both consul-k8s v0.47.1 and
main
.Tests should be passing on Consul 1.13 and 1.14-dev. Switching to these newer APIs will require dropping support for Consul 1.11 and 1.12
unless we restore the current functionality as a fallback, or find a way to proactively detect the version or feature availability of Consul servers and/or if a Consul agent is available.How I expect reviewers to test this PR:
Checklist:
addedupdated