kube_cluster 0.13.0 → 0.14.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 +4 -4
- data/Gemfile.lock +1 -1
- data/flake.nix +1 -1
- data/lib/kube/cluster/standard/deployment_with_service.rb +23 -0
- data/lib/kube/cluster/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63baac3449e34445c6737e202f5fbddd0773a6bb4ceb5e839961c8a2a1bf783b
|
|
4
|
+
data.tar.gz: 0db100f62738c946c97bbf7353a3297df0f56c15388744a92527cbadcdb06a8d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0dbf476dc0f1d572d0574332d2845f4501d43df1228050267d39122f008e2a2df593ad7827fbf1b65d18d642e69bdb17c572f183af760aab65f12cdcd90eb607
|
|
7
|
+
data.tar.gz: a658aa3a28394eaa6fb50c611a841073484a35fcd50cba01e2772ebede2d86a5ea1a0162330202cc7774665c03bd15a4c8966ae130b8e0b2790ea04ac80cb719
|
data/Gemfile.lock
CHANGED
data/flake.nix
CHANGED
|
@@ -19,6 +19,8 @@ module Kube
|
|
|
19
19
|
pod_security_context: nil,
|
|
20
20
|
volume_mounts: {},
|
|
21
21
|
service_port: nil,
|
|
22
|
+
stdin: false,
|
|
23
|
+
tty: false,
|
|
22
24
|
&block
|
|
23
25
|
)
|
|
24
26
|
@_limits = {}
|
|
@@ -56,6 +58,12 @@ module Kube
|
|
|
56
58
|
container[:securityContext] = security_context if security_context
|
|
57
59
|
container[:volumeMounts] = processed_volumes[:volume_mounts] unless processed_volumes[:volume_mounts].empty?
|
|
58
60
|
|
|
61
|
+
# Keep stdin/tty open so the pod can be `kubectl attach`-ed for
|
|
62
|
+
# interactive flows (e.g. an OAuth proxy that prompts for a
|
|
63
|
+
# redirect URL on first authorization).
|
|
64
|
+
container[:stdin] = true if stdin
|
|
65
|
+
container[:tty] = true if tty
|
|
66
|
+
|
|
59
67
|
spec.template.spec.containers = [container]
|
|
60
68
|
spec.template.spec.initContainers = init_containers unless init_containers.empty?
|
|
61
69
|
spec.template.spec.volumes = processed_volumes[:volumes] unless processed_volumes[:volumes].empty?
|
|
@@ -152,5 +160,20 @@ test do
|
|
|
152
160
|
.is_a?(String)
|
|
153
161
|
.should == true
|
|
154
162
|
end
|
|
163
|
+
|
|
164
|
+
it "sets stdin/tty on the container when requested" do
|
|
165
|
+
yaml = Kube::Cluster::Standard::DeploymentWithService
|
|
166
|
+
.new(
|
|
167
|
+
name: "interactive",
|
|
168
|
+
image: "ruby/ruby",
|
|
169
|
+
port: 3000,
|
|
170
|
+
stdin: true,
|
|
171
|
+
tty: true,
|
|
172
|
+
)
|
|
173
|
+
.to_yaml
|
|
174
|
+
|
|
175
|
+
yaml.include?("stdin: true").should == true
|
|
176
|
+
yaml.include?("tty: true").should == true
|
|
177
|
+
end
|
|
155
178
|
end
|
|
156
179
|
end
|
data/lib/kube/cluster/version.rb
CHANGED