license: add ability to reload keys (#775)

* lib/license: add support of license key hot-reload

* docs: add info about license key hot reload

---------

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
This commit is contained in:
Zakhar Bessarab 2024-09-04 17:23:23 +04:00 committed by Aliaksandr Valialkin
parent 57183c9b61
commit 78ecfede06
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

@ -92,6 +92,7 @@ All the VictoriaMetrics Enterprise components require specifying the following c
* `-license` - this flag accepts VictoriaMetrics Enterprise license key, which can be obtained at [this page](https://victoriametrics.com/products/enterprise/trial/)
* `-licenseFile` - this flag accepts a path to file with VictoriaMetrics Enterprise license key,
which can be obtained at [this page](https://victoriametrics.com/products/enterprise/trial/) . Use either `-license` or `-licenseFile`, but not both.
* `-licenseFile.reloadInterval` - specifies the interval for checking the license file for updates. The default value is 1 hour. If the license file is updated, the new license key is read from the file.
* `-license.forceOffline` - enables offline verification of VictoriaMetrics Enterprise license key. Contact us via [this page](https://victoriametrics.com/products/enterprise/)
if you need license key, which can be verified offline without the need to connect to VictoriaMetrics license server.
@ -208,6 +209,8 @@ Or create secret via `kubectl`:
kubectl create secret generic vm-license --from-literal=license={BASE64_ENCODED_LICENSE_KEY}
```
Note that license key provided by using secret is mounted in a file. This allows to perform updates of the license without the need to restart the pod.
### Kubernetes operator
It is allowed to run VictoriaMetrics Enterprise components in [cases listed here](#valid-cases-for-victoriametrics-enterprise).
@ -267,6 +270,7 @@ Or create secret via `kubectl`:
kubectl create secret generic vm-license --from-literal=license={BASE64_ENCODED_LICENSE_KEY}
```
Note that license key provided by using secret is mounted in a file. This allows to perform updates of the license without the need to restart the pod.
See full list of CRD specifications [here](https://docs.victoriametrics.com/operator/api.html).
## Monitoring license expiration