DataDog / extendeddaemonset

Kubernetes Extended Daemonset controller
Apache License 2.0
98 stars 13 forks source link

fix canary fail metric #60

Closed celenechang closed 3 years ago

celenechang commented 3 years ago

What does this PR do?

Follow up to https://github.com/DataDog/extendeddaemonset/pull/56

Since we set Status.Canary to nil when the canary deployment fails, this metric will never change.

Motivation

Additional Notes

Describe your test plan

Deploy a canary EDS, and then exec onto the EDS controller pod and check the fail metric from the output of curl localhost:8080/ksmetrics . Fail the canary and check the metric again, and make sure it changed to 1.

codecov-io commented 3 years ago

Codecov Report

Merging #60 into master will increase coverage by 0.09%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #60      +/-   ##
==========================================
+ Coverage   36.65%   36.75%   +0.09%     
==========================================
  Files          29       29              
  Lines        1574     1570       -4     
==========================================
  Hits          577      577              
+ Misses        923      919       -4     
  Partials       74       74              
Flag Coverage Δ
unittests 36.75% <0.00%> (+0.09%) :arrow_up:

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

Impacted Files Coverage Δ
controllers/extendeddaemonset/metrics.go 0.63% <0.00%> (+0.01%) :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 a8d38a8...e17547a. Read the comment docs.