Skip to content

✨ feat(audit-loader): add AuditLoader installation support #633

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

Closed

Conversation

buu-nguyen
Copy link

@buu-nguyen buu-nguyen commented Mar 24, 2025

Description

Introduce a new feature to install and configure the AuditLoader plugin, enhancing auditing capabilities.
The installation process is inspired by the official documentation on the website: https://docs.starrocks.io/docs/administration/management/audit_loader/

Checklist

For helm chart, please complete the following checklist:

  • make sure you have updated the values.yaml
    file of starrocks chart.
  • In scripts directory, run bash create-parent-chart-values.sh to update the values.yaml file of the parent
    chart( kube-starrocks chart).

@CLAassistant
Copy link

CLAassistant commented Mar 24, 2025

CLA assistant check
All committers have signed the CLA.

Introduce a new feature to install and configure the AuditLoader plugin, enhancing auditing capabilities.

Signed-off-by: buu.nguyen <[email protected]>
@buu-nguyen buu-nguyen force-pushed the feat-install-audit-loader branch from 4f73b7a to 8cfacc2 Compare March 24, 2025 21:08
@buu-nguyen
Copy link
Author

Hi @yandongxiao, could you please take a look at this PR when you have time? Thanks in advance!

PARTITION BY date_trunc('day', `timestamp`)
DISTRIBUTED BY HASH (`queryId`);

INSTALL PLUGIN FROM "/opt/starrocks-plugins/auditloader.zip";
Copy link
Collaborator

Choose a reason for hiding this comment

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

According to the introduction at https://docs.starrocks.io/docs/administration/management/audit_loader/, INSTALL PLUGIN FROM can specify a URL in HTTP format. We do not need an init container to do additional download work.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If using HTTP to install plugins, we just need to ensure that the above SQL command can be executed after the StarRock cluster starts.
You may consider another implementation method. Currently, Operator supports Command and Args parameters. Correspondingly, in Helm Chart, we expose an entrypoint field.

@@ -0,0 +1,64 @@
{{- if and .Values.installAuditLoader.enabled .Values.installAuditLoader.isInstall .Release.IsInstall }}
apiVersion: batch/v1
kind: Job
Copy link
Collaborator

Choose a reason for hiding this comment

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

Although there is a Job in the Helm Chart to initialize the SQL password, I do not think it is reasonable to do this work through a Job. Because Jobs and StarRocks Pods are executed in parallel, it is very likely that when the Pod of the Job starts execution, StarRocks has not successfully started yet. We always need to retry to complete this task.

@buu-nguyen buu-nguyen closed this Apr 14, 2025
@buu-nguyen buu-nguyen deleted the feat-install-audit-loader branch April 14, 2025 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants