ood_core 0.17.5 → 0.17.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5611442cd9ae16b3716ae1b7acc1188868590447745ef8cebd74a009eebf34b
|
4
|
+
data.tar.gz: 07226bc4c9dcdf6bd82a8adce1b738adbb9730ec4a64cdbed2313f8a7724c0c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ba4ced751b6ee01c55ef9a2ceb9efeafe317b6f5b2a351ba231a23a4a1999ff00c62a9ba595e83b1101216fdd89f2d9b18c6d34ed7684af05a75fef87d673d5
|
7
|
+
data.tar.gz: 3ff4e64fac908455303e2df27d1a1825f1ebbf234caa0d8eb1be6a5a5b0b89122d6fb2c4490139c49b4022b088e85ddeb73104ef6b1b6be1e66771f1921aeb11
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.17.6] - 8-24-2021
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- kubernetes now allows for arbitrary labels to be set in [317](https://github.com/OSC/ood_core/pull/317).
|
15
|
+
- kubernetes now allows for limits and requests to be different in [318](https://github.com/OSC/ood_core/pull/318).
|
16
|
+
|
10
17
|
## [0.17.5] - 8-20-2021
|
11
18
|
|
12
19
|
### Fixed
|
@@ -380,7 +387,8 @@ Functionally the same as [0.17.3] but with some CI updates.
|
|
380
387
|
### Added
|
381
388
|
- Initial release!
|
382
389
|
|
383
|
-
[Unreleased]: https://github.com/OSC/ood_core/compare/v0.17.
|
390
|
+
[Unreleased]: https://github.com/OSC/ood_core/compare/v0.17.6...HEAD
|
391
|
+
[0.17.6]: https://github.com/OSC/ood_core/compare/v0.17.5...v0.17.6
|
384
392
|
[0.17.5]: https://github.com/OSC/ood_core/compare/v0.17.4...v0.17.5
|
385
393
|
[0.17.4]: https://github.com/OSC/ood_core/compare/v0.17.3...v0.17.4
|
386
394
|
[0.17.3]: https://github.com/OSC/ood_core/compare/v0.17.2...v0.17.3
|
@@ -49,14 +49,17 @@ class OodCore::Job::Adapters::Kubernetes::Helper
|
|
49
49
|
command: parse_command(container[:command]),
|
50
50
|
port: container[:port],
|
51
51
|
env: default_env.merge(env),
|
52
|
-
|
53
|
-
|
52
|
+
memory_limit: container[:memory_limit] || container[:memory],
|
53
|
+
memory_request: container[:memory_request] || container[:memory],
|
54
|
+
cpu_limit: container[:cpu_limit] || container[:cpu],
|
55
|
+
cpu_request: container[:cpu_request] || container[:cpu],
|
54
56
|
working_dir: container[:working_dir],
|
55
57
|
restart_policy: container[:restart_policy],
|
56
58
|
image_pull_policy: container[:image_pull_policy],
|
57
59
|
image_pull_secret: container[:image_pull_secret],
|
58
60
|
supplemental_groups: container[:supplemental_groups],
|
59
61
|
startup_probe: container[:startup_probe],
|
62
|
+
labels: container[:labels],
|
60
63
|
)
|
61
64
|
end
|
62
65
|
|
@@ -55,14 +55,16 @@ module OodCore::Job::Adapters::Kubernetes::Resources
|
|
55
55
|
end
|
56
56
|
|
57
57
|
class Container
|
58
|
-
attr_accessor :name, :image, :command, :port, :env, :
|
58
|
+
attr_accessor :name, :image, :command, :port, :env, :working_dir,
|
59
|
+
:memory_limit, :memory_request, :cpu_limit, :cpu_request,
|
59
60
|
:restart_policy, :image_pull_policy, :image_pull_secret, :supplemental_groups,
|
60
|
-
:startup_probe
|
61
|
+
:startup_probe, :labels
|
61
62
|
|
62
63
|
def initialize(
|
63
|
-
name, image, command: [], port: nil, env: {},
|
64
|
+
name, image, command: [], port: nil, env: {},
|
65
|
+
memory_limit: nil, memory_request: nil, cpu_limit: nil, cpu_request: nil,
|
64
66
|
working_dir: "", restart_policy: "Never", image_pull_policy: nil, image_pull_secret: nil, supplemental_groups: [],
|
65
|
-
startup_probe: {}
|
67
|
+
startup_probe: {}, labels: {}
|
66
68
|
)
|
67
69
|
raise ArgumentError, "containers need valid names and images" unless name && image
|
68
70
|
|
@@ -71,14 +73,17 @@ module OodCore::Job::Adapters::Kubernetes::Resources
|
|
71
73
|
@command = command.nil? ? [] : command
|
72
74
|
@port = port&.to_i
|
73
75
|
@env = env.nil? ? {} : env
|
74
|
-
@
|
75
|
-
@
|
76
|
+
@memory_limit = memory_limit.nil? ? "4Gi" : memory_limit
|
77
|
+
@memory_request = memory_request.nil? ? "4Gi" : memory_request
|
78
|
+
@cpu_limit = cpu_limit.nil? ? "1" : cpu_limit
|
79
|
+
@cpu_request = cpu_request.nil? ? "1" : cpu_request
|
76
80
|
@working_dir = working_dir.nil? ? "" : working_dir
|
77
81
|
@restart_policy = restart_policy.nil? ? "Never" : restart_policy
|
78
82
|
@image_pull_policy = image_pull_policy.nil? ? "IfNotPresent" : image_pull_policy
|
79
83
|
@image_pull_secret = image_pull_secret
|
80
84
|
@supplemental_groups = supplemental_groups.nil? ? [] : supplemental_groups
|
81
85
|
@startup_probe = TCPProbe.new(@port, startup_probe)
|
86
|
+
@labels = labels.nil? ? {} : labels
|
82
87
|
end
|
83
88
|
|
84
89
|
def ==(other)
|
@@ -87,14 +92,17 @@ module OodCore::Job::Adapters::Kubernetes::Resources
|
|
87
92
|
command == other.command &&
|
88
93
|
port == other.port &&
|
89
94
|
env == other.env &&
|
90
|
-
|
91
|
-
|
95
|
+
memory_limit == other.memory_limit &&
|
96
|
+
memory_request == other.memory_request &&
|
97
|
+
cpu_limit == other.cpu_limit &&
|
98
|
+
cpu_request == other.cpu_request &&
|
92
99
|
working_dir == other.working_dir &&
|
93
100
|
restart_policy == other.restart_policy &&
|
94
101
|
image_pull_policy == other.image_pull_policy &&
|
95
102
|
image_pull_secret == other.image_pull_secret &&
|
96
103
|
supplemental_groups == other.supplemental_groups &&
|
97
|
-
startup_probe.to_h == other.startup_probe.to_h
|
104
|
+
startup_probe.to_h == other.startup_probe.to_h &&
|
105
|
+
labels.to_h == other.labels.to_h
|
98
106
|
end
|
99
107
|
end
|
100
108
|
|
@@ -10,6 +10,9 @@ metadata:
|
|
10
10
|
<%- if !script.accounting_id.nil? && script.accounting_id != "" -%>
|
11
11
|
account: <%= script.accounting_id %>
|
12
12
|
<%- end -%>
|
13
|
+
<%- spec.container.labels.each_pair do |key, value| -%>
|
14
|
+
<%= key %>: "<%= value %>"
|
15
|
+
<%- end -%>
|
13
16
|
annotations:
|
14
17
|
<%- unless script.wall_time.nil? -%>
|
15
18
|
pod.kubernetes.io/lifetime: <%= helper.seconds_to_duration(script.wall_time) %>
|
@@ -88,14 +91,14 @@ spec:
|
|
88
91
|
<%- end # configmap mounts? and all_mounts not empty -%>
|
89
92
|
resources:
|
90
93
|
limits:
|
91
|
-
memory: "<%= spec.container.
|
92
|
-
cpu: "<%= spec.container.
|
94
|
+
memory: "<%= spec.container.memory_limit %>"
|
95
|
+
cpu: "<%= spec.container.cpu_limit %>"
|
93
96
|
<%- unless script.gpus_per_node.nil? -%>
|
94
97
|
<%= gpu_type %>: <%= script.gpus_per_node %>
|
95
98
|
<%- end -%>
|
96
99
|
requests:
|
97
|
-
memory: "<%= spec.container.
|
98
|
-
cpu: "<%= spec.container.
|
100
|
+
memory: "<%= spec.container.memory_request %>"
|
101
|
+
cpu: "<%= spec.container.cpu_request %>"
|
99
102
|
<%- unless script.gpus_per_node.nil? -%>
|
100
103
|
<%= gpu_type %>: <%= script.gpus_per_node %>
|
101
104
|
<%- end -%>
|
data/lib/ood_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ood_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Franz
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-08-
|
13
|
+
date: 2021-08-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ood_support
|