Coder Social home page Coder Social logo

etsangsplk / custom-metrics-apiserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kubernetes-sigs/custom-metrics-apiserver

0.0 1.0 0.0 131 KB

Framework for implementing custom metrics support for Kubernetes

License: Apache License 2.0

Makefile 0.94% Shell 1.09% Go 97.89% Dockerfile 0.08%

custom-metrics-apiserver's Introduction

Custom Metrics Adapter Server Boilerplate

Purpose

This repository contains boilerplate code for setting up an implementation of the custom metrics API (https://github.com/kubernetes/metrics).

It includes the necessary boilerplate for setting up an implementation (generic API server setup, registration of resources, etc), plus a sample implementation backed by fake data.

How to use this repository

In order to use this repository, you should vendor this repository at github.com/kubernetes-incubator/custom-metrics-apiserver, and implement the "github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/provider".CustomMetricsProvider interface. You can then pass this to the main setup functions.

The pkg/cmd package contains the building blocks of the actual API server setup. You'll most likely want to wrap the existing options and flags setup to add your own flags for configuring your provider.

A sample implementation of this can be found in the file sample-main.go and pkg/sample-cmd directory. You'll want to have the equivalent files in your project.

Building your own Custom Metric Server

See getting-started.md for a walk through on creating your own custom metric server api.

Development for boilerplate project

Pre-reqs

Clone and Build boilerplate project

There is a sample adapter in this repository that can be used for testing changes to the repository, and also acts as an example implementations.

To build and deploy it:

export REGISTRY=<your registory name>
make sample-container

docker push $REGISTRY/k8s-custom-metric-adapter-sample
kubectl create namespace custom-metrics
kubectl apply -f sample-deploy/manifests

After the deployment you can query the sample adapter with:

kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1" | jq .

Compatibility

The APIs in this repository follow the standard guarantees for Kubernetes APIs, and will follow Kubernetes releases.

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this repository at:

Code of Conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

Contribution Guidelines

See CONTRIBUTING.md for more information.

custom-metrics-apiserver's People

Contributors

directxman12 avatar jsturtevant avatar kawych avatar luxas avatar mbssaiakhil avatar spiffxp avatar uthark avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.