Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add additional properties in crd for metrics obj #2278

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

yashmehrotra
Copy link
Member

apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: domain
spec:
  schedule: "@every 1m"
  http:
    - name: myDomain
      url: https://mydomain.com/
      thresholdMillis: 20000
      responseCodes: [201, 200, 301]
      metrics:
        - name: canary_checker_custom_http_status
          type: gauge
          value: "1"
          labels:
            - name: check_name
              valueExpr: check.name
            - name: url
              valueExpr: check.url

Was giving this error (Reported on Slack)

Error from server (BadRequest): error when creating "myDomain.yaml": Canary in version "v1" cannot be handled as a Canary: strict decoding error: unknown field "spec.http[0].metrics[0].labels", unknown field "spec.http[0].metrics[0].name", unknown field "spec.http[0].metrics[0].type", unknown field "spec.http[0].metrics[0].value"

@moshloop moshloop merged commit b7907ef into master Oct 23, 2024
16 checks passed
@moshloop moshloop deleted the fix-metrics-crd branch October 23, 2024 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants