Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.gitignore
Dockerfile
README.md
alert.js
billing.js
billing.yaml
dashboard.js
index.js
kubernetes.js
micro-service.js
prometheus.js

README.md

micro-service.js

An example generating various artefacts from a high level micro-service definition. This example generates:

  • Namespace, Deployment, Service and Ingress Kubernetes objects,
  • A grafana dashboard stored in a ConfigMap,
  • A Prometheus alert stored in a PrometheusRule custom resource, ready to be picked up by the Prometheus operator.

There are two way to run this example:

  1. The micro-service is defined with code in billing.js:
$ npm install @jkcfg/kubernetes@0.2.1
$ npm install @jkcfg/grafana@0.1.0
$ jk generate -v billing.js
  1. The micro-service is defined in a YAML file in billing.yaml:
$ npm install @jkcfg/kubernetes@0.2.1
$ npm install @jkcfg/grafana@0.1.0
$ jk generate -v -f billing.yaml index.js
You can’t perform that action at this time.