Skip to content

Latest commit

 

History

History

prometheus-operator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

@kubernetes-models/prometheus-operator

Prometheus operator models.

Installation

Install with npm.

npm install @kubernetes-models/prometheus-operator

Usage

import { ServiceMonitor } from "@kubernetes-models/prometheus-operator/monitoring.coreos.com/v1/ServiceMonitor";

const monitor = new ServiceMonitor({
  metadata: {
    name: "my-service-monitor"
  },
  spec: {
    selector: {
      matchLabels: {
        app: "some-app"
      }
    },
    endpoints: [
      {
        port: web
      }
    ]
  }
});

// Validate against JSON schema
monitor.validate();

License

MIT