Releases: kubescape/node-agent
Release v0.2.12
Type
enhancement, bug_fix
Description
- Implemented a retry mechanism with exponential backoff in
startApplicationProfiling
to ensureinstanceID
is set before monitoring starts. This addresses potential race conditions where monitoring could start before theinstanceID
is available. - Refactored
ensureInstanceID
function to improve error handling, removing the context parameter and adding detailed error messages for each failure point. - Updated the Golang base image in the Dockerfile to
golang:1.21-bullseye
, simplifying the version specification.
Changes walkthrough
Relevant files | |||
---|---|---|---|
Enhancement |
| ||
Configuration changes |
|
✨ Usage guide:
Overview:
The describe
tool scans the PR code changes, and generates a description for the PR - title, type, summary, walkthrough and labels. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.
When commenting, to edit configurations related to the describe tool (pr_description
section), use the following template:
/describe --pr_description.some_config1=... --pr_description.some_config2=...
With a configuration file, use the following template:
[pr_description]
some_config1=...
some_config2=...
Enabling\disabling automation
meaning the
the tool will replace every marker of the form
Note that when markers are enabled, if the original PR description does not contain any markers, the tool will not alter the description at all. |
Custom labelsThe default labels of the If you specify custom labels in the repo's labels page or via configuration file, you can get tailored labels for your use cases.
The list above is eclectic, and aims to give an idea of different possibilities. Define custom labels that are relevant for your repo and use cases. |
Inline File Walkthrough 💎For enhanced user experience, the To enable inline file summary, set
|
Utilizing extra instructionsThe Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Notice that the general structure of the description is fixed, and cannot be changed. Extra instructions can change the content or style of each sub-section of the PR description. Examples for extra instructions:
Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable. |
More PR-Agent commands
|
See the describe usage page for a comprehensive guide on using this tool.
Release v0.2.9
Type
Bug fix
Description
- This PR fixes a failing test by updating the
kubescape.io/image-tag
annotation in thenginx-syft-filtered.json
test data file. The image tag was changed fromnginx:1.21.3
tonginx
.
Changes walkthrough
Relevant files | |||
---|---|---|---|
Bug fix |
|
✨ Usage guide:
Overview:
The describe
tool scans the PR code changes, and generates a description for the PR - title, type, summary, walkthrough and labels. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.
When commenting, to edit configurations related to the describe tool (pr_description
section), use the following template:
/describe --pr_description.some_config1=... --pr_description.some_config2=...
With a configuration file, use the following template:
[pr_description]
some_config1=...
some_config2=...
Enabling\disabling automation
meaning the
the tool will replace every marker of the form
Note that when markers are enabled, if the original PR description does not contain any markers, the tool will not alter the description at all. |
Custom labelsThe default labels of the If you specify custom labels in the repo's labels page or via configuration file, you can get tailored labels for your use cases.
The list above is eclectic, and aims to give an idea of different possibilities. Define custom labels that are relevant for your repo and use cases. |
Inline File Walkthrough 💎For enhanced user experience, the To enable inline file summary, set
|
Utilizing extra instructionsThe Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Notice that the general structure of the description is fixed, and cannot be changed. Extra instructions can change the content or style of each sub-section of the PR description. Examples for extra instructions:
Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable. |
More PR-Agent commands
|
See the describe usage page for a comprehensive guide on using this tool.
Release v0.1.131
Type
bug_fix
Description
This PR addresses a race condition between container start and activity reporting. The main changes include:
- A new utility function
WaitGetSafeMap
has been added to safely retrieve the map for capabilities, execSets, and openSets. - The
ReportCapability
,ReportFileExec
, andReportFileOpen
functions inapplicationprofile_manager.go
have been updated to useWaitGetSafeMap
and handle any errors it returns. - The test in
applicationprofile_manager_test.go
has been updated to prepare the container before reporting capabilities, file execution, and file opening. These operations are also now run in goroutines to simulate concurrent execution.
PR changes walkthrough
Relevant files | |||
---|---|---|---|
Error handling | 1 files
| ||
Tests | 1 files
| ||
Enhancement | 1 files
|
Release v0.1.130
Type
Bug fix
Description
This PR introduces a check to ignore eBPF events with an empty container name. This change is applied to various worker pools including capabilities, exec, open, network, and DNS worker pools. The main changes are:
- Added a condition to return from the worker function if the container name in the event is empty.
- Updated error messages for worker pool creation failures.
PR changes walkthrough
Relevant files | |||
---|---|---|---|
Bug fix | 1 files
|
Release v0.1.129
Type
bug_fix
Description
This PR introduces a check to skip exec events with an empty path. This is a bug fix to prevent potential errors or unexpected behavior when an exec event with an empty path is reported. The changes include:
- A condition to return early from the
ReportFileExec
function in theApplicationProfileManager
if the path is empty. - A corresponding test case to verify the correct behavior when an empty path is reported.
PR changes walkthrough
Relevant files | |||
---|---|---|---|
Bug fix | 1 files
| ||
Tests | 1 files
|
Release v0.1.128
Type
Enhancement
Description
This PR introduces several changes:
- The
wlid
annotation is added to network neighbors in thenetwork_manager.go
andnetwork_neighbors.go
files. This is done by modifying thegenerateNetworkNeighborsCRD
function to includeclusterName
as a parameter and using it to generate thewlid
. - The
generateNetworkNeighborsCRD
function is also updated in thenetwork_neighbors_test.go
file to reflect the changes. - The version of
inspektor-gadget
is updated fromv0.23.0
tov0.23.1
in thego.mod
file.
Main files walkthrough
files:
pkg/networkmanager/network_manager.go
: ThegenerateNetworkNeighborsCRD
function is called with an additionalclusterName
parameter. This is done in two places within thehandleContainerStarted
andhandleNetworkEvents
functions.pkg/networkmanager/network_neighbors.go
: ThegenerateNetworkNeighborsCRD
function is updated to includeclusterName
as a parameter and use it to generate thewlid
for theNetworkNeighbors
object.pkg/networkmanager/network_neighbors_test.go
: ThegenerateNetworkNeighborsCRD
function is updated in the test cases to include theclusterName
parameter.go.mod
: The version ofinspektor-gadget
is updated fromv0.23.0
tov0.23.1
. The replace directive forinspektor-gadget
is removed.go.sum
: The checksums for the new version ofinspektor-gadget
are added and the old ones are removed.
Release v0.1.127
type:
bug_fix, refactoring
description:
This PR primarily focuses on refactoring the DNS resolution process and enhancing configuration handling. The main changes include:
- DNS resolution is no longer reliant on ebpf events. Instead, it uses the standard
net.LookupIP
function to resolve DNS names. - The
CreateDNSManager
function no longer requires context, config, k8sClient, storageClient, and clusterName parameters. It's now a parameterless function. - The
CreateRelevancyManagerMock
function now returns a relevancyManager object. - The
EnableNetworkTracing
configuration option has been added to theTestLoadConfig
function in theconfig_test.go
file. - The container collection options have been updated to use
containercollection.WithContainerFanotifyEbpf
instead ofcontainercollection.WithRuncFanotify
. - The
dnsEventCallback
function incontainer_watcher_private.go
now also accepts events of typeDEBUG
. - The
ApiVersionMetadataKey
label has been removed from thegenerateNetworkNeighborsLabels
function innetwork_neighbors.go
and the corresponding tests. - The
config.json
file has been updated withfullPathTracingEnabled
andnetworkServiceEnabled
options.
main_files_walkthrough:
files:
main.go
: TheCreateRelevancyManagerMock
function now returns a relevancyManager object. TheCreateDNSManager
function has been updated to not require any parameters.pkg/config/config_test.go
: TheEnableNetworkTracing
configuration option has been added to theTestLoadConfig
function.pkg/containerwatcher/v1/container_watcher_private.go
: The container collection options have been updated to usecontainercollection.WithContainerFanotifyEbpf
instead ofcontainercollection.WithRuncFanotify
.pkg/dnsmanager/dns_manager.go
: TheCreateDNSManager
function no longer requires context, config, k8sClient, storageClient, and clusterName parameters. It's now a parameterless function. The DNS resolution process has been updated to use the standardnet.LookupIP
function.pkg/networkmanager/network_neighbors.go
: TheApiVersionMetadataKey
label has been removed from thegenerateNetworkNeighborsLabels
function.configuration/config.json
: Theconfig.json
file has been updated withfullPathTracingEnabled
andnetworkServiceEnabled
options.
Release v0.1.118
PR Type:
Enhancement
PR Description:
This PR introduces several enhancements to the Application Profile Manager:
- Adds support for Workload ID (WLID) to application profile objects.
- Incorporates the cluster name into the Application Profile Manager.
- Adds container type and index to the WatchedContainerData structure.
- Modifies the application profile saving process to accommodate the new container type and index.
- Updates the application profile manager tests to reflect these changes.
- Updates the storage package version in go.mod.
PR Main Files Walkthrough:
files:
main.go
: The cluster name is now passed as an argument when creating the Application Profile Manager.pkg/applicationprofilemanager/v1/applicationprofile_manager.go
: The Application Profile Manager structure now includes a cluster name. The CreateApplicationProfileManager function has been updated to accept the cluster name as an argument. Additional logic has been added to calculate and validate the WLID, find the container type and index, and save the application profile accordingly.pkg/applicationprofilemanager/v1/applicationprofile_manager_test.go
: The test for the Application Profile Manager has been updated to pass the cluster name as an argument when creating the Application Profile Manager.pkg/k8sclient/k8sclient_mock.go
: A new container with the name "log" and image "fluentbit" has been added to the mock workload.pkg/storage/storage_mock.go
: The mock Application Profile now includes a list of containers, each with its own capabilities.pkg/utils/utils.go
: The WatchedContainerData structure now includes a container type and index. New functions have been added to get and insert an Application Profile Container based on the container type and index.go.mod
: The version of the storage package has been updated from v0.0.33 to v0.0.38.
Release v0.1.114
PR Type:
Enhancement
PR Description:
This PR introduces a new feature to support network neighbors. The main changes include:
- Adding a network tracer to listen to communication.
- Adding a network manager to handle network events.
- Supporting services without selectors.
- Adding tests and debug logs.
- Fixing label selector.
- Handling network events and generating entries for CRD.
- Creating and updating network neighbors CRD based on events.
- Handling services with no selectors.
- Deleting resources when a container is removed.
PR Main Files Walkthrough:
files:
pkg/networkmanager/network_manager.go
: This file introduces the NetworkManager struct and its associated methods. The NetworkManager is responsible for handling network events, creating and updating network neighbors CRD based on these events, and deleting resources when a container is removed.
pkg/containerwatcher/v1/open_test.go
: This file modifies the test setup to accommodate the new NetworkManager parameter in the CreateIGContainerWatcher function.
pkg/networkmanager/network_manager_test.go
: This file includes tests for the NetworkManager, ensuring its methods function as expected.
pkg/networkmanager/network_neighbors.go
: This file introduces functions to generate network neighbors CRD and network neighbors entries.
pkg/containerwatcher/v1/container_watcher.go
: This file modifies the ContainerWatcher struct to include a NetworkManager, and updates the relevant methods to use this manager.
pkg/networkmanager/network_event.go
: This file introduces the NetworkEvent struct and its associated methods. NetworkEvent represents a network event that occurs in a container.
pkg/storage/storage_interface.go
: This file updates the StorageClient interface to include methods for creating, getting, patching, and deleting NetworkNeighbors.
pkg/relevancymanager/v1/relevancy_manager.go
: This file modifies the RelevancyManager to include a NetworkManager, and updates the relevant methods to use this manager.
pkg/config/config.go
: This file updates the Config struct to include parameters related to the NetworkManager, such as InitialDelay and UpdateDataPeriod.
main.go
: This file modifies the main function to create a NetworkManager and pass it to the RelevancyManager and ContainerWatcher.
User Description:
- Add a network tracer to listen to communication.
- Add a network manager to handle network events
Release v0.1.111
PR Type:
Refactoring
PR Description:
This pull request refactors the way the namespace is retrieved from the configuration file. Instead of hardcoding the default namespace and using an environment variable, the namespace is now passed as an argument to the CreateStorageNoCache
and CreateFakeStorageNoCache
functions. This change improves the flexibility and maintainability of the code.
PR Main Files Walkthrough:
files:
main.go
: The namespace is now passed as an argument to the CreateStorageNoCache
function.
pkg/storage/v1/storage_nocache.go
: The CreateStorageNoCache
and CreateFakeStorageNoCache
functions now accept the namespace as an argument. The getNamespace
function and the defaultNamespace
constant have been removed.
pkg/storage/v1/storage_test.go
: The tests have been updated to pass the namespace as an argument to the CreateFakeStorageNoCache
function. The hardcoded namespace in the tests has been replaced with a string literal "kubescape".