diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-07-24 14:02:35 +0300 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-07-30 16:08:30 +0300 |
commit | 11edbcccef37f08b089386c41d3914df7f48a677 (patch) | |
tree | 3017e5e2904d11023075c5e84ddba5320e2b623f /app/models/clusters/concerns | |
parent | ce897f11a0650b0d6938cb506a030ef00160ab7a (diff) |
Get mutual SSL working with helm tiller
Diffstat (limited to 'app/models/clusters/concerns')
-rw-r--r-- | app/models/clusters/concerns/application_data.rb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/app/models/clusters/concerns/application_data.rb b/app/models/clusters/concerns/application_data.rb index 215a299dd03..7738138e753 100644 --- a/app/models/clusters/concerns/application_data.rb +++ b/app/models/clusters/concerns/application_data.rb @@ -13,9 +13,20 @@ module Clusters end def files - { - 'values.yaml': values - } + @files ||= begin + files = { 'values.yaml': values } + if cluster.application_helm.has_ssl? + ca_cert = cluster.application_helm.ca_cert + helm_cert = cluster.application_helm.issue_cert + files.merge!({ + 'ca.pem': ca_cert, + 'cert.pem': helm_cert.cert_string, + 'key.pem': helm_cert.key_string + }) + end + + files + end end private |