Commit 16248dc8 authored by Amit Rathi's avatar Amit Rathi

Addressing review comments

parent b82c9890
...@@ -39,18 +39,20 @@ module Clusters ...@@ -39,18 +39,20 @@ module Clusters
def cluster_issuer_file def cluster_issuer_file
{ {
'cluster_issuer.yaml': cluster_issuer_yaml_content 'cluster_issuer.yaml': cluster_issuer_content.deep_merge(cluster_issue_overlay)
} }
end end
def cluster_issuer_yaml_content def cluster_issuer_content
data = YAML.load_file(cluster_issuer_file_path) YAML.load_file(cluster_issuer_file_path)
data["spec"]["acme"]["email"] = self.email end
YAML.dump(data)
def cluster_issue_overlay
{ "spec" => { "acme" => { "email" => self.email } } }
end end
def cluster_issuer_file_path def cluster_issuer_file_path
"#{Rails.root}/vendor/cert_manager/cluster_issuer.yaml" Rails.root.join('vendor', 'cert_manager', 'cluster_issuer.yaml')
end end
end end
end end
......
...@@ -20,7 +20,7 @@ module Clusters ...@@ -20,7 +20,7 @@ module Clusters
end end
if application.has_attribute?(:email) if application.has_attribute?(:email)
application.email = @current_user.email application.email = current_user.email
end end
if application.respond_to?(:oauth_application) if application.respond_to?(:oauth_application)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment