Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC-677 Add docs for license status in redpanda resource #879

Open
wants to merge 5 commits into
base: v-WIP/24.3
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions modules/get-started/pages/licensing/monitor-license-status.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
= Check the Status of an Enterprise Edition License
:description: pass:q[Learn how to monitor the status of your Redpanda Enterprise Edition license using `rpk`, the Redpanda Console, the Admin API, and observability tools such as logs and metrics.]
:description: pass:q[Learn how to monitor the status of your Redpanda Enterprise Edition license using `rpk`, Redpanda Console, and observability tools such as logs and metrics.]

To track license expiration and ensure compliance with xref:get-started:licensing/overview.adoc[Redpanda licensing], you can monitor the status of your Enterprise Edition license using <<rpk, `rpk`>>, <<console, Redpanda Console>>, and observability tools such as <<logs, logs>> and <<metrics, metrics>>.

Expand Down Expand Up @@ -32,7 +32,7 @@ Indicates the current state of the license. Possible values include:
* `expired`: The license has expired, and restrictions may apply to enterprise features.
* `not_present`: No license is currently applied.

|License violation
|License violation
|
A boolean value that indicates whether enterprise features are being used in violation of the licensing terms:

Expand Down Expand Up @@ -147,6 +147,40 @@ Redpanda Console displays warnings in the following scenarios:

- *Redpanda Self-Managed enterprise features are in use without a valid license*: If the Redpanda cluster is using enterprise features without a valid license, Redpanda Console displays a warning specifying the features in use without proper licensing.

== Check the license status on the Redpanda resource in Kubernetes

If you have deployed a Redpanda cluster in Kubernetes using the Redpanda Operator, you can monitor the Enterprise Edition license status from the Redpanda custom resource. The operator integrates license monitoring into the resource's `status` field, allowing you to query the license state, expiration, and active enterprise features with `kubectl`.

. Identify the Redpanda resource:
+
[,bash]
----
kubectl get redpanda
----
+
Example output:
+
[.no-copy]
----
NAME AGE
example-redpanda 12m
JakeSCahill marked this conversation as resolved.
Show resolved Hide resolved
----

. Check the license status:
+
[,bash]
----
kubectl get redpanda <resource-name> -o jsonpath='{.status.licenseStatus}'
----
+
Replace `<resource-name>` with the name of your Redpanda resource, such as `example-redpanda`.
+
The `status.licenseStatus` field includes:
+
- `valid`: Indicates whether the license is valid (true) or not (false).
- `expiryDate`: The date the license will expire (format: YYYY-MM-DD).
- `features`: A list of enterprise features currently in use.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI, other than valid, we don't show this information in Kubernetes, and valid is just a status condition, there's no licenseStatus part of the CRD, we only publish status information under the ClusterLicenseValid condition in status.conditions.

We could add additional details if we want to, but that's not how this currently works. @david-yu thoughts about extending the status to incorporate some of these or is just publishing how to check these via execing and running rpk cluster license info enough since we publish the non-granular license status in the CRD?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewstucki It would be nice to include those fields as well. I don't know if its possible to do another release of the Operator by Tuesday that includes those fields?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also is this status going to be updated a lot or will only happen maybe like once an hour or so?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be possible to cut something by Tuesday, but seeing as it's a long holiday weekend and the changes will need to get reviewed, it might not land.

RE the updates -- this license check would get run every reconciliation, so whenever something on the Redpanda object (including status) change, when any of its owned resources that it's set up to watch change (I know it watches the StatefulSet, and any Deployments from things like Console), or by default 10 hours defined by a cache resynchronization setting in the controller runtime.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok lets see how it goes through this week. Perhaps Rafal can help review if a PR is available by tomorrow?


[[logs]]
== Monitor a license in the logs

Expand Down