kerby 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4c2c7a1655e3250ae392cc1325b95e8feb2fe96b39e68850d9fe879ba0fa4ab
4
- data.tar.gz: 4d4e678a0fee29aa20968de8a0d0cb6e1ab36f6f520a8cc94a599a1cdfb2e7b5
3
+ metadata.gz: 38207e6b1e4cffa49440e9f0b230a0342904ef5b128dabf21801e54f52397b08
4
+ data.tar.gz: 5677eda9319e01c30d18cf5212564a1987d67f469a98d8d740a5379c726702d6
5
5
  SHA512:
6
- metadata.gz: a0b69e9d75d90a93ba4f34c0a1a72137354ca8fc188627611134f43e2adc2229f5e37a9e82725cb96bef1e7a3e3e53b20b2391d3ad9963d6ec6b325080e8194e
7
- data.tar.gz: 595e6446a9a120b63cde5345e64e240a9df5820fed0c30ecd1dc93197d5713a576ea86fbe28d2b8f72f6e4d3cac1755258fe4b478ffa956d21c1205042f774d3
6
+ metadata.gz: 82d0570971a2f823172986dced27d93f69789084c5d6ec6dfad0ec1515a403df65a7228b2c90d37172643a149c20dd55833243e84a8575656e367226997bf5ec
7
+ data.tar.gz: a150f396e636b8464715705ef771424f6c86d25be23fe78c6fdff24aa1c0808a34bb22d2ce4e7705fc49399ffce86e293918b5a11ef42bcdfca564d093d12344
data/README.md CHANGED
@@ -20,7 +20,7 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- kerby build MANIFEST-FILE... | kubectl apply -f -
23
+ $ kerby build [--node-yaml=NODE_YAML] MANIFEST-FILE... | kubectl apply -f -
24
24
 
25
25
  ## Development
26
26
 
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
 
9
9
  spec.summary = %q{Kubernetes ERB support on Yaml manifest files.}
10
10
  spec.description = %q{Kubernetes ERB support on Yaml manifest files.}
11
- spec.homepage = "https://github.com/maedadev"
11
+ spec.homepage = "https://github.com/maedadev/kerby"
12
12
  spec.license = "MIT"
13
13
 
14
14
  # Specify which files should be added to the gem when it is released.
@@ -42,6 +42,13 @@ module Kerby
42
42
  private
43
43
 
44
44
  # k8s include directive
45
+ #
46
+ # For example, <%= k8s_include('base/namespace') %> in manifest file will
47
+ # include 'base/namespace.yml' file.
48
+ #
49
+ # The path is relative to the current (sometimes partial) manifest file.
50
+ #
51
+ # @!visibility public
45
52
  def k8s_include(path)
46
53
  ERB.new(File.read(Pathname(@_curr_file).dirname + (path + '.yml'))).result(binding)
47
54
  end
@@ -65,6 +72,20 @@ module Kerby
65
72
  end
66
73
 
67
74
  # return node_yaml value for the key.
75
+ #
76
+ # For example, command execution:
77
+ #
78
+ # $ kerby build --node_yaml staging-node.yml manifest.yml
79
+ #
80
+ # and stageing-node.yml contains:
81
+ #
82
+ # app:
83
+ # namespace: city-A
84
+ #
85
+ # Then, <%= k8s_node('app.namespace') %> in manifest.yml will be
86
+ # generated to 'city-A'.
87
+ #
88
+ # @!visibility public
68
89
  def k8s_node(key)
69
90
  k8s_node_sub(@_k8s_node, key, key)
70
91
  end
@@ -83,6 +104,8 @@ module Kerby
83
104
  end
84
105
 
85
106
  # k8s_include with YAML indent
107
+ #
108
+ # @!visibility public
86
109
  def k8s_config_map(path)
87
110
  "|\n" +
88
111
  ERB.new(File.read(Pathname(@_curr_file).dirname + path)).result(binding).split("\n").map do |line|
@@ -1,3 +1,3 @@
1
1
  module Kerby
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kerby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ido
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-21 00:00:00.000000000 Z
11
+ date: 2020-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -75,7 +75,7 @@ files:
75
75
  - lib/kerby.rb
76
76
  - lib/kerby/cli.rb
77
77
  - lib/kerby/version.rb
78
- homepage: https://github.com/maedadev
78
+ homepage: https://github.com/maedadev/kerby
79
79
  licenses:
80
80
  - MIT
81
81
  metadata: {}