pfab 0.40.0 → 0.42.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: ea6666e8410d0fda1c32440cbc67bcccc785f0ebee5c4153d3d7b0da28ba8d70
4
- data.tar.gz: 694e207c3967ef416109e119627b77a3a90e52d52f0e02c1a2844d8b3bcedcc8
3
+ metadata.gz: cb8fdb9d42014e5ee0855cddda10afcb31289b766131d60509cbe39605b86cdc
4
+ data.tar.gz: ce3f596180201727d2b16f0c2ffcbc43293074de2487a0f06af2594b631d1f52
5
5
  SHA512:
6
- metadata.gz: 58b1891a0ed84d96f0d32c85f70676cbb62bbf4bc71a828dd5df13ef3b313464fe203bd426994557f12bc7938f4867a5c180cd31314052e094bc6b2d9a59123a
7
- data.tar.gz: efce322eb37bc567781e4331acac9f6c8f3795d1835cc8bd1a6729f9af94a10a713723114a52ba4ebe4fac53280fdbe95e87f2c2a207b4882a5945aade01fe72
6
+ metadata.gz: 1983a48a3687e294601ced06a6c361b8106792ba92baa7a80abb26c54b825232345773c352cd85fd2119ca7bb3c59358c71c9a1749ca873120d6fca443ccb8db
7
+ data.tar.gz: ea602c5c07827edcae31d50480af902205f0ed82d9ce95b8d2b59a71869f8ba18189579478cc77612cd5e02a49c4411bb3bbd8272ee85b0f6abfc91f1b84e461
data/lib/pfab/cli.rb CHANGED
@@ -117,7 +117,7 @@ module Pfab
117
117
  set_kube_context
118
118
  app_name = get_app_name
119
119
  first_pod = get_first_pod app_name
120
- kubectl "exec -it #{first_pod} -- #{options.command || '/bin/sh'}"
120
+ kubectl "exec -it #{first_pod}", "-- #{options.command || '/bin/sh'}"
121
121
  end
122
122
  end
123
123
 
@@ -265,7 +265,7 @@ module Pfab
265
265
  end
266
266
  end
267
267
 
268
- build_cmd = "docker build -t #{image_name} --platform amd64 ."
268
+ build_cmd = "docker buildx build -t #{image_name} --platform amd64 ."
269
269
  puts build_cmd
270
270
  result = system(build_cmd)
271
271
 
@@ -324,8 +324,8 @@ module Pfab
324
324
  @_config ||= YAML.load(File.read(File.join(Dir.home, ".pfab.yaml")))
325
325
  end
326
326
 
327
- def kubectl cmd
328
- puts_and_system "kubectl #{cmd} --namespace=#{yy.namespace}"
327
+ def kubectl cmd, post_cmd = ""
328
+ puts_and_system "kubectl #{cmd} --namespace=#{yy.namespace} #{post_cmd}"
329
329
  end
330
330
 
331
331
  def puts_and_system cmd
@@ -186,6 +186,17 @@ module Pfab
186
186
  readOnly: true
187
187
  )
188
188
  end
189
+ ports = [ {
190
+ name: "main",
191
+ containerPort: app_vars["port"]
192
+ }]
193
+ if get("additionalPorts")
194
+ get("additionalPorts").each do |name, number|
195
+ ports.append(
196
+ {name: name, containerPort: number}
197
+ )
198
+ end
199
+ end
189
200
 
190
201
  {
191
202
  kind: "Deployment",
@@ -239,16 +250,7 @@ module Pfab
239
250
  command: get_command,
240
251
  env: env_vars,
241
252
  resources: resources,
242
- ports: [
243
- {
244
- name: "main",
245
- containerPort: app_vars["port"]
246
- },
247
- {
248
- name: "health-port",
249
- containerPort: 8085 # the default micronaut endpoint port
250
- }
251
- ],
253
+ ports: ports,
252
254
  livenessProbe: livenessProbe,
253
255
  readinessProbe: readinessProbe,
254
256
  startupProbe: startupProbe,
data/lib/pfab/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Pfab
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 40
4
+ MINOR = 42
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.40.0 ruby lib
5
+ # stub: pfab 0.42.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "pfab".freeze
9
- s.version = "0.40.0"
9
+ s.version = "0.42.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 = "2023-04-14"
14
+ s.date = "2023-05-10"
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.40.0
4
+ version: 0.42.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: 2023-04-14 00:00:00.000000000 Z
11
+ date: 2023-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander