-
Notifications
You must be signed in to change notification settings - Fork 9
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
CFE-927: Add functionality for scripting mode as per RFE-2052 #118
Conversation
@lmzuccarelli: This pull request references CFE-927 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@lmzuccarelli: This pull request references CFE-927 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
d0fe0c9
to
38fab87
Compare
/test e2e-gcp |
79619b8
to
5a4e9fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @lmzuccarelli
@@ -31,6 +31,8 @@ type NodeObservabilityRunSpec struct { | |||
type NodeObservabilityRef struct { | |||
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names | |||
Name string `json:"name"` | |||
// Mode , this is used to differentiate from the current crio-kubelet profiling and scripting execution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Add the possible values for mode. Is it an enum?
fmt.Sprintf("--caCertFile=%s%s", kbltCAMountPath, kbltCAMountedFile), | ||
}, | ||
Resources: corev1.ResourceRequirements{}, | ||
Args: args, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much nicer!
7d684ba
to
1d3862a
Compare
1d3862a
to
129fd66
Compare
26cfee9
to
2e7f3a1
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lmzuccarelli, sherine-k 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:
Approvers can indicate their approval by writing |
/lgtm |
@lmzuccarelli: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/lgtm |
@lmzuccarelli: This pull request references CFE-927 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/label docs-approved |
@lmzuccarelli: This pull request references CFE-927 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This change is to ensure functionality for RFE-2052
The PR for the agent is related and depends on this PR being merged
The scripts have been tested using the container specified by the Dockerfile.dev file
Example output
podman run --privileged --cap-add=NET_ADMIN -e NODE_IP=127.0.0.1 -e EXECUTE_SCRIPT=/tmp/scripts/metrics.sh -p 9000:9000 -it quay.io//node-observability-scripts:dev ./node-observability-agent --mode scripting --storage
/tmp/results --loglevel debug
In a new terminal execute
curl -v http://127.0.0.1:9000/node-observability-scripting
Podman output
WARN[0000] Error validating CNI config file /home/lzuccarelli/.config/cni/net.d/kind.conflist: [failed to find plugin "dnsname" in path [/usr/local/libexec/cni /usr/libexec/cni /usr/local/lib/cni /usr/lib/cni /opt/cni/bin]]
INFO[0000] Starting node-observability-agent version: "v0.0.0-unknown", commit: "00801d1", build date: "2023-08-29T11:26:31Z", go version: "go1.19.10", GOOS: "linux", GOARCH: "amd64" at log level trace
INFO[0000] Start listening on tcp://0.0.0.0:9000 module=server
INFO[0000] Targeting node 127.0.0.1 module=server
INFO[0006] start handling status request module=handler
INFO[0006] agent is ready module=handler
INFO[0018] start handling status request module=handler
INFO[0018] previous profiling is still ongoing, runID: e669a8cb-b9b0-4f21-a57d-9a2228e8bc9b module=handler
INFO[0025] Metrics collection completed module=handler
INFO[0025] successfully finished running Scripting - e669a8cb-b9b0-4f21-a57d-9a2228e8bc9b: 2023-09-08 10:55:41.63103853 +0000 UTC m=+15.849803234 -> 2023-09-08 10:55:51.726152976 +0000 UTC m=+25.944917673 module=handler
To test locally using images in a cluster please follow the README (in this repo) see section