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

Addressing review comments

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