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

update tekton to use epoch #666

Merged
merged 1 commit into from
Sep 21, 2022
Merged
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: 2 additions & 0 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Help:
| buildConfig | supported | requires exporter committime-exporter |
| s2i | supported | requires exporter committime-image-exporter with provider=image |

An example values.yaml file for the tekton-demo.sh is here: tekton-demo-setup/tekton_demo_values.yaml

## demo.sh

See the [demo docs in the official pelorus documentation.](https://pelorus.readthedocs.io/en/latest/Demo/)
9 changes: 7 additions & 2 deletions demo/tekton-demo-setup/03-build-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,13 @@ objects:
script: |
set -ex
find /workspace
cd /workspace/debug
git log -1 --format=%cd > "$(results.commit-time.path)"
cd /workspace/debug
printf "epoch timestamps are recommended: git log -1 --format=%ct"
KevinMGranger marked this conversation as resolved.
Show resolved Hide resolved
epoch=`git log -1 --format=%ct`
human=`date -d @$epoch`
printf "epoch time: " + $epoch
printf "human readable time: " + $human
echo $epoch > "$(results.commit-time.path)"
- name: debug-time-last-commit
image: ubi9/toolbox
script: |
Expand Down
59 changes: 59 additions & 0 deletions demo/tekton-demo-setup/tekton_demo_values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Default values for deploy.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# to reset password: htpasswd -s -b -n internal changeme
openshift_prometheus_htpasswd_auth: internal:{SHA}+pvrmeQCmtWmYVOZ57uuITVghrM=
openshift_prometheus_basic_auth_pass: changeme
extra_prometheus_hosts:

prometheus_retention_size: 1GB


# Uncomment this if your cluster serves privately signed certificates
# custom_ca: true

deployment:
labels:
app.kubernetes.io/component: prometheus
app.kubernetes.io/name: pelorus
app.kubernetes.io/version: v0.33.0

exporters:
instances:
- app_name: deploytime-exporter
exporter_type: deploytime
extraEnv:
- name: LOG_LEVEL
value: DEBUG
- name: NAMESPACES
value: mongo-persistent,basic-python-tekton
- app_name: committime-exporter
exporter_type: committime
extraEnv:
- name: LOG_LEVEL
value: DEBUG
- name: NAMESPACES
value: mongo-persistent,basic-python-tekton
- app_name: committime-image-exporter
exporter_type: committime
extraEnv:
- name: LOG_LEVEL
value: DEBUG
- name: PROVIDER
value: image
- app_name: failure-exporter
exporter_type: failure
env_from_secrets:
- github-secret
extraEnv:
- name: LOG_LEVEL
value: DEBUG
- name: PROVIDER
value: github
- name: PROJECTS
value: <org>/mig-demo-apps,<org>/pelorus
- name: APP_LABEL
value: production_issue/name

snapshot_schedule: "@monthly"