提交 16248dc8 编写于 作者: A Amit Rathi

Addressing review comments

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册