aporeto-inc / trireme-lib

Simple, scalable and secure application segmentation
https://trireme.io
Apache License 2.0
300 stars 51 forks source link

Making Resync a blocked operation for the PodMonitor (master) #947

Closed mheese closed 4 years ago

mheese commented 4 years ago

This will make Resync() a blocked operation for the PodMonitor as discussed with @sibicramesh earlier today. It also calls Resync during Run() so that it is guaranteed to have run and reconciled every pod once first before returning.

This is required for the 3.13 enforcer which removes stale PUs on startup and would otherwise potentially delete and create them again on a restart.

mheese commented 4 years ago

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0

[
  {
    "project": "wait-for-pods-master",
    "component": "trireme-lib",
    "pr-id": "947",
    "commit-sha": "03621d579447807dfdff060986715cf03e247023",
    "pipeline": "master"
  },
  {
    "project": "wait-for-pods-master",
    "component": "enforcerd",
    "pr-id": "1546",
    "commit-sha": "374eb174384193a5c1cdf16536739bc75726cdb4",
    "pipeline": "master"
  }
]
mheese commented 4 years ago

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0

[
  {
    "project": "wait-for-pods-master",
    "component": "enforcerd",
    "pr-id": "1546",
    "commit-sha": "374eb174384193a5c1cdf16536739bc75726cdb4",
    "pipeline": "master"
  },
  {
    "project": "wait-for-pods-master",
    "component": "trireme-lib",
    "pr-id": "947",
    "commit-sha": "39db6b05cc16816e1414a05da7107a57c335f212",
    "pipeline": "master"
  }
]
codecov[bot] commented 4 years ago

Codecov Report

Merging #947 into master will increase coverage by 0.11%. The diff coverage is 74.19%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #947      +/-   ##
=========================================
+ Coverage   54.78%   54.9%   +0.11%     
=========================================
  Files         123     123              
  Lines       11667   11724      +57     
=========================================
+ Hits         6392    6437      +45     
- Misses       4658    4668      +10     
- Partials      617     619       +2
Impacted Files Coverage Δ
monitor/internal/pod/monitor.go 0% <0%> (ø) :arrow_up:
monitor/internal/pod/controller.go 72.88% <66.66%> (+0.2%) :arrow_up:
monitor/internal/pod/resync.go 84.12% <84%> (-1.59%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 00b3a78...39db6b0. Read the comment docs.