1
0
Fork 0

add ecommerce-exporter

This commit is contained in:
Massaki Archambault 2022-11-01 00:45:57 -04:00
parent f40ebdcb96
commit da668d6ae6
5 changed files with 99 additions and 0 deletions

View File

@ -0,0 +1,49 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ecommerce-exporter
spec:
selector:
matchLabels:
app.kubernetes.io/name: ecommerce-exporter
template:
metadata:
labels:
app.kubernetes.io/name: ecommerce-exporter
spec:
containers:
- name: ecommerce-exporter
image: badjware/ecommerce-exporter
args: ['-c', '/config/ecommerce-exporter.yml']
resources:
requests:
memory: 20Mi
cpu: 100m
limits:
memory: 20Mi
cpu: 100m
ports:
- containerPort: 8000
name: http
volumeMounts:
- name: ecommerce-exporter-config
mountPath: /config
volumes:
- name: ecommerce-exporter-config
configMap:
name: ecommerce-exporter-config
---
apiVersion: v1
kind: Service
metadata:
name: ecommerce-exporter
labels:
app.kubernetes.io/name: ecommerce-exporter
monitor: prometheus
spec:
selector:
app.kubernetes.io/name: ecommerce-exporter
ports:
- name: http
port: 8000
targetPort: http

View File

@ -0,0 +1,7 @@
resources:
- ecommerce-exporter-deployment.yaml
configMapGenerator:
- name: ecommerce-exporter-config
literals:
- ecommerce-exporter.yml=

View File

@ -2,6 +2,7 @@ bases:
- ../../bases/prometheus
# - ../../bases/node-exporter
- ../../bases/blackbox-exporter
- ../../bases/ecommerce-exporter
- ../../bases/kube-state-metrics
- ../../bases/grafana-agent
- servicemonitors/any-namespaces-http.yaml

View File

@ -0,0 +1,35 @@
products:
- name: i5-12600k
targets:
- parser: html
url: https://www.amazon.ca/Intel-i5-12600K-Desktop-Processor-Unlocked/dp/B09FX4D72T/
selector: '.a-offscreen::text'
- parser: json
url: https://www.newegg.ca/product/api/ProductRealtime?ItemNumber=19-118-347&RecommendItem=&BestSellerItemList=9SIAA4YJ3X7676%2C9SIADGEGRN9541%2C9SIA7BBGRN9510&IsVATPrice=true
selector: '.MainItem.UnitCost'
- parser: json
url: https://www.bestbuy.ca/api/offers/v1/products/15778668/offers?postalCode=J4L
selector: '.[] | .salePrice,.regularPrice'
- parser: html
url: https://www.canadacomputers.com/product_info.php?cPath=4_65_3860&item_id=201282
selector: '.price-show-panel .h2-big strong::text'
- parser: html
url: https://www.memoryexpress.com/Products/MX00119045
selector: '.GrandTotal'
- name: i7-12700k
targets:
- parser: html
url: https://www.amazon.ca/Intel-i7-12700K-Desktop-Processor-Unlocked/dp/B09FXNVDBJ/
selector: '.a-offscreen::text'
- parser: json
url: https://www.newegg.ca/product/api/ProductRealtime?ItemNumber=19-118-343&RecommendItem=&BestSellerItemList=9SIAA4YGC82324%2C9SIADGEGMY7603%2C9SIAVH1J0A6685&IsVATPrice=true
selector: '.MainItem.UnitCost'
- parser: json
url: https://www.bestbuy.ca/api/offers/v1/products/15778672/offers?postalCode=J4L
selector: '.[] | .salePrice,.regularPrice'
- parser: html
url: https://www.canadacomputers.com/product_info.php?cPath=4_65_3860&item_id=201280
selector: '.price-show-panel .h2-big strong::text'
- parser: html
url: https://www.memoryexpress.com/Products/MX00119043
selector: '.GrandTotal'

View File

@ -30,6 +30,13 @@ images:
- name: redis
newTag: 6.2.5
configMapGenerator:
- name: ecommerce-exporter-config
namespace: monitoring
behavior: replace
files:
- ecommerce-exporter.yml=configurations/ecommerce-exporter/ecommerce-exporter.yml
secretGenerator:
- name: drone-secret
type: Opaque