Verified Commit cd877c78 authored by blint's avatar blint 😶
Browse files

update prometheus metrics realy

parent c3ea3cdf
Pipeline #8626 waiting for manual action with stages
in 2 minutes and 54 seconds
......@@ -105,7 +105,7 @@ Upgrade helm:
script:
- bash
- cd "$CI_PROJECT_DIR"/k8s
- envsubst < values.yml | helm upgrade --install --wait becskasszasch . -n apps --values -
- envsubst < values.yaml | helm upgrade --install --wait becskasszasch . -n apps --values -
rules:
- if: $CI_COMMIT_TAG
when: manual
......@@ -127,9 +127,13 @@ func init() {
}
for _, p := range prod {
s, _ := GetSpends(p.ID)
var a float64
if s != nil {
spendsNow.With(prometheus.Labels{"product": p.Name}).Add(float64(s[0].Amount))
for _, u := range s {
a += float64(u.Amount)
}
}
spendsNow.With(prometheus.Labels{"product": p.Name}).Add(a)
}
}
......
......@@ -4,4 +4,4 @@ set -o allexport
source secret.env
set +o allexport
envsubst < values.yml | helm upgrade --install --wait becskasszasch . -n apps --values -
envsubst < values.yaml | helm upgrade --install --wait becskasszasch . -n apps --values -
......@@ -7,5 +7,5 @@ POSTGRES: "${POSTGRES}"
POSTGRES_PASS: "${POSTGRES_PASS}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_DB: "${POSTGRES_DB}"
Tag: "v1.5.7"
Tag: "v1.5.8"
REGISTRY_CONF: "${REGISTRY_CONF}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment