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

Tekton compatibility for committime exporter #333

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/pelorus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 1.4.7
version: 1.4.8

dependencies:
- name: exporters
Expand Down
10 changes: 10 additions & 0 deletions charts/pelorus/charts/exporters/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ rules:
verbs:
- list
- get
- apiGroups:
- tekton.dev
resources:
KevinMGranger marked this conversation as resolved.
Show resolved Hide resolved
- pipelineruns
- pipelines
- tasks
- taskruns
verbs:
- list
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
4 changes: 2 additions & 2 deletions demo/demo-tekton
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ while true; do
case $a in
1* )
echo "We've modified this file, time to build and deploy a new version. Times modified: $counter" | tee -a "$python_example_txt"
git commit -m "modifying python example, number $counter" -- "$python_example_txt"
git push origin "$current_branch"
git commit --no-verify -m "modifying python example, number $counter" -- "$python_example_txt"
git push "$url" "$current_branch"

run_pipeline

Expand Down
6 changes: 6 additions & 0 deletions exporters/committime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

@attr.define
class CommitMetric:
"""
CommitMetric holds information about a certain commit.
Only the commit_timestamp, namespace, name, commit_hash,
and image_hash fields are exposed to prometheus.
"""

name: str = attr.field()
labels: Any = attr.field(default=None, kw_only=True)
namespace: Optional[str] = attr.field(default=None, kw_only=True)
Expand Down
Loading