pfab 0.58.17 → 0.58.18
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/CODEOWNERS +2 -0
- data/lib/pfab/templates/base.rb +34 -0
- data/lib/pfab/templates/cron.rb +3 -22
- data/lib/pfab/templates/daemon.rb +2 -17
- data/lib/pfab/templates/job.rb +2 -17
- data/lib/pfab/templates/web.rb +6 -25
- data/lib/pfab/version.rb +1 -1
- data/lib/pfab/yamls.rb +1 -0
- data/pfab.gemspec +4 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49ab8d90eaed3d15f16ca811102a36d316bbd3b7bbcebf0dccc6d664cb1bbc85
|
4
|
+
data.tar.gz: 27706a86056773d0624ce4d5bc2490e1c1b790ee9a0104eec59b560799d7adc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2f67d0e51a3d34d7aa16c1b952da6875a1e5c2db30c2f0a17e18d2ea95f690780fe79f13308e69fca6f3b104887239baefac289d7ec6c88b176a262b2087e26
|
7
|
+
data.tar.gz: 571e3e47519eb6756153281cad1521065cf1da6e1e63b0d3d7e47c8047b8c00b725f6ef64b471558f76f81c501eed37b758f9c7017b44d80a84cce0dfd6ed56b
|
data/.github/CODEOWNERS
ADDED
data/lib/pfab/templates/base.rb
CHANGED
@@ -163,6 +163,40 @@ module Pfab
|
|
163
163
|
|
164
164
|
return ports
|
165
165
|
end
|
166
|
+
|
167
|
+
def base_labels
|
168
|
+
{
|
169
|
+
application: @data['application'],
|
170
|
+
"deployed-name" => @data['deployed_name'],
|
171
|
+
}
|
172
|
+
end
|
173
|
+
|
174
|
+
def metadata_labels
|
175
|
+
base_labels.merge({
|
176
|
+
"application-type" => application_type,
|
177
|
+
"deploy-id" => deploy_id,
|
178
|
+
})
|
179
|
+
end
|
180
|
+
|
181
|
+
def datadog_labels
|
182
|
+
labels = {
|
183
|
+
"tags.datadoghq.com/env" => @data['env'],
|
184
|
+
"tags.datadoghq.com/service" => @data['deployed_name'],
|
185
|
+
"tags.datadoghq.com/version" => StyledYAML.double_quoted(@data['sha'])
|
186
|
+
}
|
187
|
+
labels["tags.datadoghq.com/family"] = @data['family'] if @data['family']
|
188
|
+
labels
|
189
|
+
end
|
190
|
+
|
191
|
+
def full_labels
|
192
|
+
metadata_labels.merge(datadog_labels)
|
193
|
+
end
|
194
|
+
|
195
|
+
def pod_labels
|
196
|
+
base_labels.merge({
|
197
|
+
"application-type" => application_type,
|
198
|
+
}).merge(datadog_labels)
|
199
|
+
end
|
166
200
|
end
|
167
201
|
end
|
168
202
|
end
|
data/lib/pfab/templates/cron.rb
CHANGED
@@ -16,15 +16,7 @@ module Pfab
|
|
16
16
|
metadata: {
|
17
17
|
name: "#{@data['deployed_name']}-#{@data['sha']}",
|
18
18
|
namespace: get_namespace,
|
19
|
-
labels:
|
20
|
-
application: @data['application'],
|
21
|
-
"deployed-name" => @data['deployed_name'],
|
22
|
-
"application-type" => application_type,
|
23
|
-
"deploy-id" => deploy_id,
|
24
|
-
"tags.datadoghq.com/env": @data['env'],
|
25
|
-
"tags.datadoghq.com/service": @data['deployed_name'],
|
26
|
-
"tags.datadoghq.com/version": StyledYAML.double_quoted(@data['sha'])
|
27
|
-
}
|
19
|
+
labels: full_labels
|
28
20
|
},
|
29
21
|
spec: {
|
30
22
|
schedule: get("schedule"),
|
@@ -35,23 +27,12 @@ module Pfab
|
|
35
27
|
metadata: {
|
36
28
|
name: "#{@data['deployed_name']}-#{@data['sha']}",
|
37
29
|
namespace: get_namespace,
|
38
|
-
labels:
|
39
|
-
application: @data['application'],
|
40
|
-
"deployed-name" => @data['deployed_name'],
|
41
|
-
"application-type" => "cron",
|
42
|
-
},
|
30
|
+
labels: metadata_labels,
|
43
31
|
},
|
44
32
|
spec: {
|
45
33
|
template: {
|
46
34
|
metadata: {
|
47
|
-
labels:
|
48
|
-
application: @data['application'],
|
49
|
-
"deployed-name" => @data['deployed_name'],
|
50
|
-
"application-type" => "cron",
|
51
|
-
"tags.datadoghq.com/env": @data['env'],
|
52
|
-
"tags.datadoghq.com/service": @data['deployed_name'],
|
53
|
-
"tags.datadoghq.com/version": StyledYAML.double_quoted(@data['sha'])
|
54
|
-
},
|
35
|
+
labels: pod_labels,
|
55
36
|
},
|
56
37
|
spec: {
|
57
38
|
serviceAccountName: get('serviceAccountName'),
|
@@ -16,15 +16,7 @@ module Pfab
|
|
16
16
|
metadata: {
|
17
17
|
name: @data['deployed_name'],
|
18
18
|
namespace: get_namespace,
|
19
|
-
labels:
|
20
|
-
application: @data['application'],
|
21
|
-
"deployed-name" => @data['deployed_name'],
|
22
|
-
"application-type" => application_type,
|
23
|
-
"deploy-id" => deploy_id,
|
24
|
-
"tags.datadoghq.com/env": @data['env'],
|
25
|
-
"tags.datadoghq.com/service": @data['deployed_name'],
|
26
|
-
"tags.datadoghq.com/version": StyledYAML.double_quoted(@data['sha'])
|
27
|
-
}
|
19
|
+
labels: full_labels
|
28
20
|
},
|
29
21
|
spec: {
|
30
22
|
replicas: get("replicas") || 1,
|
@@ -37,14 +29,7 @@ module Pfab
|
|
37
29
|
revisionHistoryLimit: 5,
|
38
30
|
template: {
|
39
31
|
metadata: {
|
40
|
-
labels:
|
41
|
-
application: @data['application'],
|
42
|
-
"deployed-name" => @data['deployed_name'],
|
43
|
-
"application-type" => "daemon",
|
44
|
-
"tags.datadoghq.com/env": @data['env'],
|
45
|
-
"tags.datadoghq.com/service": @data['deployed_name'],
|
46
|
-
"tags.datadoghq.com/version": StyledYAML.double_quoted(@data['sha'])
|
47
|
-
},
|
32
|
+
labels: pod_labels,
|
48
33
|
},
|
49
34
|
spec: {
|
50
35
|
serviceAccountName: get('serviceAccountName'),
|
data/lib/pfab/templates/job.rb
CHANGED
@@ -16,15 +16,7 @@ module Pfab
|
|
16
16
|
metadata: {
|
17
17
|
name: "job-#{@data['deployed_name']}-#{@data['sha']}",
|
18
18
|
namespace: get_namespace,
|
19
|
-
labels:
|
20
|
-
application: @data['application'],
|
21
|
-
"deployed-name" => @data['deployed_name'],
|
22
|
-
"application-type" => application_type,
|
23
|
-
"deploy-id" => deploy_id,
|
24
|
-
"tags.datadoghq.com/env": @data['env'],
|
25
|
-
"tags.datadoghq.com/service": @data['deployed_name'],
|
26
|
-
"tags.datadoghq.com/version": StyledYAML.double_quoted(@data['sha'])
|
27
|
-
}
|
19
|
+
labels: full_labels
|
28
20
|
},
|
29
21
|
spec: {
|
30
22
|
ttlSecondsAfterFinished: get('ttlSecondsAfterFinished'),
|
@@ -34,14 +26,7 @@ module Pfab
|
|
34
26
|
metadata: {
|
35
27
|
name: "#{@data['deployed_name']}-#{@data['sha']}",
|
36
28
|
namespace: get_namespace,
|
37
|
-
labels:
|
38
|
-
application: @data['application'],
|
39
|
-
"deployed-name" => @data['deployed_name'],
|
40
|
-
"application-type" => "job",
|
41
|
-
"tags.datadoghq.com/env": @data['env'],
|
42
|
-
"tags.datadoghq.com/service": @data['deployed_name'],
|
43
|
-
"tags.datadoghq.com/version": StyledYAML.double_quoted(@data['sha'])
|
44
|
-
},
|
29
|
+
labels: pod_labels,
|
45
30
|
},
|
46
31
|
spec: {
|
47
32
|
serviceAccountName: get('serviceAccountName'),
|
data/lib/pfab/templates/web.rb
CHANGED
@@ -39,10 +39,7 @@ module Pfab
|
|
39
39
|
metadata: {
|
40
40
|
name: @data['deployed_name'],
|
41
41
|
namespace: get_namespace,
|
42
|
-
labels:
|
43
|
-
application: @data['application'],
|
44
|
-
"deployed-name" => @data['deployed_name'],
|
45
|
-
},
|
42
|
+
labels: base_labels,
|
46
43
|
annotations: service_annotations,
|
47
44
|
},
|
48
45
|
spec: {
|
@@ -74,10 +71,7 @@ module Pfab
|
|
74
71
|
metadata: {
|
75
72
|
name: "ingress-#{@data['deployed_name']}",
|
76
73
|
namespace: get_namespace,
|
77
|
-
labels:
|
78
|
-
application: @data['application'],
|
79
|
-
"deployed-name" => @data['deployed_name'],
|
80
|
-
},
|
74
|
+
labels: base_labels,
|
81
75
|
annotations: ingress_annotations,
|
82
76
|
},
|
83
77
|
spec: {
|
@@ -265,16 +259,9 @@ module Pfab
|
|
265
259
|
metadata: {
|
266
260
|
name: @data['deployed_name'],
|
267
261
|
namespace: get_namespace,
|
268
|
-
labels: {
|
269
|
-
"application" => @data['application'],
|
270
|
-
"deployed-name" => @data['deployed_name'],
|
271
|
-
"application-type" => application_type,
|
272
|
-
"deploy-id" => deploy_id,
|
262
|
+
labels: full_labels.merge({
|
273
263
|
LABEL_DEPLOY_UNIQUE_ID => StyledYAML.double_quoted(deploy_unique_id),
|
274
|
-
|
275
|
-
"tags.datadoghq.com/service" => @data['deployed_name'],
|
276
|
-
"tags.datadoghq.com/version" => StyledYAML.double_quoted(@data['sha'])
|
277
|
-
}
|
264
|
+
})
|
278
265
|
},
|
279
266
|
spec: {
|
280
267
|
replicas: get("replicas") || 1,
|
@@ -288,15 +275,9 @@ module Pfab
|
|
288
275
|
progressDeadlineSeconds: get("progressDeadlineSeconds") || 600,
|
289
276
|
template: {
|
290
277
|
metadata: {
|
291
|
-
labels: {
|
292
|
-
application: @data['application'],
|
293
|
-
"deployed-name" => @data['deployed_name'],
|
294
|
-
"application-type" => "web",
|
278
|
+
labels: pod_labels.merge({
|
295
279
|
LABEL_DEPLOY_UNIQUE_ID => StyledYAML.double_quoted(deploy_unique_id),
|
296
|
-
|
297
|
-
"tags.datadoghq.com/service": @data['deployed_name'],
|
298
|
-
"tags.datadoghq.com/version": StyledYAML.double_quoted(@data['sha'])
|
299
|
-
},
|
280
|
+
}),
|
300
281
|
},
|
301
282
|
spec: {
|
302
283
|
serviceAccountName: get('serviceAccountName'),
|
data/lib/pfab/version.rb
CHANGED
data/lib/pfab/yamls.rb
CHANGED
@@ -13,6 +13,7 @@ module Pfab
|
|
13
13
|
'container_repository' => config["container.repository"],
|
14
14
|
'config' => config,
|
15
15
|
'application' => application_yaml["name"],
|
16
|
+
'family' => application_yaml["family"],
|
16
17
|
'application_yaml' => application_yaml,
|
17
18
|
'namespace' => namespace,
|
18
19
|
'application_yaml_hash' => application_yaml_hash
|
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.58.
|
5
|
+
# stub: pfab 0.58.18 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "pfab".freeze
|
9
|
-
s.version = "0.58.
|
9
|
+
s.version = "0.58.18"
|
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 = "2025-
|
14
|
+
s.date = "2025-08-14"
|
15
15
|
s.description = "k8s helper".freeze
|
16
16
|
s.email = "jdwyer@prefab.cloud".freeze
|
17
17
|
s.executables = ["pfab".freeze]
|
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
]
|
22
22
|
s.files = [
|
23
23
|
".document",
|
24
|
+
".github/CODEOWNERS",
|
24
25
|
".tool-versions",
|
25
26
|
"CODEOWNERS",
|
26
27
|
"Gemfile",
|
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.58.
|
4
|
+
version: 0.58.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Dwyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|
@@ -146,6 +146,7 @@ extra_rdoc_files:
|
|
146
146
|
- README.markdown
|
147
147
|
files:
|
148
148
|
- ".document"
|
149
|
+
- ".github/CODEOWNERS"
|
149
150
|
- ".tool-versions"
|
150
151
|
- CODEOWNERS
|
151
152
|
- Gemfile
|