consul/agent/hcp
Melissa Kam b0e87dbe13
[CC-7049] Stop the HCP manager when link is deleted (#20351)
* Add Stop method to telemetry provider

Stop the main loop of the provider and set the config
to disabled.

* Add interface for telemetry provider

Added for easier testing. Also renamed Run to Start, which better
fits with Stop.

* Add Stop method to HCP manager

* Add manager interface, rename implementation

Add interface for easier testing, rename existing Manager to HCPManager.

* Stop HCP manager in link Finalizer

* Attempt to cleanup if resource has been deleted

The link should be cleaned up by the finalizer, but there's an edge
case in a multi-server setup where the link is fully deleted on one
server before the other server reconciles. This will cover the case
where the reconcile happens after the resource is deleted.

* Add a delete mananagement token function

Passes a function to the HCP manager that deletes the management token
that was initially created by the manager.

* Delete token as part of stopping the manager

* Lock around disabling config, remove descriptions
2024-01-30 09:40:36 -06:00
..
bootstrap [CC-7063] Fetch HCP agent bootstrap config in Link reconciler (#20306) 2024-01-24 09:51:43 -06:00
client [CC-7063] Fetch HCP agent bootstrap config in Link reconciler (#20306) 2024-01-24 09:51:43 -06:00
config [CC-7044] Start HCP manager as part of link creation (#20312) 2024-01-29 16:31:44 -06:00
discover
scada [CC-7041] Update and start the SCADA provider in HCP manager (#19976) 2024-01-08 09:49:29 -06:00
telemetry [CC-7044] Start HCP manager as part of link creation (#20312) 2024-01-29 16:31:44 -06:00
testserver
deps.go [CC-7044] Start HCP manager as part of link creation (#20312) 2024-01-29 16:31:44 -06:00
deps_test.go
manager.go [CC-7049] Stop the HCP manager when link is deleted (#20351) 2024-01-30 09:40:36 -06:00
manager_test.go [CC-7049] Stop the HCP manager when link is deleted (#20351) 2024-01-30 09:40:36 -06:00
mock_Manager.go [CC-7049] Stop the HCP manager when link is deleted (#20351) 2024-01-30 09:40:36 -06:00
mock_TelemetryProvider.go [CC-7049] Stop the HCP manager when link is deleted (#20351) 2024-01-30 09:40:36 -06:00
telemetry_provider.go [CC-7049] Stop the HCP manager when link is deleted (#20351) 2024-01-30 09:40:36 -06:00
telemetry_provider_test.go [CC-7049] Stop the HCP manager when link is deleted (#20351) 2024-01-30 09:40:36 -06:00
testing.go [Cloud][CC-6925] Updates to pushing server state (#19682) 2023-12-04 10:25:18 -05:00