Overview
The Reloader receives events from Hashicorp Vault via tcp audit log function, and looks forupdate events on a given secret key.
- Secrets Stored in Hashicorp Vault: Your secrets are stored and managed in Hashicorp Vault.
- Audit Log Configuration: Hashicorp Vault is configured to send audit logs via tcp socket to Reloader.
- Reloader Listener: The Reloader includes a tcp listener that receives events from Hashicorp Vault and annotates the corresponding Kubernetes ExternalSecrets to trigger reconciliation and synchronization of the secret values.
Prerequisites
- A Hashicorp Vault instance installed and available to the cluster.
- Kubernetes cluster with External Secrets Operator and Reloader installed.
- Load Balancer Service Provider available for your Kubernetes cluster.
Step 1: Configure Reloader
Update your Reloader configuration to set up the Hashicorp Vault listener.Hashicorp Vault Listener Configuration
The Reloader needs to run a webhook listener to receive events from Hashicorp Vault. The configuration for the listener is specified using theHashicorp Vault notification source type.
Configuration Spec
host: The host interface to bind the listener to. Use0.0.0.0to listen on all interfaces.port: The port on which the listener will accept connections. Defaults to 8000
- The listener will accept events at
tcp://<host>:8000.
Step 2: Configure Hashicorp Vault
Ensure you have a Hashicorp Vault set up with the secrets you wish to manage.You need to update your mount path according to your setup
Processing Events
When a secret is updated in Hashicorp Vault, an event is sent to the reloader listener via a TCP socket. The Reloader processes the events and annotates the correspondingExternalSecrets to trigger a reconciliation.
In this example - if any changes are made to secret-to-rotate in the Vault, the Reloader will process every ExternalSecret that contains a reference to secret-to-rotate
Enabling External Traffic
To ensure the tcp listener is accessible:- Network Policies: If using network policies, allow outbound and inbound traffic from your hashicorp vault instance to the tcp listener.
- Firewall Rules: Configure firewalls or security groups to allow traffic from Hashicorp Vault to your cluster.