kubes 0.6.7 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE.md +7 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +84 -0
- data/.github/ISSUE_TEMPLATE/documentation.md +12 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +64 -0
- data/.github/ISSUE_TEMPLATE/question.md +14 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +50 -0
- data/CHANGELOG.md +17 -0
- data/docs/_docs/config/reference.md +1 -1
- data/docs/_docs/dsl/multiple-resources.md +19 -21
- data/docs/_docs/helpers/google.md +1 -1
- data/docs/_docs/helpers/google/gke.md +7 -3
- data/docs/_docs/helpers/google/secrets.md +1 -1
- data/docs/_docs/intro/concepts.md +8 -9
- data/docs/_docs/intro/docker-image.md +2 -2
- data/docs/_docs/intro/ordering.md +9 -10
- data/docs/_docs/patterns/multiple-envs.md +6 -6
- data/docs/_docs/resources/role.md +8 -9
- data/docs/_docs/yaml.md +4 -5
- data/docs/_docs/yaml/multiple-files.md +22 -0
- data/docs/_docs/yaml/multiple-resources.md +89 -0
- data/docs/_includes/commands.html +8 -9
- data/docs/_includes/config/hooks/options.md +1 -0
- data/docs/_includes/layering/layers.md +7 -4
- data/docs/_includes/sidebar.html +6 -1
- data/docs/_includes/vs/kubes/structure.md +12 -13
- data/lib/kubes.rb +1 -0
- data/lib/kubes/cli/compile.rb +1 -1
- data/lib/kubes/command.rb +2 -1
- data/lib/kubes/compiler/dsl/core/base.rb +3 -7
- data/lib/kubes/compiler/dsl/core/blocks.rb +5 -1
- data/lib/kubes/compiler/dsl/syntax/endpoint.rb +34 -0
- data/lib/kubes/compiler/dsl/syntax/resource.rb +0 -1
- data/lib/kubes/compiler/layering.rb +3 -7
- data/lib/kubes/compiler/shared/helpers.rb +4 -2
- data/lib/kubes/compiler/shared/runtime_helpers.rb +78 -0
- data/lib/kubes/compiler/strategy.rb +1 -15
- data/lib/kubes/compiler/strategy/base.rb +0 -56
- data/lib/kubes/compiler/strategy/dispatcher.rb +60 -0
- data/lib/kubes/compiler/strategy/erb.rb +8 -14
- data/lib/kubes/compiler/strategy/result.rb +6 -2
- data/lib/kubes/compiler/util/normalize.rb +2 -2
- data/lib/kubes/compiler/util/yaml_dump.rb +7 -4
- data/lib/kubes/config.rb +1 -1
- data/lib/kubes/docker/strategy/image_name.rb +7 -3
- data/lib/kubes/version.rb +1 -1
- data/lib/templates/new/resource/dsl/endpoint.rb +3 -0
- data/lib/templates/new/resource/yaml/endpoint.yaml +9 -0
- data/spec/kubes/compiler/strategy/{dsl_spec.rb → dispatcher_spec.rb} +10 -9
- metadata +17 -8
- data/lib/kubes/compiler/shared/custom_helpers.rb +0 -17
- data/lib/kubes/compiler/shared/custom_variables.rb +0 -38
- data/lib/kubes/compiler/shared/plugin_helpers.rb +0 -14
- data/lib/kubes/compiler/strategy/dsl.rb +0 -4
@@ -1,17 +0,0 @@
|
|
1
|
-
module Kubes::Compiler::Shared
|
2
|
-
module CustomHelpers
|
3
|
-
# Load custom helper methods from project
|
4
|
-
@@custom_helpers_loaded = false
|
5
|
-
def load_custom_helpers
|
6
|
-
return if @@custom_helpers_loaded
|
7
|
-
paths = Dir.glob("#{Kubes.root}/.kubes/helpers/**/*.rb")
|
8
|
-
paths.sort_by! { |p| p.size } # so namespaces are loaded first
|
9
|
-
paths.each do |path|
|
10
|
-
filename = path.sub(%r{.*.kubes/helpers/},'').sub('.rb','')
|
11
|
-
module_name = filename.camelize
|
12
|
-
self.class.send :include, module_name.constantize
|
13
|
-
end
|
14
|
-
@@custom_helpers_loaded = true
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
module Kubes::Compiler::Shared
|
2
|
-
module CustomVariables
|
3
|
-
include DslEvaluator
|
4
|
-
|
5
|
-
# Load custom variables from project
|
6
|
-
@@custom_variables_loaded = false
|
7
|
-
def load_custom_variables
|
8
|
-
return if Kubes.kustomize?
|
9
|
-
|
10
|
-
ext = File.extname(@path)
|
11
|
-
role = @path.sub(%r{.*\.kubes/resources/},'').sub(ext,'').split('/').first # IE: web
|
12
|
-
kind = File.basename(@path).sub(ext,'') # IE: deployment
|
13
|
-
all = "all"
|
14
|
-
if @block_form
|
15
|
-
kind = kind.pluralize
|
16
|
-
all = all.pluralize
|
17
|
-
end
|
18
|
-
|
19
|
-
layers = [
|
20
|
-
"base.rb",
|
21
|
-
"#{Kubes.env}.rb",
|
22
|
-
"base/all.rb",
|
23
|
-
"base/all/#{Kubes.env}.rb",
|
24
|
-
"base/#{kind}.rb",
|
25
|
-
"base/#{kind}/base.rb",
|
26
|
-
"base/#{kind}/#{Kubes.env}.rb",
|
27
|
-
"#{role}/#{kind}.rb",
|
28
|
-
"#{role}/#{kind}/base.rb",
|
29
|
-
"#{role}/#{kind}/#{Kubes.env}.rb",
|
30
|
-
]
|
31
|
-
|
32
|
-
layers.each do |layer|
|
33
|
-
path = "#{Kubes.root}/.kubes/variables/#{layer}"
|
34
|
-
evaluate_file(path)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module Kubes::Compiler::Shared
|
2
|
-
module PluginHelpers
|
3
|
-
# Load plugin helper methods from project
|
4
|
-
@@plugin_helpers_loaded = false
|
5
|
-
def load_plugin_helpers
|
6
|
-
return if @@plugin_helpers_loaded
|
7
|
-
Kubes::Plugin.plugins.each do |klass|
|
8
|
-
helpers_class = "#{klass}::Helpers".constantize # IE: KubesAws::Helpers
|
9
|
-
self.class.send :include, helpers_class
|
10
|
-
end
|
11
|
-
@@plugin_helpers_loaded = true
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|