pfab 0.54.1 → 0.55.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +3 -4
- data/README.markdown +1 -1
- data/launch.rb +6 -0
- data/lib/pfab/templates/base.rb +1 -1
- data/lib/pfab/templates/web.rb +13 -5
- data/lib/pfab/version.rb +2 -2
- data/lib/pfab/yamls.rb +5 -0
- data/pfab.gemspec +4 -3
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4e570424c14765d734c759cd70fb07bf192cf7eb9aa23df4009d79db22ead61
|
4
|
+
data.tar.gz: 3aa1fb2f697b3d83c32cedb45b0714bb11f88831a62aecb081b845d256543763
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 625f06742f7996deb0640d74b95c4507bebac36bd95a1e1511c807db959257cc3ab04c7e6f5b36d0182bca0d5616fb3c55273c0eb8bd3893ea5bce7ef54e8d1d
|
7
|
+
data.tar.gz: 232d06bb3f3855d4f8cc109dd819be7d1f03a9e742a2087795c784608c4d07be9d50ebac2617dc85df604c1b66b6f9c257c0970f1ebb7fe632adec8352d429dd
|
data/Gemfile
CHANGED
@@ -12,7 +12,7 @@ gem 'styled_yaml', '~> 0.0.1'
|
|
12
12
|
# Add dependencies to develop your gem here.
|
13
13
|
# Include everything needed to run rake, tests, features, etc.
|
14
14
|
group :development do
|
15
|
-
gem "rdoc", "~>
|
15
|
+
gem "rdoc", "~> 6.1"
|
16
16
|
gem "bundler", "~> 2.3"
|
17
17
|
gem "juwelier", "~> 2.4.9", git: "https://github.com/flajann2/juwelier"
|
18
18
|
gem "simplecov", ">= 0"
|
data/Gemfile.lock
CHANGED
@@ -67,7 +67,7 @@ GEM
|
|
67
67
|
highline (1.7.10)
|
68
68
|
i18n (1.14.5)
|
69
69
|
concurrent-ruby (~> 1.0)
|
70
|
-
json (
|
70
|
+
json (2.6.3)
|
71
71
|
jwt (2.3.0)
|
72
72
|
kamelcase (0.0.2)
|
73
73
|
semver2 (~> 3)
|
@@ -99,8 +99,7 @@ GEM
|
|
99
99
|
rack (3.0.11)
|
100
100
|
rake (13.0.6)
|
101
101
|
rchardet (1.8.0)
|
102
|
-
rdoc (
|
103
|
-
json (~> 1.4)
|
102
|
+
rdoc (6.1.2.1)
|
104
103
|
ruby2_keywords (0.0.5)
|
105
104
|
semver2 (3.4.2)
|
106
105
|
simplecov (0.16.1)
|
@@ -125,7 +124,7 @@ DEPENDENCIES
|
|
125
124
|
commander
|
126
125
|
juwelier (~> 2.4.9)!
|
127
126
|
pry-byebug
|
128
|
-
rdoc (~>
|
127
|
+
rdoc (~> 6.1)
|
129
128
|
simplecov
|
130
129
|
styled_yaml (~> 0.0.1)
|
131
130
|
test-unit
|
data/README.markdown
CHANGED
@@ -243,7 +243,7 @@ Releasing
|
|
243
243
|
- ```bundle exec rake gemspec```
|
244
244
|
- ```git commit ```
|
245
245
|
- ```REMOTE_BRANCH=main LOCAL_BRANCH=main bundle exec rake git:release```
|
246
|
-
- ```REMOTE_BRANCH=main LOCAL_BRANCH=main bundle exec rake build```
|
246
|
+
- ```REMOTE_BRANCH=main LOCAL_BRANCH=main bundle exec rake clean build```
|
247
247
|
- ```gem push pkg/pfab-0.45.0.gem```
|
248
248
|
|
249
249
|
Copyright
|
data/launch.rb
ADDED
data/lib/pfab/templates/base.rb
CHANGED
data/lib/pfab/templates/web.rb
CHANGED
@@ -5,22 +5,30 @@ module Pfab
|
|
5
5
|
module Templates
|
6
6
|
class Web < Base
|
7
7
|
def write_to(f)
|
8
|
-
if get("host").nil?
|
9
|
-
puts "No host to
|
8
|
+
if ingres_enabled? && get("host").nil?
|
9
|
+
puts "No host to configure ingress for #{@data['deployed_name']}. Skipping deployment. add a host or generateIngressEnabled:false"
|
10
10
|
else
|
11
11
|
f << StyledYAML.dump(service.deep_stringify_keys)
|
12
|
-
if
|
12
|
+
if ingres_enabled?
|
13
13
|
f << StyledYAML.dump(ingress.deep_stringify_keys)
|
14
14
|
else
|
15
15
|
puts "skipping ingress because ingress_disabled = #{@data['generateIngressEnabled']}"
|
16
16
|
end
|
17
17
|
f << StyledYAML.dump(deployment.deep_stringify_keys)
|
18
|
-
|
18
|
+
replica_count = get("replicas") ||1
|
19
|
+
if (replica_count > 1)
|
19
20
|
f << StyledYAML.dump(pod_disruption_budget.deep_stringify_keys)
|
20
21
|
end
|
21
22
|
end
|
22
23
|
end
|
23
24
|
|
25
|
+
def ingres_enabled?
|
26
|
+
if not app_vars.has_key?('generateIngressEnabled') || app_vars['generateIngressEnabled']
|
27
|
+
return true
|
28
|
+
end
|
29
|
+
return false
|
30
|
+
end
|
31
|
+
|
24
32
|
def service
|
25
33
|
{
|
26
34
|
apiVersion: "v1",
|
@@ -41,7 +49,7 @@ module Pfab
|
|
41
49
|
ports: [
|
42
50
|
{
|
43
51
|
name: "http",
|
44
|
-
port: 80,
|
52
|
+
port: app_vars["service_listen_port"] || 80,
|
45
53
|
targetPort: app_vars["port"],
|
46
54
|
appProtocol: app_vars["appProtocol"]
|
47
55
|
}.compact
|
data/lib/pfab/version.rb
CHANGED
data/lib/pfab/yamls.rb
CHANGED
data/pfab.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: pfab 0.
|
5
|
+
# stub: pfab 0.55.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "pfab".freeze
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.55.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Jeff Dwyer".freeze]
|
14
|
-
s.date = "2024-05-
|
14
|
+
s.date = "2024-05-22"
|
15
15
|
s.description = "k8s helper".freeze
|
16
16
|
s.email = "jdwyer@prefab.cloud".freeze
|
17
17
|
s.executables = ["pfab".freeze]
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
"README.markdown",
|
30
30
|
"Rakefile",
|
31
31
|
"bin/pfab",
|
32
|
+
"launch.rb",
|
32
33
|
"lib/pfab.rb",
|
33
34
|
"lib/pfab/cli.rb",
|
34
35
|
"lib/pfab/templates/base.rb",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pfab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.55.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Dwyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '6.1'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '6.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- README.markdown
|
155
155
|
- Rakefile
|
156
156
|
- bin/pfab
|
157
|
+
- launch.rb
|
157
158
|
- lib/pfab.rb
|
158
159
|
- lib/pfab/cli.rb
|
159
160
|
- lib/pfab/templates/base.rb
|