From b3cecde724d2ffae63bd26c71727bbef1fcc5627 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Wed, 15 May 2024 21:49:21 +0600 Subject: [PATCH] Check for license status Signed-off-by: Tamal Saha --- lib/nats.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/nats.go b/lib/nats.go index aeb6060b..fb68966d 100644 --- a/lib/nats.go +++ b/lib/nats.go @@ -86,6 +86,9 @@ func NewNatsConfig(cfg *rest.Config, clusterID string, LicenseFile string) (*Nat return nil, nil, err } license, licenseBytes := le.LoadLicense() + if license.Status != v1alpha1.LicenseActive { + return nil, nil, fmt.Errorf("license status is %s", license.Status) + } opts := verifier.Options{ ClusterUID: clusterID,