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

Updates to trace config format as well as bugfix in sim runner #143

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

drmorr0
Copy link
Contributor

@drmorr0 drmorr0 commented Oct 9, 2024

  • I certify that this PR does not contain any code that has been generated with GitHub Copilot or any other AI-based code generation tool, in accordance with this project's policies.

Description

  • Make the podSpecTemplatePath field optional, so that things like ServiceAccounts and ConfigMaps can be traced
  • make the leading '/' in the GVK string optional
  • fix regression in deleting objects on simulation replay

Testing done

  • Tests added for GVK ser/de
  • Test added for sim runner that catches the regression

Additional info

Related to #137

@drmorr0
Copy link
Contributor Author

drmorr0 commented Oct 9, 2024

Kubernetes Object DAG

%%{init: {'themeVariables': {'mainBkg': '#ddd'}}}%%
graph LR

classDef default color:#000
subgraph global
  direction LR
  global/simkube[<b>Namespace</b><br>simkube]
%% DELETED OBJECTS START
%% DELETED OBJECTS END
end

subgraph sk-tracer
  direction LR
  simkube/sk-tracer-svc[<b>Service</b><br>sk-tracer-svc]
  simkube/sk-tracer-depl[<b>Deployment</b><br>sk-tracer-depl]
  simkube/sk-tracer-sa[<b>ServiceAccount</b><br>sk-tracer-sa]
  sk-tracer/sk-tracer-crb[<b>ClusterRoleBinding</b><br>sk-tracer-crb]
  simkube/sk-tracer-tracer-config[<b>ConfigMap</b><br>sk-tracer-tracer-config]
  simkube/sk-tracer-sa--->simkube/sk-tracer-depl
  sk-tracer/sk-tracer-crb--->simkube/sk-tracer-depl
  simkube/sk-tracer-tracer-config--->simkube/sk-tracer-depl
%% DELETED OBJECTS START
%% DELETED OBJECTS END
end

subgraph sk-ctrl
  direction LR
  simkube/sk-ctrl-depl[<b>Deployment</b><br>sk-ctrl-depl]
  simkube/sk-ctrl-sa[<b>ServiceAccount</b><br>sk-ctrl-sa]
  sk-ctrl/sk-ctrl-crb[<b>ClusterRoleBinding</b><br>sk-ctrl-crb]
  simkube/sk-ctrl-sa--->simkube/sk-ctrl-depl
  sk-ctrl/sk-ctrl-crb--->simkube/sk-ctrl-depl
%% DELETED OBJECTS START
%% DELETED OBJECTS END
end

global--->sk-tracer
global--->sk-ctrl

%% STYLE DEFINITIONS START
  style simkube/sk-tracer-tracer-config fill:#6ce
%% STYLE DEFINITIONS END
Loading

New object
Deleted object
Updated object
Updated object (causes pod recreation)

Detailed Diff

simkube/sk-tracer-tracer-config: Changed

root['data']['tracer-config.yml']:
"---\ntrackedObjects:\n  apps/v1.Deployment:\n    podSpecTemplatePath: /spec/template\n" --> "---\ntrackedObjects:\n  apps/v1.Deployment:\n    podSpecTemplatePath: /spec/template\n  v1.ServiceAccount: {}\n  v1.ConfigMap: {}\n"

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 97.43590% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.57%. Comparing base (bdd05b7) to head (8518d5b).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
sk-driver/src/runner.rs 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #143      +/-   ##
==========================================
+ Coverage   72.38%   72.57%   +0.19%     
==========================================
  Files          49       49              
  Lines        2723     2731       +8     
==========================================
+ Hits         1971     1982      +11     
+ Misses        752      749       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@drmorr0 drmorr0 force-pushed the drmorr/trace-config-updates branch from 0aced6f to 8518d5b Compare October 9, 2024 22:01
@drmorr0 drmorr0 merged commit ab9a909 into master Oct 9, 2024
10 checks passed
@drmorr0 drmorr0 deleted the drmorr/trace-config-updates branch October 9, 2024 22:06
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.

1 participant