pulumi-kubernetes-operator icon indicating copy to clipboard operation
pulumi-kubernetes-operator copied to clipboard

operator not exposing `stacks_failing` metric

Open mike-chen-samsung opened this issue 3 years ago • 1 comments

What happened?

The stacks_failing metric never shows up in the pulumi-k8s-operator metrics endpoint

Steps to reproduce

  1. Install the pulumi-k8s-operator v1.7.0 as directed by documentation.
  2. Create a Stack resource that will succeed
  3. Wait to see that the operator successfully ups the stack. Check that the Stack status reports succeeded
  4. Change the code in the Pulumi project referenced in step 2 so that it will fail on an up
  5. See that the Stack status reports failed
  6. kubectl exec into the pulumi-k8s-operator pod and curl localhost:8383/metrics
  7. See that there is no metric named stacks_failing (although you will see stacks_active)

Expected Behavior

I expect to see stacks_failing in the metrics endpoint

Actual Behavior

stacks_failing is missing in the metrics endpoint

Versions used

pulumi-k8s-operator: 1.7.0

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

mike-chen-samsung avatar Aug 01 '22 22:08 mike-chen-samsung

I noticed that the code is still referencing v1alpha1, but the latest Stack API version is v1: https://github.com/pulumi/pulumi-kubernetes-operator/blob/ef96c6d7cd4aeeb185e757f0f5dcac445ef62c53/pkg/controller/stack/metrics.go#L46

bob-bins avatar Aug 01 '22 23:08 bob-bins

Fixed in #308

viveklak avatar Aug 24 '22 01:08 viveklak