-
Notifications
You must be signed in to change notification settings - Fork 6
/
app.rb
41 lines (32 loc) · 843 Bytes
/
app.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
require 'rubygems'
require 'bundler'
require 'active_support'
require 'kubr'
# Setup load paths
Bundler.require
$: << File.expand_path('../', __FILE__)
Kubr.configure do |config|
config.url = "#{ENV['KUBERNETES_MASTER']}/api/v1beta1"
config.username = ENV['KUBERNETES_USERNAME']
config.password = ENV['KUBERNETES_PASSWORD']
end
# Require base
require 'sinatra/base'
require 'app/models'
require 'app/routes'
require 'app/utils'
module KubernetesAdapter
IMPL_VERSION = ENV['ADAPTER_VERSION']
API_VERSION = 'v1'
TYPE = 'kubernetes'
class App < Sinatra::Application
configure do
disable :method_override
disable :static
end
use KubernetesAdapter::Routes::Healthcheck
use KubernetesAdapter::Routes::Metadata
use KubernetesAdapter::Routes::Services
end
end
include KubernetesAdapter::Models