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

Prometheus gate #440

Merged
merged 1 commit into from
Jul 31, 2020
Merged

Prometheus gate #440

merged 1 commit into from
Jul 31, 2020

Conversation

iancoffey
Copy link
Member

@iancoffey iancoffey commented Jul 23, 2020

Changes

This adds a new Task prometheus-gate, aimed at for keeping Tasks and Pipelines gated (eg intentionally blocked) until a certain criteria is met. This Task uses Prometheus range query to obtain range data for the provided query, and asserts all values returned by prometheus are at/above/below target for N times, or fails the pipeline task. The source for the simple gate is here.

Is this a good fit for the catalog? I intend to follow with creating a custom task from this once I have learned more. More details in the linked issue.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Yaml file complies with yamllint rules.
  • Complies with Catalog Orgainization TEP, see example. Note An issue has been filed to automate this validation
    • File path follows <kind>/<name>/<version>/name.yaml

    • Has README.md at <kind>/<name>/<version>/README.md

    • Has mandatory metadata.labels - app.kubernetes.io/version the same as the <version> of the resource

    • Has mandatory metadata.annotations tekton.dev/pipelines.minVersion

    • mandatory spec.description follows the convention

        ```
      
        spec:
          description: >-
            one line summary of the resource
      
            Paragraph(s) to describe the resource.
        ```
      

See the contribution guide
for more details.


@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 23, 2020
Copy link
Member

@vinamra28 vinamra28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • It would be nice if you could add the task with all the files in the task directory
  ./task/         👈 the kind of the resource 
      /prometheus-gate       👈 definition file must have same name
        /0.1
          /README.md     👈 [optional] since there can be a fallback
          /prometheus-gate.yaml   👈 the file name must be resource name
          /samples
           /gate.yaml
           /nginx.yaml

Please see : #389

task/prometheus-gate/README.md Outdated Show resolved Hide resolved
task/prometheus-gate/examples/gate.yaml Outdated Show resolved Hide resolved
task/prometheus-gate/examples/nginx.yaml Outdated Show resolved Hide resolved
task/prometheus-gate/task.yaml Outdated Show resolved Hide resolved
@iancoffey
Copy link
Member Author

This could use another review, thanks!

Copy link
Member

@vinamra28 vinamra28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also have something in the README or in samples as how to use this task 🙂

task/prometheus-gate/0.1/prometheus-gate.yaml Outdated Show resolved Hide resolved
@iancoffey
Copy link
Member Author

@vinamra28 I added a better samples section and readme 👍

@chmouel
Copy link
Member

chmouel commented Jul 30, 2020

The CI error seems legit and due of some yaml linting issue..

@iancoffey
Copy link
Member Author

@vinamra28 thanks, CI is passing now :)

Copy link
Member

@vinamra28 vinamra28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just last one suggestion could you please squash all your commits 😅 otherwise
/lgtm

task/prometheus-gate/0.1/prometheus-gate.yaml Outdated Show resolved Hide resolved
@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2020
@chmouel
Copy link
Member

chmouel commented Jul 30, 2020

Looking good but the squashing please thanks

@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2020
@vinamra28
Copy link
Member

thank you for the PR 👍
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2020
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2020
@iancoffey
Copy link
Member Author

Re-squashed and ready for re-review

@vinamra28
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2020
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/meow

@tekton-robot
Copy link

@vdemeester: cat image

In response to this:

/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2020
@tekton-robot tekton-robot merged commit a59f3ca into tektoncd:master Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants