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

docs: Document using actionset labels to extend logs #2981

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions docs/tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Tasks

tasks/argo.rst
tasks/logs_level.rst
tasks/logs_labels.rst
tasks/logs.rst
tasks/scaleworkload.rst
27 changes: 27 additions & 0 deletions docs/tasks/logs_labels.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Configuring logs for specific ActionSets
----------------------------------------

Kanister uses structured logging to ensure that its logs can be easily
categorized, indexed and searched by downstream log aggregation software.

Extra fields can be added to the logs related to a specific ActionSet by adding
a label in the ActionSet with ``kanister.io`` prefix.

For example:

.. code-block:: yaml
:linenos:

apiVersion: cr.kanister.io/v1alpha1
kind: ActionSet
metadata:
namespace: kanister
name: myActionSet
labels:
kanister.io/myFieldName: myFieldValue

All logs concerning this ActionSet execution will have
``myFieldName`` field with ``myFieldValue`` value.



1 change: 1 addition & 0 deletions docs_new/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default defineConfig({
link: "/tasks/logs",
},
{ text: "Modifying Kanister Log Level", link: "/tasks/logs_level" },
{ text: "Configuring logs for specific ActionSets", link: "/tasks/logs_labels" },
{
text: "Using ScaleWorkload function with output artifact",
link: "/tasks/scaleworkload",
Expand Down
1 change: 1 addition & 0 deletions docs_new/generatedSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = [
{ text: "Argo.md", link: "/tasks/argo" },
{ text: "Logs.md", link: "/tasks/logs" },
{ text: "Logs_level.md", link: "/tasks/logs_level" },
{ text: "logs_labels.md", link: "/tasks/logs_labels" },
{ text: "Scaleworkload.md", link: "/tasks/scaleworkload" },
],
},
Expand Down
23 changes: 23 additions & 0 deletions docs_new/tasks/logs_labels.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Configuring logs for specific ActionSets

Kanister uses structured logging to ensure that its logs can be easily
categorized, indexed and searched by downstream log aggregation software.

Extra fields can be added to the logs related to a specific ActionSet by adding
a label in the ActionSet with `kanister.io` prefix.

For example:

``` yaml
apiVersion: cr.kanister.io/v1alpha1
kind: ActionSet
metadata:
namespace: kanister
name: myActionSet
labels:
kanister.io/myFieldName: myFieldValue

```

All logs concerning this ActionSet execution will have
`myFieldName` field with `myFieldValue` value.
Loading