-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configure http-in if health uri or certs (#41)
- Loading branch information
Showing
5 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Kontena::Views | ||
module Common | ||
|
||
def ssl? | ||
ENV['SSL_CERTS'] || ENV.any? { |env, value| env.start_with? 'SSL_CERT_' } | ||
end | ||
|
||
def health_uri? | ||
ENV['KONTENA_LB_HEALTH_URI'] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
require_relative 'common' | ||
|
||
module Kontena::Views | ||
class HttpIn | ||
include Hanami::View | ||
include Kontena::Views::Common | ||
|
||
format :text | ||
template 'haproxy/http_in' | ||
|
||
def ssl? | ||
ENV['SSL_CERTS'] || ENV.any? { |env, value| env.start_with? 'SSL_CERT_' } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters