summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Rathi <amit@hypertrack.io>2018-11-13 17:38:04 +0530
committerAmit Rathi <amit@hypertrack.io>2018-11-13 17:38:04 +0530
commit6dda43d67ed3c85611f41a344c766bc6a8b95ccf (patch)
treeaeb0394f1e72328a45c1b07eae4fa0da7166fb42
parent27ce6140433afa5b758272af204820599cf4fac4 (diff)
downloadgitlab-ce-6dda43d67ed3c85611f41a344c766bc6a8b95ccf.tar.gz
Cleanup
-rw-r--r--app/assets/javascripts/clusters/components/applications.vue1
-rw-r--r--app/models/clusters/applications/cert_manager.rb34
-rw-r--r--app/services/clusters/applications/check_installation_progress_service.rb4
-rw-r--r--app/services/clusters/applications/install_service.rb2
-rw-r--r--app/workers/cluster_install_app_worker.rb1
-rw-r--r--db/migrate/20181101191341_create_clusters_applications_cert_manager.rb4
-rw-r--r--lib/gitlab/kubernetes/helm/api.rb2
-rw-r--r--vendor/cert_manager/cluster_issuer.yaml2
8 files changed, 11 insertions, 39 deletions
diff --git a/app/assets/javascripts/clusters/components/applications.vue b/app/assets/javascripts/clusters/components/applications.vue
index 2229e659e1f..7b58c4066eb 100644
--- a/app/assets/javascripts/clusters/components/applications.vue
+++ b/app/assets/javascripts/clusters/components/applications.vue
@@ -317,6 +317,7 @@ export default {
</application-row>
<application-row
id="prometheus"
+ v-if="isProjectCluster"
:logo-url="prometheusLogo"
:title="applications.prometheus.title"
:manage-link="managePrometheusPath"
diff --git a/app/models/clusters/applications/cert_manager.rb b/app/models/clusters/applications/cert_manager.rb
index 0f6acca1fbc..c211a13db94 100644
--- a/app/models/clusters/applications/cert_manager.rb
+++ b/app/models/clusters/applications/cert_manager.rb
@@ -27,32 +27,14 @@ module Clusters
end
def install_command
- Gitlab::AppLogger.info '----- INSTALLING CLUSTER ISSUER-v2 ----'
- begin
- Gitlab::Kubernetes::Helm::InstallCommand.new(
- name: 'certmanager',
- version: VERSION,
- rbac: cluster.platform_kubernetes_rbac?,
- chart: chart,
- files: files.merge!(cluster_issuer_file),
- postinstall: post_install_script
- )
- #res = YAML.load_file(Rails.root.join('config', 'cert_manager', 'cluster_issuer.yaml'))
- #Gitlab::AppLogger.info(res)
- #Gitlab::Kubernetes::ClusterIssuer(res).generate()
- rescue StandardError => e
- Gitlab::AppLogger.info('install_command_eror------------------------------------------------')
- Gitlab::AppLogger.error(e)
- Gitlab::AppLogger.error(e.backtrace.join("\n"))
- rescue Exception => e
- Gitlab::AppLogger.info('install_command_exception--------------------------------------------------')
- Gitlab::AppLogger.error(e)
- Gitlab::AppLogger.error(e.backtrace.join("\n"))
- end
- end
-
- def cluster_issuer_resource_definition
- YAML.load_file(Rails.root.join('config', 'cert_manager', 'cluster_issuer.yaml'))
+ Gitlab::Kubernetes::Helm::InstallCommand.new(
+ name: 'certmanager',
+ version: VERSION,
+ rbac: cluster.platform_kubernetes_rbac?,
+ chart: chart,
+ files: files.merge!(cluster_issuer_file),
+ postinstall: post_install_script
+ )
end
private
diff --git a/app/services/clusters/applications/check_installation_progress_service.rb b/app/services/clusters/applications/check_installation_progress_service.rb
index 8231eaa324f..19dc0478591 100644
--- a/app/services/clusters/applications/check_installation_progress_service.rb
+++ b/app/services/clusters/applications/check_installation_progress_service.rb
@@ -28,11 +28,9 @@ module Clusters
end
def on_failed
- Gitlab::AppLogger.info("Installation FAILED!!")
app.make_errored!('Installation failed')
ensure
- Gitlab::AppLogger.info("SKIP CLEARING POD!")
- # remove_installation_pod
+ remove_installation_pod
end
def check_timeout
diff --git a/app/services/clusters/applications/install_service.rb b/app/services/clusters/applications/install_service.rb
index 8c477fd14f3..5a24d78e712 100644
--- a/app/services/clusters/applications/install_service.rb
+++ b/app/services/clusters/applications/install_service.rb
@@ -4,11 +4,9 @@ module Clusters
module Applications
class InstallService < BaseHelmService
def execute
- Gitlab::AppLogger.info('---- IN execute installing ----')
return unless app.scheduled?
begin
-
app.make_installing!
helm_api.install(install_command)
diff --git a/app/workers/cluster_install_app_worker.rb b/app/workers/cluster_install_app_worker.rb
index c683d718cdf..32e2ea7996c 100644
--- a/app/workers/cluster_install_app_worker.rb
+++ b/app/workers/cluster_install_app_worker.rb
@@ -7,7 +7,6 @@ class ClusterInstallAppWorker
def perform(app_name, app_id)
find_application(app_name, app_id) do |app|
-
Clusters::Applications::InstallService.new(app).execute
end
end
diff --git a/db/migrate/20181101191341_create_clusters_applications_cert_manager.rb b/db/migrate/20181101191341_create_clusters_applications_cert_manager.rb
index dd1757fa635..26b15fefc3a 100644
--- a/db/migrate/20181101191341_create_clusters_applications_cert_manager.rb
+++ b/db/migrate/20181101191341_create_clusters_applications_cert_manager.rb
@@ -1,12 +1,8 @@
# frozen_string_literal: true
-# See http://doc.gitlab.com/ce/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
class CreateClustersApplicationsCertManager < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
- # Set this constant to true if this migration requires downtime.
DOWNTIME = false
def change
diff --git a/lib/gitlab/kubernetes/helm/api.rb b/lib/gitlab/kubernetes/helm/api.rb
index 9e441f760e9..63f3d863c61 100644
--- a/lib/gitlab/kubernetes/helm/api.rb
+++ b/lib/gitlab/kubernetes/helm/api.rb
@@ -9,8 +9,6 @@ module Gitlab
def install(command)
begin
- Gitlab::AppLogger.info("---INSTALLING---------")
- Gitlab::AppLogger.info(command)
namespace.ensure_exists!
create_service_account(command)
diff --git a/vendor/cert_manager/cluster_issuer.yaml b/vendor/cert_manager/cluster_issuer.yaml
index f40d7db9c7d..23fa6eff4b2 100644
--- a/vendor/cert_manager/cluster_issuer.yaml
+++ b/vendor/cert_manager/cluster_issuer.yaml
@@ -8,4 +8,4 @@ spec:
email: my-email@example.com
privateKeySecretRef:
name: letsencrypt-prod
- http01: {} \ No newline at end of file
+ http01: {}