diff options
author | Amit Rathi <amit@hypertrack.io> | 2018-11-13 20:36:06 +0530 |
---|---|---|
committer | Amit Rathi <amit@hypertrack.io> | 2018-11-13 20:36:06 +0530 |
commit | 631ab89885c99c6bec348a884c40d9f4214c6878 (patch) | |
tree | 4cdca60baa6713d5cbebc637301794f077dbae78 /app/models/clusters/applications | |
parent | 9d91d79c6b0b76e9bc8ed85787045b549824d7cd (diff) | |
download | gitlab-ce-631ab89885c99c6bec348a884c40d9f4214c6878.tar.gz |
Use email on the account
Diffstat (limited to 'app/models/clusters/applications')
-rw-r--r-- | app/models/clusters/applications/cert_manager.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/app/models/clusters/applications/cert_manager.rb b/app/models/clusters/applications/cert_manager.rb index c211a13db94..e2cc39ca5c5 100644 --- a/app/models/clusters/applications/cert_manager.rb +++ b/app/models/clusters/applications/cert_manager.rb @@ -33,10 +33,17 @@ module Clusters rbac: cluster.platform_kubernetes_rbac?, chart: chart, files: files.merge!(cluster_issuer_file), - postinstall: post_install_script + postinstall: post_install_script, + application_flags: install_command_flags ) end + def install_command_flags + ['--set', 'ingressShim.defaultIssuerName=letsencrypt-prod'] + + ['--set', 'ingressShim.defaultIssuerKind=ClusterIssuer'] + + ['--set', 'rbac.create=false'] + end + private def post_install_script @@ -45,10 +52,16 @@ module Clusters def cluster_issuer_file { - 'cluster_issuer.yaml': File.read(cluster_issuer_file_path) + 'cluster_issuer.yaml': cluster_issuer_yaml_content } end + def cluster_issuer_yaml_content + data = YAML.load_file(cluster_issuer_file_path) + data["spec"]["acme"]["email"] = self.email + YAML.dump(data) + end + def cluster_issuer_file_path "#{Rails.root}/vendor/cert_manager/cluster_issuer.yaml" end |