consul/command
Melissa Kam 7900544249
[CC-7063] Fetch HCP agent bootstrap config in Link reconciler (#20306)
* Move config-dependent methods to separate package

In order to reuse the fetching and file creation part of the
bootstrap package, move the code that would cause cyclical
dependencies to a different package.

* Export needed bootstrap methods and variables

Also add back validating persisted config and update tests.

* Add support to check for just management token

Add a new method that fetches the bootstrap configuration only if
there isn't a valid management token file instead of checking for
all the hcp-config files.

* Pass data dir as a dependency to link controller

The link controller needs to check the data directory for
the hcp-config files.

* Fetch bootstrap config for token in controller

Load the management token when reconciling a link resource, which will
fetch the agent boostrap configuration if the token is not already
persisted locally. Skip this step if the cluster is in read-only mode.

* Validate resource ID format in link creation

* Handle unauthorized and forbidden errors

Check for 401 and 403s when making GNM requests, exit bootstrap fetch
loop and return specific failure statuses for link.

* Move test function to a testing file

* Log load and status write errors
2024-01-24 09:51:43 -06:00
..
acl [NET-6251] Nomad client templated policy (#19827) 2023-12-06 10:32:12 -05:00
agent [CC-7063] Fetch HCP agent bootstrap config in Link reconciler (#20306) 2024-01-24 09:51:43 -06:00
catalog Remove old build tags (#19128) 2023-10-10 10:58:06 -04:00
cli [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
config [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
connect fix formatting issue in envoy bootstrapping. (#20036) 2023-12-21 15:18:11 -07:00
debug NET-4519 Collecting journald logs in "consul debug" bundle (#18797) 2023-09-19 08:46:50 +05:30
event [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
exec [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
flags Net 2714/xw cli read command (#18462) 2023-09-05 09:17:19 -07:00
forceleave [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
helpers [NET-5325] ACL templated policies support in tokens and roles (#18708) 2023-09-08 12:45:24 +00:00
info [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
intention [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
join [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
keygen [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
keyring [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
kv [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
leave [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
lock Remove old build tags (#19128) 2023-10-10 10:58:06 -04:00
login Remove old build tags (#19128) 2023-10-10 10:58:06 -04:00
logout [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
maint [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
members [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
monitor [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
operator Remove old build tags (#19128) 2023-10-10 10:58:06 -04:00
peering NET-6784: Adding cli command to list exported services to a peer (#19821) 2023-12-07 12:55:15 +05:30
reload [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
resource grpc CLI client read command (#20178) 2024-01-19 19:11:41 -08:00
rtt [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
services [NET-5916] Fix locality-aware routing config and tests (CE) (#19483) 2023-11-02 14:05:06 -05:00
snapshot Removed nodename and status from consul snapshot save -append-filename command and using leader version in version (#18680) 2023-09-06 15:49:25 +05:30
tls [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
troubleshoot NET-3860 - [Supportability] consul troubleshoot CLI for verifying ports (#18329) 2023-12-06 11:12:15 +05:30
validate [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
version [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
watch [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
registry.go grpc CLI client read command (#20178) 2024-01-19 19:11:41 -08:00
registry_ce.go Remove old build tags (#19128) 2023-10-10 10:58:06 -04:00