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

new(userspace/falco): add webserver endpoint for retrieving internal version numbers #2356

Merged
merged 4 commits into from
Jan 16, 2023

Conversation

jasondellaluce
Copy link
Contributor

@jasondellaluce jasondellaluce commented Jan 16, 2023

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area engine

What this PR does / why we need it:

This PR adds a new webserver endopoint /versions that can be used to retrieve the versions of the internal Falco components. This can be specifically useful to get this information from a running instance of Falco from external tools, either locally or when deployed in Kubernetes.

Since this happens at runtime, the JSON response also includes the version of the loaded plugins.

curl http://localhost:8765/versions
{
  "default_driver_version": "4.0.0+driver",
  "driver_api_version": "3.0.0",
  "driver_schema_version": "2.0.0",
  "engine_version": "15",
  "falco_version": "0.33.1-119+806a0e8",
  "libs_version": "0.10.0",
  "plugin_api_version": "2.0.0",
  "plugin_versions": {
    "json": "0.6.0",
    "k8saudit": "0.4.0"
  }
}

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

The JSON output is coherent to the output of falco --version -o json_output=true and with falco --support.

Does this PR introduce a user-facing change?:

new(userspace/falco): add webserver endpoint for retrieving internal version numbers

…ion numbers

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
…support

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
…versions

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
@jasondellaluce
Copy link
Contributor Author

/milestone 0.34.0

@poiana poiana added this to the 0.34.0 milestone Jan 16, 2023
@poiana poiana requested review from Kaizhe and leogr January 16, 2023 09:46
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

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

LGTM, a couple of minor comments.

I think we should explicitly state in the config that webserver will be used by falcoctl for its feed feature.
I think falcoctl could also be manually configured though.

userspace/falco/versions_info.cpp Show resolved Hide resolved
userspace/falco/app_actions/print_version.cpp Show resolved Hide resolved
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Jan 16, 2023

LGTM label has been added.

Git tree hash: 12f3cb1c21f376b7a96257f1ed220f96b13ba792

Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Jan 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, jasondellaluce, leogr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Andreagit97,FedeDP,jasondellaluce,leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 41a5de6 into master Jan 16, 2023
@poiana poiana deleted the new/webserver-versions-endpoint branch January 16, 2023 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants