Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

binder-deploy-kubernetes

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binder-deploy-kubernetes - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

lib/.client.js.un~

24

conf/main.json
{
"name": "binder-deploy-kubernetes",
"port": 8084,
"db": {
"host": "localhost",
"port": 9050
},
"logging": {
"host": "localhost",
"logstash": {
"port": 8050
}
},
"kube": {
"provider": "gce",
"proxyHost": "localhost",
"proxyPort": 8085,
"host": "localhost",
"port": 8085,
"apiVersion": "v1"

@@ -20,4 +30,6 @@ },

"templateDir": "examples/",
"testing": true
}
"testing": false
},
"port": 8084
}

@@ -40,4 +40,2 @@ var _ = require('lodash')

.option('-a, --api-key <key>', 'Binder API key')
.option('-p, --port <port>', 'the binder-deploy-kubernetes server port')
.option('-c, --config <path>', 'Module configuration file')
}, function (options) {

@@ -75,2 +73,7 @@ console.log('Starting the binder-deploy-kubernetes server...')

})
program
.command('help', { isDefault: true })
.action(function () {
program.help()
})
}

@@ -77,0 +80,0 @@

@@ -1,2 +0,3 @@

var KubeClient = require('node-kubernetes-client')
var KubeClient = require('kube-stream')
var settings = require('./settings')

@@ -6,9 +7,5 @@ // client should be initialized after Kubernetes proxy is started

var getInstance = function (opts) {
var getInstance = function () {
if (singleton === null) {
singleton = new KubeClient({
host: opts.kube.proxyHost + ':' + opts.kube.proxyPort,
protocol: 'http',
version: opts.kube.apiVersion
})
singleton = new KubeClient(settings.kube)
}

@@ -15,0 +12,0 @@ return singleton

@@ -6,5 +6,5 @@ var _ = require('lodash')

var App = require('./state/app.js')
var RegistryClient = require('./registry.js')
var KubeClient = require('kube-stream')
var App = require('./state/app')
var RegistryClient = require('./registry')
var kubeClient = require('./client')
var getLogger = require('binder-logging').getLogger

@@ -131,3 +131,3 @@

var template = api.params['template-name']
var kube = new KubeClient()
var kube = kubeClient()
var updateOpts = { upsert: true, setDefaultsOnInsert: true }

@@ -179,3 +179,3 @@ var pre = function (next) {

async.series([
pre,
pre,
preload,

@@ -182,0 +182,0 @@ post

@@ -10,4 +10,2 @@ // models.js defines all the data structures used to store information that should persist across

var getLogger = require('binder-logging').getLogger
/**

@@ -14,0 +12,0 @@ * A Model is a persistable object that optionally contains callbacks for handling creation,

@@ -6,6 +6,6 @@ var _ = require('lodash')

var request = require('request')
var KubeClient = require('kube-stream')
var format = require('string-format')
format.extend(String.prototype)
var kubeClient = require('./client')
var getLogger = require('binder-logging').getLogger

@@ -17,3 +17,3 @@

this.provider = opts.kube.provider || 'vagrant'
this.client = new KubeClient()
this.client = kubeClient()

@@ -75,9 +75,2 @@ // ips and token are set during creation

],
volumeMounts: [
{
name: 'certs-volume',
readOnly: true,
mountPath: '/data/certs'
}
],
imagePullPolicy: 'Always'

@@ -107,8 +100,2 @@ },

emptyDir: {}
},
{
name: 'certs-volume',
secret: {
secretName: 'binder-certs'
}
}

@@ -115,0 +102,0 @@ ],

@@ -24,4 +24,5 @@ var path = require('path')

}
BinderDeployKubernetes.super_.call(this, 'binder-deploy-kubernetes', ['deploy'], settings, opts)
this.kubePort = this.opts.kube.proxyPort
opts = _.merge(opts, settings)
BinderDeployKubernetes.super_.call(this, 'binder-deploy-kubernetes', ['deploy'], opts)
this.kubePort = this.opts.kube.port
}

@@ -101,7 +102,3 @@

if (this.opts.db) {
getDatabase(this.opts.db, initialize)
} else {
getDatabase(initialize)
}
getDatabase(initialize)
}

@@ -108,0 +105,0 @@

var path = require('path')
var fs = require('fs')
var jsonfile = require('jsonfile')
var optsPath = path.join(process.env['HOME'], '.binder-deploy-kubernetes.conf')
var defaultOptsPath = path.join(__dirname, '../conf/main.json')
var packagePath = path.join(__dirname, '../package.json')
if (fs.existsSync(optsPath)) {
var fullSettings = jsonfile.readFileSync(optsPath)
} else {
var fullSettings = jsonfile.readFileSync(defaultOptsPath)
}
var packageJson = jsonfile.readFileSync(packagePath)
fullSettings.name = packageJson.name
module.exports = fullSettings
var confPath = path.join(process.env['HOME'], '.binder/deploy.conf')
module.exports = jsonfile.readFileSync(confPath)

@@ -7,9 +7,9 @@ var util = require('util')

var mongoose = require('mongoose')
var KubeClient = require('kube-stream')
var format = require('string-format')
format.extend(String.prototype)
var kubeClient = require('../client')
var getLogger = require('binder-logging').getLogger
var proxyClient = require('../proxy.js').getInstance
var Model = require('../models.js').Model
var proxyClient = require('../proxy').getInstance
var Model = require('../models').Model

@@ -40,3 +40,3 @@ function App (template) {

// Kubernetes client
this.client = new KubeClient()
this.client = kubeClient()

@@ -43,0 +43,0 @@ this.logger = getLogger('binder-deploy-kubernetes')

{
"name": "binder-deploy-kubernetes",
"version": "1.0.4",
"version": "1.0.5",
"description": "A Binder backend that deploys apps onto a Kubernetes cluster",

@@ -8,3 +8,4 @@ "main": "index.js",

"test": "mocha --delay test/",
"start": "node start.js start"
"start": "node start.js start",
"postinstall": "node scripts/postinstall.js"
},

@@ -11,0 +12,0 @@ "repository": {

var wait = require('wait.for')
var shell = require('shelljs')
var KubeClient = require('kube-stream')
var format = require('string-format')

@@ -9,3 +8,4 @@ format.extend(String.prototype)

var settings = require('../lib/settings.js')
var kubeClient = require('../lib/client')
var settings = require('../lib/settings')

@@ -17,3 +17,3 @@ var server = null

console.log('Checking for cluster presence...')
var client = new KubeClient()
var client = kubeClient()
var port = settings.kube.proxyPort

@@ -20,0 +20,0 @@ var app = {

@@ -6,15 +6,16 @@ var _ = require('lodash')

var urljoin = require('url-join')
var KubeClient = require('kube-stream')
var utils = require('kube-test-utils')
var Pool = require('../lib/state/pool.js').Pool
var App = require('../lib/state/app.js')
var RegistryClient = require('../lib/registry.js')
var proxyClient = require('../lib/proxy.js').getInstance
var ProxyClient = require('../lib/proxy.js').ProxyClient
var DeployServer = require('../lib/server.js')
var settings = require('../lib/settings.js')
var kubeClient = require('../lib/client')
var Pool = require('../lib/state/pool').Pool
var App = require('../lib/state/app')
var RegistryClient = require('../lib/registry')
var proxyClient = require('../lib/proxy').getInstance
var ProxyClient = require('../lib/proxy').ProxyClient
var DeployServer = require('../lib/server')
var settings = require('../lib/settings')
var getDatabase = require('binder-db').getDatabase
var clusterAvailable = require('./1-main.js').clusterAvailable
var clusterAvailable = require('./1-main').clusterAvailable

@@ -48,3 +49,3 @@ var namespace = 'binder-testing'

if (clusterAvailable()) {
var client = new KubeClient()
var client = kubeClient()
var nsTemplate = utils.makeNamespace(namespace)

@@ -203,3 +204,3 @@ console.log('About to delete old testing namespace, if it exists')

before(function () {
kubeClient = new KubeClient()
kubeClient = kubeClient()
})

@@ -295,3 +296,3 @@

})
kube = new KubeClient()
kube = kubeClient()
})

@@ -298,0 +299,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc