Skip to content

paolochiodi/seneca-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seneca

seneca-kubernetes

Gitter chat

  • Sponsor: nearForm
  • Node: 4.x, 6.x
  • Seneca: 3.x

This plugin helps in running seneca on a kubernetes cluster.

At the moment its main function is loading some useful data from the cluster: current pod id and list of pods.

It must be run from inside a kubernetes pod to work

If you're using this module, and need help, you can:

If you are new to Seneca in general, please take a look at senecajs.org. We have everything from tutorials to sample apps to help get you up and running quickly.

Install

npm install -i seneca-kubernetes

Usage

Usage is simple: register the plugin and you'll find the data among the seneca options:

var seneca = Seneca().use('kubernetes')

seneca.ready(function () {
  console.log(seneca.options().plugin.kubernetes)
})

Returned data will include:

{
  myip: '10.244.2.5', // ip of current container and pod
  pods: [{
    status: 'Running',              // pod status
    ip: '10.244.2.6',               // pod ip
    labels: {                       // labels as defined on the pod
      app: 'seneca-demo',
      version: '1'
    }
  }]
}

Test

No tests available at the moment

Contributing

The Senecajs org encourage open participation. If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.

License

Copyright (c) 2013 - 2016, Richard Rodger and other contributors. Licensed under MIT.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published