ufo 6.3.9 → 6.3.10

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: 58373df3fe5245cc8c487d83eaa62a958ab71bb9a6173b674944ddca94207901
4
- data.tar.gz: 4a1bcee32eecc7fbfa36d596ca6d53817cab81536f4abb03a005c0d5e691536a
3
+ metadata.gz: 8d85a0063b688b43736f0b7e252e314d70d98d05871bd43238fb630b84336fea
4
+ data.tar.gz: 99baad01439788788a8a0683c03fbbbaa2af925ffc8cc09026c8d57b61e0f1fd
5
5
  SHA512:
6
- metadata.gz: f93554b98a650697c44f96f612610d48156048ef804cede7fdb9b26da8ef60f761a5a44e7cad3e4695ddbebda98398f187bd465a5e230d3e291c6f6aa84b84cd
7
- data.tar.gz: 88083854a58d89275af4d3de81d9b1a906dc57d56760fe5c28e953487c17bfb22f54a226ea6abf3197acbc57854d07ef65855915bc9e5614ff2c0897f17ac41b
6
+ metadata.gz: b38a61b1adc53e520c526b0d8d72bae8812b0cb17cb58d77c17af1e6dc823a1f671b0725ef77ecb587a2f30aed6847e4f3a669d88a2f05489721b4651eae86d2
7
+ data.tar.gz: 2958ec8b2aa3c5b69ac348fad209a5964528d4e8cb1101507e7bbddbf504c23f407181d9c9e394ec73b2f117758beb7ddba76e6953b8f48d2d08776615213279
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [6.3.10] - 2022-06-23
7
+ - [#177](https://github.com/tongueroo/ufo/pull/177) Enabled support for gRPC
8
+
6
9
  ## [6.3.9] - 2022-05-09
7
10
  - [#175](https://github.com/tongueroo/ufo/pull/175) Secrets autofix and add missing trailing ::
8
11
  - new env_file
@@ -6,11 +6,16 @@ class Ufo::Cfn::Stack::Builder::Resources
6
6
  Properties: properties
7
7
  }
8
8
 
9
- attrs[:DependsOn] = "Listener" if vars[:create_elb]
9
+ attrs[:DependsOn] = depends_on
10
10
 
11
11
  attrs
12
12
  end
13
13
 
14
+ def depends_on
15
+ return unless vars[:create_elb]
16
+ vars[:create_listener] ? "Listener" : "ListenerSsl"
17
+ end
18
+
14
19
  def properties
15
20
  props = {
16
21
  Cluster: @cluster,
@@ -14,7 +14,7 @@ class Ufo::Cfn::Stack::Builder::Resources
14
14
  Tags: [
15
15
  {Key: "Name", Value: @stack_name}
16
16
  ],
17
- Scheme: "internet-facing"
17
+ Scheme: Ufo.config.elb.scheme
18
18
  }
19
19
 
20
20
  props[:SecurityGroups] = security_groups(:elb) if vars[:elb_type] == "application"
@@ -1,6 +1,7 @@
1
1
  class Ufo::Cfn::Stack::Builder::Resources
2
2
  class Listener < Base
3
3
  def build
4
+ return unless vars[:create_listener]
4
5
  {
5
6
  Type: "AWS::ElasticLoadBalancingV2::Listener",
6
7
  Condition: "CreateElbIsTrue",
@@ -18,11 +19,11 @@ class Ufo::Cfn::Stack::Builder::Resources
18
19
  end
19
20
 
20
21
  def protocol
21
- vars[:default_listener_protocol]
22
+ Ufo.config.elb.protocol || vars[:default_listener_protocol]
22
23
  end
23
24
 
24
25
  def port
25
- 80
26
+ Ufo.config.elb.port
26
27
  end
27
28
 
28
29
  def default_actions
@@ -2,7 +2,11 @@ class Ufo::Cfn::Stack::Builder::Resources
2
2
  class ListenerSsl < Listener
3
3
  def build
4
4
  return unless vars[:create_listener_ssl]
5
- super
5
+ {
6
+ Type: "AWS::ElasticLoadBalancingV2::Listener",
7
+ Condition: "CreateElbIsTrue",
8
+ Properties: properties,
9
+ }
6
10
  end
7
11
 
8
12
  def properties
@@ -18,7 +18,6 @@ class Ufo::Cfn::Stack::Builder::Resources
18
18
  }
19
19
  ],
20
20
  Protocol: vars[:default_target_group_protocol],
21
- Port: 80,
22
21
  HealthCheckIntervalSeconds: 10,
23
22
  HealthyThresholdCount: 2,
24
23
  UnhealthyThresholdCount: 2,
@@ -36,6 +35,9 @@ class Ufo::Cfn::Stack::Builder::Resources
36
35
  props[:HealthCheckIntervalSeconds] = health_check_interval_seconds
37
36
  props[:HealthyThresholdCount] = healthy_threshold_count
38
37
  props[:UnhealthyThresholdCount] = unhealthy_threshold_count
38
+ props[:Matcher] = matcher
39
+ props[:ProtocolVersion] = protocol_version
40
+ props[:Port] = port
39
41
 
40
42
  props
41
43
  end
@@ -45,6 +47,9 @@ class Ufo::Cfn::Stack::Builder::Resources
45
47
  health_check_path
46
48
  healthy_threshold_count
47
49
  unhealthy_threshold_count
50
+ matcher
51
+ protocol_version
52
+ port
48
53
  ]
49
54
  delegate *meths, to: :elb
50
55
  def elb
@@ -8,6 +8,7 @@ class Ufo::Cfn::Stack
8
8
  cluster: @cluster,
9
9
  container: container,
10
10
  create_elb: create_elb?, # helps set Ecs DependsOn
11
+ create_listener: create_listener?,
11
12
  create_listener_ssl: create_listener_ssl?,
12
13
  create_route53: create_route53?,
13
14
  default_listener_protocol: default_listener_protocol,
@@ -58,6 +59,10 @@ class Ufo::Cfn::Stack
58
59
  elb_type == 'network' ? 'TCP' : 'HTTP'
59
60
  end
60
61
 
62
+ def create_listener?
63
+ Ufo.config.elb.listener.enabled
64
+ end
65
+
61
66
  # if the configuration is set to anything then enable it
62
67
  def create_listener_ssl?
63
68
  elb = Ufo.config.elb
data/lib/ufo/config.rb CHANGED
@@ -72,12 +72,18 @@ module Ufo
72
72
  config.elb.healthy_threshold_count = 3 # The AWS usual default is 5
73
73
  config.elb.unhealthy_threshold_count = 3
74
74
 
75
+ config.elb.listener = ActiveSupport::OrderedOptions.new
76
+ config.elb.listener.enabled = true
77
+ config.elb.matcher = nil
75
78
  config.elb.port = 80 # default listener port
79
+ config.elb.protocol = nil
80
+ config.elb.protocol_version = nil
76
81
  config.elb.redirect = ActiveSupport::OrderedOptions.new
77
82
  config.elb.redirect.code = 302 # IE: 302 or 301
78
83
  config.elb.redirect.enabled = false
79
84
  config.elb.redirect.port = 443
80
85
  config.elb.redirect.protocol = "HTTPS"
86
+ config.elb.scheme = "internet-facing"
81
87
  config.elb.ssl = ActiveSupport::OrderedOptions.new
82
88
  config.elb.ssl.certificates = nil
83
89
  config.elb.ssl.enabled = false
data/lib/ufo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ufo
2
- VERSION = "6.3.9"
2
+ VERSION = "6.3.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ufo
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.3.9
4
+ version: 6.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-09 00:00:00.000000000 Z
11
+ date: 2022-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-logs