Skip to content

Commit

Permalink
Use generatename
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewstuart committed Oct 11, 2022
1 parent 45ee2fd commit 82bd566
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func main() {
patch = append(patch, ps...)
}

ctrPatches.WithLabelValues(pod.Namespace, pod.Name).Inc()
ctrPatches.WithLabelValues(pod.Namespace, pod.GenerateName).Inc()
lg.WithField("patch", patch).Info("patching")

bs, _ := json.Marshal(patch)
Expand Down Expand Up @@ -270,7 +270,7 @@ func main() {
lg.WithError(err).Error("error generating pod deletion event")
}

ctrDeletes.WithLabelValues(pod.Namespace, pod.Name).Inc()
ctrDeletes.WithLabelValues(pod.Namespace, pod.GenerateName).Inc()

err := cs.CoreV1().Pods(pod.Namespace).Delete(ctx, pod.Name, metav1.DeleteOptions{})
if err != nil {
Expand Down

0 comments on commit 82bd566

Please sign in to comment.