8000 GitHub - waok8s/wao-metrics-adapter: Exposes custom metrics for WAO
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 6, 2025. It is now read-only.

waok8s/wao-metrics-adapter

Repository files navigation

Important

This repository has been merged into waok8s/waok8s (v1.31+). All new development is there. Older versions remain here for reference only, but this repository is no longer maintained.

WAO Metrics Adapter

A metrics adapter for Kubernetes Metrics APIs that exposes custom metrics for WAO.

Overview

WAO Metrics Adapter exposes the following custom metrics for WAO:

  • inlet_temp: Server inlet temperature in Celsius.
  • delta_p: Server differential pressure in Pascal.

Getting Started

Installation

Note

Make sure you have wao-core set up.

Install WAO Metrics Adapter.

kubectl apply -f https://github.com/waok8s/wao-metrics-adapter/releases/download/v1.30.1/wao-metrics-adapter.yaml

Wait for the pod to be ready.

kubectl wait pod $(kubectl get pods -n custom-metrics -l app=wao-metrics-adapter -o jsonpath="{.items[0].metadata.name}") -n custom-metrics --for condition=Ready

Fetching Metrics

You can fetch the metrics using kubectl get --raw command.

# Your node name
NODE=worker-1

# Inlet temperature
kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta2/nodes/$NODE/inlet_temp"
# Differential pressure
kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta2/nodes/$NODE/delta_p"

Or you can use client libraries to fetch the metrics.

  • k8s.io/metrics/pkg/client/custom_metrics has the official client
  • github.com/waok8s/wao-core/pkg/client has our cached client

Development

This project is using custom-metrics-apiserver, which is a library b 7CFE ased on Kubernetes API Aggregation Layer.

Components

  • pkg/provider: Custom metrics provider.

Changelog

Versioning: we use the same major.minor as Kubernetes, and the patch is our own.

  • 2025-03-03 v1.30.2
    • Bump dependencies.
  • 2025-02-26 v1.30.1
    • Bug fixes and improvements.
  • 2024-05-17 v1.30.0
    • Support Kubernetes v1.30.
  • 2024-05-07 v1.29.0
    • Support Kubernetes v1.29.
  • 2024-03-29 v1.28.0
    • Support Kubernetes v1.28.
  • 2024-03-04 v1.27.0
    • First release.
    • provider Add the custom metrics provider.

Acknowledgements

This work is supported by the New Energy and Industrial Technology Development Organization (NEDO) under its "Program to Develop and Promote the Commercialization of Energy Conservation Technologies to Realize a Decarbonized Society" (JPNP21005).

License

Copyright 2023 Bitmedia Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Exposes custom metrics for WAO

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0