Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Remove monolithic consul link from consul-release.
Browse files Browse the repository at this point in the history
[#144556775]

Signed-off-by: Genevieve LEsperance <glesperance@pivotal.io>
  • Loading branch information
christianang authored and Genevieve LEsperance committed May 16, 2017
1 parent dfe50b6 commit c3a8f01
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 77 deletions.
22 changes: 0 additions & 22 deletions jobs/consul_agent/spec
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,6 @@ provides:
- consul.agent_cert
- consul.agent_key

- name: consul
type: consul
properties:
- consul.agent.servers.lan
- consul.agent.log_level
- consul.agent.datacenter
- consul.agent.protocol_version
- consul.agent.dns_config.allow_stale
- consul.agent.dns_config.max_stale
- consul.agent.dns_config.recursor_timeout
- consul.agent.domain
- consul.ca_cert
- consul.server_cert
- consul.server_key
- consul.agent_cert
- consul.agent_key
- consul.encrypt_keys

consumes:
- name: consul_common
type: consul_common
Expand All @@ -77,10 +59,6 @@ consumes:
type: consul_client
optional: true

- name: consul
type: consul
optional: true

properties:
consul.agent.mode:
description: "Mode to run the agent in. (client or server)"
Expand Down
6 changes: 1 addition & 5 deletions jobs/consul_agent/templates/agent.crt.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
respond_to?(:if_link) && if_link("consul_client") do |link|
agent_cert = link.p("consul.agent_cert")
end.else do
respond_to?(:if_link) && if_link("consul") do |link|
agent_cert = link.p("consul.agent_cert")
end.else do
agent_cert = p("consul.agent_cert")
end
agent_cert = p("consul.agent_cert")
end

agent_cert
Expand Down
6 changes: 1 addition & 5 deletions jobs/consul_agent/templates/agent.key.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
respond_to?(:if_link) && if_link("consul_client") do |link|
agent_key = link.p("consul.agent_key")
end.else do
respond_to?(:if_link) && if_link("consul") do |link|
agent_key = link.p("consul.agent_key")
end.else do
agent_key = p("consul.agent_key")
end
agent_key = p("consul.agent_key")
end

agent_key
Expand Down
6 changes: 1 addition & 5 deletions jobs/consul_agent/templates/ca.crt.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
respond_to?(:if_link) && if_link("consul_common") do |link|
ca_cert = link.p("consul.ca_cert")
end.else do
respond_to?(:if_link) && if_link("consul") do |link|
ca_cert = link.p("consul.ca_cert")
end.else do
ca_cert = p("consul.ca_cert")
end
ca_cert = p("consul.ca_cert")
end

ca_cert
Expand Down
5 changes: 0 additions & 5 deletions jobs/consul_agent/templates/consul_link.json.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<%=
consul_hash = {}

respond_to?(:if_link) && if_link('consul') do |consul_link|
consul_hash.merge!(consul_link.p('consul'))
consul_hash['agent']['servers']['lan'] = consul_link.instances.map(&:address)
end

respond_to?(:if_link) && if_link('consul_common') do |consul_link|
consul_hash.merge!(consul_link.p('consul'))
consul_hash['agent']['servers']['lan'] = consul_link.instances.map(&:address)
Expand Down
6 changes: 1 addition & 5 deletions jobs/consul_agent/templates/server.crt.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
respond_to?(:if_link) && if_link("consul_server") do |link|
server_cert = link.p("consul.server_cert")
end.else do
respond_to?(:if_link) && if_link("consul") do |link|
server_cert = link.p("consul.server_cert")
end.else do
server_cert = p("consul.server_cert")
end
server_cert = p("consul.server_cert")
end

server_cert
Expand Down
6 changes: 1 addition & 5 deletions jobs/consul_agent/templates/server.key.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
respond_to?(:if_link) && if_link("consul_server") do |link|
server_key = link.p("consul.server_key")
end.else do
respond_to?(:if_link) && if_link("consul") do |link|
server_key = link.p("consul.server_key")
end.else do
server_key = p("consul.server_key")
end
server_key = p("consul.server_key")
end

server_key
Expand Down
4 changes: 0 additions & 4 deletions jobs/consul_agent_windows/spec
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ consumes:
type: consul_client
optional: true

- name: consul
type: consul
optional: true

properties:
consul.agent.servers.lan:
description: "LAN server addresses to join on start."
Expand Down
6 changes: 1 addition & 5 deletions jobs/consul_agent_windows/templates/agent.crt.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
respond_to?(:if_link) && if_link("consul_client") do |link|
agent_cert = link.p("consul.agent_cert")
end.else do
respond_to?(:if_link) && if_link("consul") do |link|
agent_cert = link.p("consul.agent_cert")
end.else do
agent_cert = p("consul.agent_cert")
end
agent_cert = p("consul.agent_cert")
end

agent_cert
Expand Down
6 changes: 1 addition & 5 deletions jobs/consul_agent_windows/templates/agent.key.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
respond_to?(:if_link) && if_link("consul_client") do |link|
agent_key = link.p("consul.agent_key")
end.else do
respond_to?(:if_link) && if_link("consul") do |link|
agent_key = link.p("consul.agent_key")
end.else do
agent_key = p("consul.agent_key")
end
agent_key = p("consul.agent_key")
end

agent_key
Expand Down
6 changes: 1 addition & 5 deletions jobs/consul_agent_windows/templates/ca.crt.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
respond_to?(:if_link) && if_link("consul_common") do |link|
ca_cert = link.p("consul.ca_cert")
end.else do
respond_to?(:if_link) && if_link("consul") do |link|
ca_cert = link.p("consul.ca_cert")
end.else do
ca_cert = p("consul.ca_cert")
end
ca_cert = p("consul.ca_cert")
end

ca_cert
Expand Down
5 changes: 0 additions & 5 deletions jobs/consul_agent_windows/templates/consul_link.json.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<%=
consul_hash = {}

respond_to?(:if_link) && if_link('consul') do |consul_link|
consul_hash.merge!(consul_link.p('consul'))
consul_hash['agent']['servers']['lan'] = consul_link.instances.map(&:address)
end

respond_to?(:if_link) && if_link('consul_common') do |consul_link|
consul_hash.merge!(consul_link.p('consul'))
consul_hash['agent']['servers']['lan'] = consul_link.instances.map(&:address)
Expand Down

0 comments on commit c3a8f01

Please sign in to comment.