A metrics adapter for Kubernetes Metrics APIs that exposes custom metrics for WAO.
WAO Metrics Adapter exposes the following custom metrics for WAO:
inlet_temp
: Server inlet temperature in Celsius.delta_p
: Server differential pressure in Pascal.
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.29.0/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
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 clientgithub.com/waok8s/wao-core/pkg/client
has our cached client
This project is using custom-metrics-apiserver, which is a library based on Kubernetes API Aggregation Layer.
pkg/provider
: Custom metrics provider.
Versioning: we use the same major.minor as Kubernetes, and the patch is our own.
- 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.
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).
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.