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

Addressing review comments

parent b82c9890
......@@ -39,18 +39,20 @@ module Clusters
def cluster_issuer_file
{
'cluster_issuer.yaml': cluster_issuer_yaml_content
'cluster_issuer.yaml': cluster_issuer_content.deep_merge(cluster_issue_overlay)
}
end
def cluster_issuer_yaml_content
data = YAML.load_file(cluster_issuer_file_path)
data["spec"]["acme"]["email"] = self.email
YAML.dump(data)
def cluster_issuer_content
YAML.load_file(cluster_issuer_file_path)
end
def cluster_issue_overlay
{ "spec" => { "acme" => { "email" => self.email } } }
end
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
......
......@@ -20,7 +20,7 @@ module Clusters
end
if application.has_attribute?(:email)
application.email = @current_user.email
application.email = current_user.email
end
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