Skip to content

Instantly share code, notes, and snippets.

View aditya-konarde's full-sized avatar
☁️
💻

Aditya Konarde aditya-konarde

☁️
💻
View GitHub Profile
apiVersion: v1
kind: Template
metadata:
name: prometheus-operator
objects:
- apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus-operator
# This builds the silence URL. We exclude the alertname in the range
# to avoid the issue of having trailing comma separator (%2C) at the end
# of the generated URL
{{ define "__alert_silence_link" -}}
{{ .ExternalURL }}/#/silences/new?filter=%7B
{{- range .CommonLabels.SortedPairs -}}
{{- if ne .Name "alertname" -}}
{{- .Name }}%3D"{{- .Value -}}"%2C%20
{{- end -}}
{{- end -}}
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: app-sre
# ToDo eliminate the namespace field, doesn't work well with saasherder.
namespace: app-sre-prometheus
spec:
# Additional scrape config, for external services
# Requires a secret with referenced name to be present
additionalScrapeConfigs:
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
creationTimestamp: null
labels:
prometheus: app-sre
role: alert-rules
name: vault-alertrules
spec:
groups:
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
endpoint: metrics
k8s-app: telemeter-server
name: telemeter-servermon
namespace: ${NAMESPACE}
spec:
endpoints:
@aditya-konarde
aditya-konarde / runtest-sample-log.txt
Created December 6, 2017 10:40
end-to-end-runtest
Waiting for the statusIcon to be present
EE POC test - Creating space: dec61512547397721
Lets wait for the URL to contain the space URL: https://openshift.io/****/testdec61512547397721
verify that Jenkins pod is still running
Waiting for the statusIcon to be present
Verify that only one pipeline is created - https://github.com/fabric8-ui/fabric8-ui/issues/1707
Verify that pipeline is displayed - https://github.com/openshiftio/openshift.io/issues/431
OpenShiftIoStartPage - clicked element: loginButton
OpenShiftIoRHDLoginPage - clicked element:rhdUsernameField
OpenShiftIoRHDLoginPage - clicked element:rhdPasswordField
@aditya-konarde
aditya-konarde / check_image.sh
Created October 27, 2017 07:04
Check images
#!/bin/bash
# Show command before executing
set -x
# Exit on error
set -e
# Check the existence of image on registry.centos.org