From 54c5e501835902793e3515abd5192ab2a4d8722b Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Fri, 11 Oct 2024 22:33:10 -0400 Subject: [PATCH] re-enable ecommerce-exporter --- .../ecommerce-exporter-deployment.yaml | 11 ++ .../ecommerce-exporter/ecommerce-exporter.yml | 131 ++++-------------- kustomize/env/prod/kustomization.yaml | 13 +- .../overlays/monitoring/kustomization.yaml | 2 +- 4 files changed, 43 insertions(+), 114 deletions(-) diff --git a/kustomize/bases/ecommerce-exporter/ecommerce-exporter-deployment.yaml b/kustomize/bases/ecommerce-exporter/ecommerce-exporter-deployment.yaml index 6983e57..cb009fb 100644 --- a/kustomize/bases/ecommerce-exporter/ecommerce-exporter-deployment.yaml +++ b/kustomize/bases/ecommerce-exporter/ecommerce-exporter-deployment.yaml @@ -11,9 +11,20 @@ spec: labels: app.kubernetes.io/name: ecommerce-exporter spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + # FIXME + - key: kubernetes.io/arch + operator: In + values: + - amd64 containers: - name: ecommerce-exporter image: badjware/ecommerce-exporter + imagePullPolicy: Always args: ['-c', '/config/ecommerce-exporter.yml'] resources: requests: diff --git a/kustomize/env/prod/configurations/ecommerce-exporter/ecommerce-exporter.yml b/kustomize/env/prod/configurations/ecommerce-exporter/ecommerce-exporter.yml index 12aa4e0..682a719 100644 --- a/kustomize/env/prod/configurations/ecommerce-exporter/ecommerce-exporter.yml +++ b/kustomize/env/prod/configurations/ecommerce-exporter/ecommerce-exporter.yml @@ -1,107 +1,26 @@ products: - # - name: i5-12600k - # targets: - # - parser: html - # url: https://www.amazon.ca/Intel-i5-12600K-Desktop-Processor-Unlocked/dp/B09FX4D72T/ - # selector: '.priceToPay .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.FinalPrice' - # - 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: '.priceToPay .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.FinalPrice' - # - 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' - # # - name: NH-U12S redux - # # targets: - # # - parser: html - # # url: https://www.amazon.ca/Noctua-NH-U12S-Performance-Cooler-redux-1700/dp/B08WPDD6GD/ - # # selector: '.priceToPay .a-offscreen::text' - # # - parser: json - # # url: https://www.newegg.ca/product/api/ProductRealtime?ItemNumber=9SIAB98DXP3361&RecommendItem=&BestSellerItemList=9SIB9H0H0H0660&IsVATPrice=true - # # selector: '.MainItem.FinalPrice' - # # - parser: json - # # url: https://www.bestbuy.ca/api/offers/v1/products/16580299/offers?postalCode=J4L - # # selector: '.[] | .salePrice,.regularPrice' - # - name: ASUS Prime B660M-A D4 - # targets: - # - parser: html - # url: https://www.amazon.ca/Prime-B660M-D4-Motherboard-Type-C/dp/B09NWF1JQC - # selector: '.priceToPay .a-offscreen::text' - # - parser: json - # url: https://www.newegg.ca/product/api/ProductRealtime?ItemNumber=13-119-541&RecommendItem=&BestSellerItemList=9SIADGEGZU2598&IsVATPrice=true - # selector: '.MainItem.FinalPrice' - # - parser: json - # url: https://www.bestbuy.ca/api/offers/v1/products/15954559/offers?postalCode=J4L - # selector: '.[] | .salePrice,.regularPrice' - # - parser: html - # url: https://www.canadacomputers.com/product_info.php?cPath=26_1842_3869&item_id=213279 - # selector: '.price-show-panel .h2-big strong::text' - # - parser: html - # url: https://www.memoryexpress.com/Products/MX00119756 - # selector: '.GrandTotal' - # - name: MSI PRO B660M-A - # targets: - # - parser: html - # url: https://www.amazon.ca/MSI-PRO-B660M-DDR4-Motherboard/dp/B09NTMRRTL/ - # selector: '.priceToPay .a-offscreen::text' - # - parser: json - # url: https://www.newegg.ca/product/api/ProductRealtime?ItemNumber=13-144-531&RecommendItem=&BestSellerItemList=9SIA9H5HS67633%2C9SIA7BBHWY8396%2C9SIADDZJ183773&IsVATPrice=true - # selector: '.MainItem.FinalPrice' - # - parser: json - # url: https://www.bestbuy.ca/api/offers/v1/products/16486621/offers?postalCode=J4L - # selector: '.[] | .salePrice,.regularPrice' - # - parser: html - # url: https://www.canadacomputers.com/product_info.php?cPath=26_1842_3869&item_id=213893 - # selector: '.price-show-panel .h2-big strong::text' - # - parser: html - # url: https://www.memoryexpress.com/Products/MX00120369 - # selector: '.GrandTotal' - # - name: ASUS Prime Z690M-Plus D4 - # targets: - # - parser: html - # url: https://www.amazon.ca/Z690M-Plus-D4-Motherboard-Connector-Thunderbolt/dp/B09JRW446Z/ - # selector: '.priceToPay .a-offscreen::text' - # - parser: json - # url: https://www.newegg.ca/product/api/ProductRealtime?ItemNumber=13-119-515 - # selector: '.MainItem.FinalPrice' - # - parser: json - # url: https://www.bestbuy.ca/api/offers/v1/products/15892764/offers?postalCode=J4L - # selector: '.[] | .salePrice,.regularPrice' - # - parser: html - # url: https://www.canadacomputers.com/product_info.php?cPath=26_1842_3869&item_id=209060 - # selector: '.price-show-panel .h2-big strong::text' - # - parser: html - # url: https://www.memoryexpress.com/Products/MX00119111 - # selector: '.GrandTotal' - # - name: 8Bitdo Ultimate Bluetooth Controller - # targets: - # - parser: html - # url: https://www.amazon.ca/8Bitdo-Ultimate-Bluetooth-Controller-Charging/dp/B0B9BGJVLL/ - # selector: '.priceToPay .a-offscreen::text' - # - name: Sony S100F 2.0 CH - # targets: - # - parser: html - # url: https://www.amazon.ca/Sony-HTS100F-Surround-Soundbar-Bluetooth/dp/B0797MY6JB?th=1 - # selector: '.priceToPay .a-offscreen::text' \ No newline at end of file + - name: MSI MPG 341CQPX + targets: + - parser: html + url: https://www.amazon.ca/341CQPX-QD-OLED-34-inch-Response-Adjustable/dp/B0D685SYKN/ref=sr_1_2?crid=17QMYPVZHHNMW&dib=eyJ2IjoiMSJ9.ET9i_Uec4V9O-c9duaj_auojfR7_wu1-uMiw6w_5eR59ya6FKGU1kvCyOQVB04fn63EN3IOcJELExtoxYuI-FGemAG2etf7O-1TS1QR91hM.-cPcYzoyajo4QPO4UvIxmEOEfMHyFnIyfPrQTs7Ta4c&dib_tag=se&keywords=MSI+MPG+341CQPX&qid=1728517018&sprefix=msi+mpg+341cqpx%2Caps%2C191&sr=8-2 + selector: '#corePrice_feature_div .a-offscreen::text' + - parser: html + url: https://www.newegg.ca/MSI-MPG-341CQPX-QD-OLED-34-UWQHD-240-Hz-Metallic-Black/p/N82E16824475392 + selector: '.price-current strong::text' + - parser: json + url: https://www.bestbuy.ca/api/offers/v1/products/17978432/offers?postalCode=J4K + selector: '.[] | .salePrice,.regularPrice' + - parser: html + url: https://www.canadacomputers.com/product_info.php?cPath=22_700_1429&item_id=261051 + selector: '.price-show-panel .h2-big strong::text' + - parser: html + url: https://www.memoryexpress.com/Products/MX00129246 + selector: '.GrandTotal' + - name: Alienware AW3423DWF + targets: + - parser: html + url: https://www.amazon.ca/Alienware-AW3423DWF-Curved-QD-OLED-Monitor/dp/B0BP94J8VD/ref=sr_1_2?crid=S5MPJ56DUXES&dib=eyJ2IjoiMSJ9.HLWGWVHzSjh8xLx-2pN_kLlI5bhG2Tm6wR1sS_La4Ph5tfyL9EmpZxX7watSiQgy1mwKaIRui9_WBnijppmeCeHSkV_nx82T1tv1VbJzTvpPXq7CWW_rXcD7Gy3eK3hQMkTcsUm-R3btmiMuAvRZPSZADdqVLxNIwPSvrq-3gtsEWmL2M1sqfW-ICylote7fDx7E3vGMYLJxD38Kdg6CrB2pVn6rcSl7WoZoWCEKyOyWwoXo-JsevZnsYnhnT1NVOOypNVl7xcdessdUxnNoVfAKivvkRBi0SY6uTG0ZyMA.eVCpt_jqUlTKITpXBaMoL7P4nJyVLABFRRGaARoBB2o&dib_tag=se&keywords=AW3423DWF&qid=1728528599&sprefix=aw3423dwf%252Caps%252C86&sr=8-2 + selector: '#corePrice_feature_div .a-offscreen::text' + - parser: html + url: https://www.dell.com/en-ca/shop/alienware-34-curved-qd-oled-gaming-monitor-aw3423dwf/apd/210-bfrp/monitors-monitor-accessories + selector: '.ps-dell-price' \ No newline at end of file diff --git a/kustomize/env/prod/kustomization.yaml b/kustomize/env/prod/kustomization.yaml index 00d4172..1facbbc 100644 --- a/kustomize/env/prod/kustomization.yaml +++ b/kustomize/env/prod/kustomization.yaml @@ -47,13 +47,12 @@ images: - name: ghcr.io/sillytavern/sillytavern newTag: 1.12.4 -# secretGenerator: -# - name: prometheus-additional-scrape-configs -# type: Opaque -# namespace: monitoring -# behavior: replace -# files: -# - prometheus-additional.yaml=configurations/prometheus/prometheus-additional.yaml +configMapGenerator: + - name: ecommerce-exporter-config + namespace: monitoring + behavior: replace + files: + - ecommerce-exporter.yml=configurations/ecommerce-exporter/ecommerce-exporter.yml # allow "kubectl apply -l app.kubernetes.io/managed-by=kustomize --prune ..." commonLabels: diff --git a/kustomize/overlays/monitoring/kustomization.yaml b/kustomize/overlays/monitoring/kustomization.yaml index 595df80..748d5ab 100644 --- a/kustomize/overlays/monitoring/kustomization.yaml +++ b/kustomize/overlays/monitoring/kustomization.yaml @@ -5,7 +5,7 @@ resources: # - ../../bases/node-exporter - ../../bases/blackbox-exporter - ../../bases/snmp-exporter - # - ../../bases/ecommerce-exporter + - ../../bases/ecommerce-exporter - ../../bases/kube-state-metrics - ../../bases/grafana-agent - ../../bases/grafana