Skip to content

Comments

feat(wazuh dashboard): add export configuration ndjson file for custom dashboard#168

Open
t-desmond wants to merge 7 commits intomainfrom
feat/automate-dasboard-import
Open

feat(wazuh dashboard): add export configuration ndjson file for custom dashboard#168
t-desmond wants to merge 7 commits intomainfrom
feat/automate-dasboard-import

Conversation

@t-desmond
Copy link
Contributor

@t-desmond t-desmond commented Dec 3, 2025

…ove import job

- Add conditional ConfigMap creation for saved object exports based on `importSavedObjects.enabled`.
- Support multiple exports via `dashboard.exports` in values.yaml.
- Refactor import-job to use initContainer for waiting on dashboard readiness.
- Import all export files dynamically with proper error handling and logging.
data:
"export.ndjson": |
{{ $.Files.Get "files/configs/export.ndjson" | nindent 4 }}
{{- range $k, $v := .exports }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why use this snippet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In case there're multiple custom dashboards to be added, we can configure them from values.yaml like:

  exports:
    "export1.ndjson": |
      {{ $.Files.Get "files/configs/export.ndjson" | nindent 4 }}

The loop in the configmap then creates key value pairs representing each file added

Copy link
Contributor

Choose a reason for hiding this comment

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

Why use the snippet?

{{- range $k, $v := .exports }}
  {{ printf "%s" $k | quote | nindent 2 }}: |
    {{ $v | nindent 4 }}
  {{- end }}

…URLs

- Modified export job to directly download export files from S3 URLs instead of using ConfigMap
- Removed volume mounts that referenced the ConfigMap
- Eliminated ConfigMap size limitations by avoiding storage of large NDJSON files
- Job now iterates through .Values.dashboard.exports directly to download and import each file
Calebasah
Calebasah previously approved these changes Dec 3, 2025
@sonarqubecloud
Copy link

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