pfab 0.7.0 → 0.8.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: '03967e0911ee09d5b46c3c9b3f65b40cfcf3eaa4160edea4f877a12a3262a157'
4
- data.tar.gz: b0f26e10f910e669dc40cd370179084eb0bdb9097ac07eb4cb72fe1894856b4c
3
+ metadata.gz: fe810bee0f29455479ef9ec1099a193f593560acad7e4e689e23ccc831aecc31
4
+ data.tar.gz: a6fec60c3245b54ae25b0ebd404f8569e6a1fb810b9465c721675d8e274a1df4
5
5
  SHA512:
6
- metadata.gz: 43446c3185c0ea5dab111015c490aa41f823f83aeeaa91928cc4b016c6c52a7e4a1faf2f26295e538fd6abb4b15cbc5e7ddab95ff17bab36137aa70f82df7b9f
7
- data.tar.gz: 617049c6303bfaf34c79063f6910555466dd340964b53c4c5da6740f4c62ec94dd20b01f2497ec1c9cd4f877ba99baa4438fa7c8c6bb9e75bbdcb38365863345
6
+ metadata.gz: 5752604311d05c5c92020d7a3fbe665b64b726ac965ce2cabbc37b0de5ff4f32bfdd848a485005fbf3a92cee124a175b56dcf045f9a0a4006fc3c46a16b9ea16
7
+ data.tar.gz: 927a761dbf04b92adaa52cd28ed0428dcb733f924abb8a44d46748c92d52aa9b572fbb958d8ed8758c4662a995ff12f476451dad72edbf61ffa56aa7dbb133f7
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.8.0
@@ -172,7 +172,7 @@ module Pfab
172
172
  def cmd_build(force: false)
173
173
  rev = get_current_sha
174
174
  say "This repo is at rev: #{rev}"
175
- uncommitted_changes = `git diff-index HEAD --`.empty?
175
+ uncommitted_changes = !`git diff-index HEAD --`.empty?
176
176
  if uncommitted_changes
177
177
  say "FYI! There are uncommitted changes."
178
178
  continue = agree("Continue anyway?")
@@ -60,7 +60,7 @@ module Pfab
60
60
 
61
61
  def load_env_vars(env_vars, hash)
62
62
  (hash || {}).each do |env_var_name, v|
63
- if v.start_with? "field/"
63
+ if v.to_s.start_with? "field/"
64
64
  (_, field_name) = v.split("/")
65
65
  env_vars << { name: env_var_name, valueFrom: {
66
66
  fieldRef: { fieldPath: field_name }
@@ -48,26 +48,31 @@ module Pfab
48
48
  annotations: ingress_annotations,
49
49
  },
50
50
  spec: {
51
- rules: [
52
- {
53
- host: get("host"),
54
- http: {
55
- paths: [
56
- {
57
- path: "/",
58
- backend: {
59
- serviceName: @data['deployed_name'],
60
- servicePort: "http",
61
- },
62
- },
63
- ],
64
- },
65
- },
66
- ],
51
+ rules: rules,
67
52
  },
68
53
  }
69
54
  end
70
55
 
56
+ def rules
57
+ hosts = get("host").split(",")
58
+ hosts.map do |host|
59
+ {
60
+ host: host,
61
+ http: {
62
+ paths: [
63
+ {
64
+ path: "/",
65
+ backend: {
66
+ serviceName: @data['deployed_name'],
67
+ servicePort: "http",
68
+ },
69
+ },
70
+ ],
71
+ },
72
+ }
73
+ end
74
+ end
75
+
71
76
  def ingress_annotations
72
77
  h = {
73
78
  "kubernetes.io/ingress.class" => "traefik",
@@ -89,6 +94,7 @@ module Pfab
89
94
  port: get("port"),
90
95
  },
91
96
  initialDelaySeconds: 15,
97
+ timeoutSeconds: 3
92
98
  }
93
99
  end
94
100
 
@@ -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.7.0 ruby lib
5
+ # stub: pfab 0.8.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "pfab".freeze
9
- s.version = "0.7.0"
9
+ s.version = "0.8.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 = "2019-01-10"
14
+ s.date = "2019-01-22"
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.7.0
4
+ version: 0.8.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: 2019-01-10 00:00:00.000000000 Z
11
+ date: 2019-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander