man-group / dapr-sidekick-dotnet

Dapr Sidekick for .NET - a lightweight lifetime management component for Dapr
Apache License 2.0
175 stars 21 forks source link

Add support for DAPRSIDEKICK_XXX variables #14

Closed badgeratu closed 3 years ago

badgeratu commented 3 years ago

Description

It is now possible to define DAPRSIDEKICK_XXX variables to set or override top-level configuration options. Note that this feature is limited to those options defined in the DaprProcessOptions base class which will equalluy apply to either the Sidecar, Placement or Sentry processes depending which is configured.

For example you can now set DAPRSIDEKICK_ENABLED=false to completely disable Dapr Sidekick, which is useful if you are running inside a pod/container where Dapr is injected separately.

Issue reference

Fixes Issue #9

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

codecov-commenter commented 3 years ago

Codecov Report

Merging #14 (92908a4) into main (ee1044c) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
+ Coverage   88.88%   88.90%   +0.01%     
==========================================
  Files         104      104              
  Lines        2231     2235       +4     
  Branches      453      453              
==========================================
+ Hits         1983     1987       +4     
  Misses        159      159              
  Partials       89       89              
Flag Coverage Δ
net35 85.43% <ø> (ø)
net48 86.78% <ø> (+0.05%) :arrow_up:
net5.0 88.30% <100.00%> (+0.02%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Man.Dapr.Sidekick/Options/DaprOptions.cs 100.00% <ø> (ø)
...NetCore/DaprSidekickServiceCollectionExtensions.cs 97.14% <100.00%> (+0.36%) :arrow_up:

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 ee1044c...92908a4. Read the comment docs.