Remove "Stage" variable

as we will use distinct Influx and Grafana instances for the different stages/environments.
This commit is contained in:
Maximilian Paß
2023-01-17 17:10:03 +00:00
parent dc562ba7fd
commit 1aced0a130
25 changed files with 11 additions and 45 deletions

View File

@ -6,7 +6,7 @@ envMapping = from(bucket: "poseidon")
|> last()
|> keep(columns: ["id", "image", "stage"])
|> rename(columns: {id: "environment_id"})
|> map(fn: (r) => ({ r with image: strings.substring(v: r.stage, start: 0, end: 1) + r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
|> map(fn: (r) => ({ r with image: r.environment_id + "/" + strings.trimPrefix(v: r.image, prefix: "openhpi/co_execenv_")}))
join(tables: {key1: result, key2: envMapping}, on: ["environment_id", "stage"], method: "inner")
|> keep(columns: ["_value", "image", "_time"])