pfab 0.17.0 → 0.20.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c80def412f2a0527b88bb127543b59863ef43ef049a7b5192fd79f399a5ae706
4
- data.tar.gz: 5176b0c7e1ab03193d6c174218b6cd37918831df6807441b966a9137afdacea8
3
+ metadata.gz: ae294e06f6c051ecc7a114ce443c26620e95ccad7a51c14f73647b11f49d71a3
4
+ data.tar.gz: 2f72d8acbd9cac08442e4c8f3aa8e135ccc9830d8e532edfb30ea3d75a2afd00
5
5
  SHA512:
6
- metadata.gz: 564a5caf247097c151e13522a334568e6c7f9af3f61e1f38b3afe22c1ee0a25e4416219e1c176e52e7179ec496e67b10e454c4164172281966100c9d247eac40
7
- data.tar.gz: cc624dbb446f95e5a619226bb15b53c42a7bec10131da87be5dc6cf6eb33cb962e06e512556136feb48805b17fad01e434274fb773681f1f0598bc73a3a4b294
6
+ metadata.gz: ad8d785eb4d122aa05583f15221ae878b43782eb83b6c3f1b83364d33b543c98a0ae6c68d7b923db4d8d328c9eeec3b00d2ed0ebb8262e9859710eef3d28e4af
7
+ data.tar.gz: fac2aec3de8fce83b95e1c03af150c48c1b5c21cef4afb25dba5daf57f8e7b39f122fe223184330b36395ec575c052237954551b1c050420fdc4ecd91377c0a6
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 2.6.9
1
+ ruby 3.0.3
data/CODEOWNERS ADDED
@@ -0,0 +1 @@
1
+ * @prefab-cloud/prefabdevs @prefab-cloud/prefabmaintainers @prefab-cloud/prefabadmins
data/Gemfile.lock CHANGED
@@ -18,7 +18,7 @@ GIT
18
18
  GEM
19
19
  remote: https://rubygems.org/
20
20
  specs:
21
- activesupport (5.2.2)
21
+ activesupport (5.2.4.3)
22
22
  concurrent-ruby (~> 1.0, >= 1.0.2)
23
23
  i18n (>= 0.7, < 2)
24
24
  minitest (~> 5.1)
@@ -30,7 +30,7 @@ GEM
30
30
  coderay (1.1.2)
31
31
  commander (4.4.6)
32
32
  highline (~> 1.7.2)
33
- concurrent-ruby (1.1.4)
33
+ concurrent-ruby (1.1.9)
34
34
  descendants_tracker (0.0.4)
35
35
  thread_safe (~> 0.3, >= 0.3.1)
36
36
  docile (1.3.1)
@@ -53,7 +53,7 @@ GEM
53
53
  faraday-net_http_persistent (1.2.0)
54
54
  faraday-patron (1.0.0)
55
55
  faraday-rack (1.0.0)
56
- git (1.9.1)
56
+ git (1.11.0)
57
57
  rchardet (~> 1.8)
58
58
  github_api (0.19.0)
59
59
  addressable (~> 2.4)
@@ -63,20 +63,20 @@ GEM
63
63
  oauth2 (~> 1.0)
64
64
  hashie (3.6.0)
65
65
  highline (1.7.10)
66
- i18n (1.2.0)
66
+ i18n (1.8.11)
67
67
  concurrent-ruby (~> 1.0)
68
68
  json (1.8.6)
69
69
  jwt (2.3.0)
70
70
  kamelcase (0.0.2)
71
71
  semver2 (~> 3)
72
72
  method_source (0.9.2)
73
- mini_portile2 (2.6.1)
74
- minitest (5.11.3)
73
+ mini_portile2 (2.8.0)
74
+ minitest (5.15.0)
75
75
  multi_json (1.15.0)
76
76
  multi_xml (0.6.0)
77
77
  multipart-post (2.1.1)
78
- nokogiri (1.12.5)
79
- mini_portile2 (~> 2.6.1)
78
+ nokogiri (1.13.6)
79
+ mini_portile2 (~> 2.8.0)
80
80
  racc (~> 1.4)
81
81
  oauth2 (1.4.7)
82
82
  faraday (>= 0.8, < 2.0)
@@ -109,7 +109,7 @@ GEM
109
109
  test-unit (3.2.9)
110
110
  power_assert
111
111
  thread_safe (0.3.6)
112
- tzinfo (1.2.5)
112
+ tzinfo (1.2.9)
113
113
  thread_safe (~> 0.1)
114
114
 
115
115
  PLATFORMS
data/README.markdown CHANGED
@@ -117,8 +117,8 @@ Releasing
117
117
  - modify version.rb
118
118
  - ```bundle exec rake gemspec```
119
119
  - ```git commit ```
120
- - ```bundle exec rake git:release```
121
- - ```bundle exec rake build```
120
+ - ```REMOTE_BRANCH=main LOCAL_BRANCH=main bundle exec rake git:release```
121
+ - ```REMOTE_BRANCH=main LOCAL_BRANCH=main bundle exec rake build```
122
122
  - ```gem push pkg/pfab-0.15.0.gem```
123
123
 
124
124
  Copyright
@@ -42,8 +42,17 @@ module Pfab
42
42
  }
43
43
  end
44
44
 
45
+
46
+ def deploy_id
47
+ "#{@data['application']}.#{application_type}.#{@data['deployed_name']}"
48
+ end
49
+
45
50
  def env_vars
46
- env_vars = { "DEPLOYED_NAME" => { value: @data['deployed_name'] } }
51
+
52
+ env_vars = { "DEPLOYED_NAME" => { value: @data['deployed_name'] },
53
+ "DEPLOY_ID" => { value: deploy_id },
54
+ "POD_ID" => { valueFrom: { fieldRef: { fieldPath: 'metadata.name' } } }
55
+ }
47
56
 
48
57
  # load defaults
49
58
  load_env_vars(env_vars, @data.dig("application_yaml", :environment))
@@ -5,6 +5,10 @@ module Pfab
5
5
  f << YAML.dump(job.deep_stringify_keys)
6
6
  end
7
7
 
8
+ def application_type
9
+ "cron"
10
+ end
11
+
8
12
  def job
9
13
  {
10
14
  apiVersion: "batch/v1beta1",
@@ -15,7 +19,8 @@ module Pfab
15
19
  labels: {
16
20
  application: @data['application'],
17
21
  "deployed-name" => @data['deployed_name'],
18
- "application-type" => "job",
22
+ "application-type" => application_type,
23
+ "deploy-id" => deploy_id
19
24
  }
20
25
  },
21
26
  spec: {
@@ -5,6 +5,10 @@ module Pfab
5
5
  f << YAML.dump(deployment.deep_stringify_keys)
6
6
  end
7
7
 
8
+ def application_type
9
+ "daemon"
10
+ end
11
+
8
12
  def deployment
9
13
  {
10
14
  kind: "Deployment",
@@ -15,7 +19,8 @@ module Pfab
15
19
  labels: {
16
20
  application: @data['application'],
17
21
  "deployed-name" => @data['deployed_name'],
18
- "application-type" => "daemon",
22
+ "application-type" => application_type,
23
+ "deploy-id" => deploy_id
19
24
  }
20
25
  },
21
26
  spec: {
@@ -5,6 +5,10 @@ module Pfab
5
5
  f << YAML.dump(job.deep_stringify_keys)
6
6
  end
7
7
 
8
+ def application_type
9
+ "job"
10
+ end
11
+
8
12
  def job
9
13
  {
10
14
  apiVersion: "batch/v1",
@@ -15,7 +19,8 @@ module Pfab
15
19
  labels: {
16
20
  application: @data['application'],
17
21
  "deployed-name" => @data['deployed_name'],
18
- "application-type" => "job",
22
+ "application-type" => application_type,
23
+ "deploy-id" => deploy_id
19
24
  }
20
25
  },
21
26
  spec: {
@@ -136,6 +136,10 @@ module Pfab
136
136
  get("readinessProbe") || default_probe
137
137
  end
138
138
 
139
+ def application_type
140
+ "web"
141
+ end
142
+
139
143
  def deployment
140
144
  {
141
145
  kind: "Deployment",
@@ -146,7 +150,8 @@ module Pfab
146
150
  labels: {
147
151
  application: @data['application'],
148
152
  "deployed-name" => @data['deployed_name'],
149
- "application-type" => "web",
153
+ "application-type" => application_type,
154
+ "deploy-id" => deploy_id
150
155
  }
151
156
  },
152
157
  spec: {
data/lib/pfab/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Pfab
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 17
4
+ MINOR = 20
5
5
  PATCH = 0
6
6
  BUILD = nil
7
7
 
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.16.0 ruby lib
5
+ # stub: pfab 0.20.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "pfab".freeze
9
- s.version = "0.16.0"
9
+ s.version = "0.20.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 = "2022-01-18"
14
+ s.date = "2022-07-16"
15
15
  s.description = "k8s helper".freeze
16
16
  s.email = "jdwyer@prefab.cloud".freeze
17
17
  s.executables = ["pfab".freeze]
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.17.0
4
+ version: 0.20.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: 2022-06-16 00:00:00.000000000 Z
11
+ date: 2022-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -133,6 +133,7 @@ extra_rdoc_files:
133
133
  files:
134
134
  - ".document"
135
135
  - ".tool-versions"
136
+ - CODEOWNERS
136
137
  - Gemfile
137
138
  - Gemfile.lock
138
139
  - LICENSE.txt