Skip to content
Open
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: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ruby:2.5.1-slim AS base
FROM ruby:2.5.9-slim-buster AS base

ENV BUNDLER_VERSION 2.1.4
ENV RAILS_LOG_TO_STDOUT true

RUN echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list
RUN echo "deb http://archive.debian.org/debian buster main" > /etc/apt/sources.list
RUN apt-get -y update && \
apt-get -y install apt-transport-https curl gnupg libpq5 shared-mime-info && \
(curl https://baltocdn.com/helm/signing.asc | apt-key add -) && \
Expand Down
10 changes: 9 additions & 1 deletion app/controllers/api/v2/infrastructures_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,14 @@ def profile_by_cluster_name
cluster_name: @helm_infrastructure.cluster_name,
consul_host: '',
consul_hosts: [],
producer_address: @app_group&.producer_address,
producer_mtls_enabled: @app_group&.producer_mtls_enabled?,
producer_location: @app_group&.producer_location,
kibana_address: @app_group&.kibana_address,
kibana_mtls_enabled: @app_group&.kibana_mtls_enabled?,
kibana_location: @app_group&.kibana_location,
elasticsearch_address: @app_group&.elasticsearch_address,
elasticsearch_status: @app_group&.elasticsearch_status,
kibana_mtls_enabled: @app_group&.kibana_mtls_enabled?,
status: @helm_infrastructure.status,
provisioning_status: @helm_infrastructure.provisioning_status,
created_at: @helm_infrastructure.created_at.strftime(Figaro.env.timestamp_format),
Expand Down Expand Up @@ -188,7 +192,11 @@ def profile_by_app_group_name
app_group_secret: @app_group.secret_key,
capacity: @helm_infrastructure.helm_cluster_template.name,
cluster_name: @helm_infrastructure.cluster_name,
producer_adddress: @app_group&.producer_address,
producer_mtls_enabled: @app_group&.producer_mtls_enabled?,
producer_location: @app_group&.producer_location,
kibana_address: @app_group&.kibana_address,
kibana_location: @app_group&.kibana_location,
kibana_mtls_enabled: @app_group&.kibana_mtls_enabled?,
status: @helm_infrastructure.status,
provisioning_status: @helm_infrastructure.provisioning_status,
Expand Down
12 changes: 12 additions & 0 deletions app/controllers/api/v3/infrastructures_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,14 @@ def profile_by_cluster_name
name: @app_group.name,
secret_key: @app_group.secret_key,
cluster_name: @app_group.cluster_name,
producer_address: @app_group&.producer_address,
producer_mtls_enabled: @app_group&.producer_mtls_enabled?,
producer_location: @app_group&.producer_location,
kibana_address: @app_group.kibana_address,
kibana_mtls_enabled: @app_group&.kibana_mtls_enabled?,
kibana_location: @app_group&.kibana_location,
elasticsearch_address: @app_group&.elasticsearch_address,
elasticsearch_status: @app_group&.elasticsearch_status,
status: @app_group.status,
created_at: @app_group.created_at.strftime(Figaro.env.timestamp_format),
updated_at: @app_group.updated_at.strftime(Figaro.env.timestamp_format),
Expand Down Expand Up @@ -159,7 +165,13 @@ def profile_by_app_group_name
name: @app_group.name,
secret_key: @app_group.secret_key,
cluster_name: @app_group.cluster_name,
producer_address: @app_group&.producer_address,
producer_mtls_enabled: @app_group&.producer_mtls_enabled?,
producer_location: @app_group&.producer_location,
kibana_address: @app_group.kibana_address,
kibana_location: @app_group&.kibana_location,
elasticsearch_address: @app_group&.elasticsearch_address,
elasticsearch_status: @app_group&.elasticsearch_status,
kibana_mtls_enabled: @app_group&.kibana_mtls_enabled?,
status: @app_group.status,
created_at: @app_group.created_at.strftime(Figaro.env.timestamp_format),
Expand Down
4 changes: 4 additions & 0 deletions spec/requests/api/v2/infrastructures_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@
expect(json_response['app_group_name']).to eq(helm_infrastructure.app_group_name)
expect(json_response['app_group_secret']).to eq(helm_infrastructure.app_group_secret)
expect(json_response['capacity']).to eq(helm_infrastructure.helm_cluster_template.name)
expect(json_response['producer_location']).to eq(app_group.producer_location)
expect(json_response['kibana_location']).to eq(app_group.kibana_location)
expect(json_response.key?('updated_at')).to eq(true)
expect(json_response['kibana_address']).to eq(app_group.kibana_address)
end
Expand Down Expand Up @@ -161,6 +163,8 @@
expect(json_response['app_group_name']).to eq(helm_infrastructure.app_group_name)
expect(json_response['app_group_secret']).to eq(helm_infrastructure.app_group_secret)
expect(json_response['capacity']).to eq(helm_infrastructure.helm_cluster_template.name)
expect(json_response['producer_location']).to eq(app_group.producer_location)
expect(json_response['kibana_location']).to eq(app_group.kibana_location)
expect(json_response.key?('updated_at')).to eq(true)
expect(json_response['kibana_address']).to eq(app_group.kibana_address)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/api/v3/infrastructures_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
headers: headers
json_response = JSON.parse(response.body)

%w[name id secret_key cluster_name kibana_address status]
%w[name id secret_key cluster_name kibana_address status producer_location kibana_location]
.each do |key|
expect(json_response.key?(key)).to eq(true)
expect(json_response[key]).to eq(app_group.send(key.to_sym))
Expand Down