diff --git a/glance-system/glance-kisfenyo.yaml b/glance-system/glance-kisfenyo.yaml index 11bc3f3..e3dfcc3 100644 --- a/glance-system/glance-kisfenyo.yaml +++ b/glance-system/glance-kisfenyo.yaml @@ -929,73 +929,7 @@ data: - type: custom-api title: Container Versions cache: 5m - url: ${PROMETHEUS_URL}/api/v1/query - parameters: - query: > - max by (image, current_version, latest_version) ( - version_checker_is_latest_version{ - container_type="container", - image!~"(^|.*/)(busybox|redis|alpine|nginx|mariadb|mysql|valkey)$", - image!~"^longhornio.*$", - image!~"(^|.*/)postgres.*$", - image!~"^registry\\.k8s\\.io/ingress-nginx/.*$", - current_version!~".*sha256:.*", - latest_version!~".*sha256:.*" - } == 0 - ) - subrequests: - up_to_date: - url: ${PROMETHEUS_URL}/api/v1/query - parameters: - query: > - count( - max by (image) ( - version_checker_is_latest_version{ - container_type="container", - image!~"(^|.*/)(busybox|redis|alpine|nginx|mariadb|mysql|valkey)$", - image!~"^longhornio.*$", - image!~"(^|.*/)postgres.*$", - image!~"^registry\\.k8s\\.io/ingress-nginx/.*$", - current_version!~".*sha256:.*", - latest_version!~".*sha256:.*" - } == 1 - ) - ) or vector(0) - outdated: - url: ${PROMETHEUS_URL}/api/v1/query - parameters: - query: > - count( - max by (image) ( - version_checker_is_latest_version{ - container_type="container", - image!~"(^|.*/)(busybox|redis|alpine|nginx|mariadb|mysql|valkey)$", - image!~"^longhornio.*$", - image!~"(^|.*/)postgres.*$", - image!~"^registry\\.k8s\\.io/ingress-nginx/.*$", - current_version!~".*sha256:.*", - latest_version!~".*sha256:.*" - } == 0 - ) - ) or vector(0) - total: - url: ${PROMETHEUS_URL}/api/v1/query - parameters: - query: > - count( - max by (image) ( - version_checker_is_latest_version{ - container_type="container", - image!~"(^|.*/)(busybox|redis|alpine|nginx|mariadb|mysql|valkey)$", - image!~"^longhornio.*$", - image!~"(^|.*/)postgres.*$", - image!~"^registry\\.k8s\\.io/ingress-nginx/.*$", - current_version!~".*sha256:.*", - latest_version!~".*sha256:.*" - } - ) - ) or vector(0) - + url: http://glance-helper.glance-system.svc.cluster.local:8000/versions template: | - {{ $upToDate := (.Subrequest "up_to_date").JSON.Float "data.result.0.value.1" }} - {{ $outdated := (.Subrequest "outdated").JSON.Float "data.result.0.value.1" }} - {{ $total := (.Subrequest "total").JSON.Float "data.result.0.value.1" }} - {{ $updates := .JSON.Array "data.result" }} + {{ $upToDate := .JSON.Float "summary.up_to_date" }} + {{ $outdated := .JSON.Float "summary.outdated" }} + {{ $total := .JSON.Float "summary.total" }} + {{ $updates := .JSON.Array "outdated" }}
{{ if gt $total 0.0 }} @@ -1099,11 +1033,11 @@ data: {{ if gt $outdated 0.0 }}
{{ range $updates }} -
- {{ trimPrefix "ghcr.io/" (trimPrefix "docker.io/" (trimPrefix "lscr.io/" (trimPrefix "quay.io/" (.String "metric.image")))) }} - {{ .String "metric.current_version" }} +
+ {{ trimPrefix "ghcr.io/" (trimPrefix "docker.io/" (trimPrefix "lscr.io/" (trimPrefix "quay.io/" (.String "image")))) }} + {{ .String "current_version" }} - {{ .String "metric.latest_version" }} + {{ .String "latest_version" }}
{{ end }}
@@ -1111,7 +1045,7 @@ data:
✓ All images up to date!
{{ end }} {{ else }} -
Waiting for version-checker metrics...
Check back in a few minutes
+
Waiting for version data...
Check glance-helper logs
{{ end }}