Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load-balancers: add support for disable_lets_encrypt_dns_records field #286

Merged
merged 1 commit into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Version 3.16.0

- #266 load balancers: add new field disable_lets_encrypt_dns_records - @dikshant

## Version 3.15.0

- #283 - @sunny-b - K8s: add ha and supported_features fields
Expand Down
1 change: 1 addition & 0 deletions lib/droplet_kit/mappings/load_balancer_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class LoadBalancerMapping
property :sticky_sessions, include: StickySessionMapping
property :health_check, include: HealthCheckMapping
property :forwarding_rules, plural: true, include: ForwardingRuleMapping
property :disable_lets_encrypt_dns_records
end

scoped :update, :create do
Expand Down
1 change: 1 addition & 0 deletions lib/droplet_kit/models/load_balancer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class LoadBalancer < BaseModel
attribute :redirect_http_to_https, Boolean, :default => false
attribute :enable_proxy_protocol, Boolean, :default => false
attribute :enable_backend_keepalive, Boolean, :default => false
attribute :disable_lets_encrypt_dns_records, Boolean, :default => false
attribute :droplet_ids
attribute :sticky_sessions, StickySession
attribute :health_check
Expand Down
9 changes: 6 additions & 3 deletions spec/fixtures/load_balancers/all.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
],
"redirect_http_to_https": false,
"enable_proxy_protocol": false,
"enable_backend_keepalive": false
"enable_backend_keepalive": false,
"disable_lets_encrypt_dns_records": true
},
{
"id": "3de7ac8b-495b-4884-9a69-1050c6793cd6",
Expand Down Expand Up @@ -124,7 +125,8 @@
"droplet_ids": [],
"redirect_http_to_https": true,
"enable_proxy_protocol": false,
"enable_backend_keepalive": false
"enable_backend_keepalive": false,
"disable_lets_encrypt_dns_records": false
},
{
"id": "3de7ac8b-495b-4884-9a69-1050c6793cd6",
Expand Down Expand Up @@ -190,7 +192,8 @@
"droplet_ids": [],
"redirect_http_to_https": true,
"enable_proxy_protocol": false,
"enable_backend_keepalive": false
"enable_backend_keepalive": false,
"disable_lets_encrypt_dns_records": false
}
],
"links": {
Expand Down
3 changes: 2 additions & 1 deletion spec/fixtures/load_balancers/find.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
],
"redirect_http_to_https": false,
"enable_proxy_protocol": false,
"enable_backend_keepalive": false
"enable_backend_keepalive": false,
"disable_lets_encrypt_dns_records": true
}
}
2 changes: 2 additions & 0 deletions spec/lib/droplet_kit/resources/load_balancer_resource_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
check_interval_seconds: 10, response_timeout_seconds: 5,
healthy_threshold: 5, unhealthy_threshold: 3))
expect(load_balancer.forwarding_rules.count).to eq(2)
expect(load_balancer.disable_lets_encrypt_dns_records).to eq(true)
expect(load_balancer.forwarding_rules.first.attributes)
.to match(a_hash_including(entry_protocol: 'http', entry_port: 80,
target_protocol: 'http', target_port: 80,
Expand Down Expand Up @@ -81,6 +82,7 @@
enable_backend_keepalive: true,
region: 'nyc1',
size: 'lb-small',
disable_lets_encrypt_dns_records: true,
forwarding_rules: [
DropletKit::ForwardingRule.new(
entry_protocol: 'https',
Expand Down