summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-14 00:08:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-14 00:08:14 +0000
commit427c549b6396885fb60a687326b6cd62878e4ca3 (patch)
tree145713e2f6fdaf7499b0cb44010503e16b6248b9 /app
parent74a89b1221eaf780374bd1d4c5b2ee4a0f488908 (diff)
downloadgitlab-ce-427c549b6396885fb60a687326b6cd62878e4ca3.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/clusters/components/applications.vue40
-rw-r--r--app/assets/javascripts/clusters/stores/clusters_store.js8
-rw-r--r--app/assets/javascripts/deploy_keys/components/key.vue7
-rw-r--r--app/controllers/clusters/applications_controller.rb2
-rw-r--r--app/models/clusters/applications/elastic_stack.rb33
-rw-r--r--app/models/clusters/applications/ingress.rb6
-rw-r--r--app/serializers/cluster_application_entity.rb1
-rw-r--r--app/serializers/deploy_key_entity.rb1
-rw-r--r--app/services/clusters/applications/base_service.rb4
9 files changed, 12 insertions, 90 deletions
diff --git a/app/assets/javascripts/clusters/components/applications.vue b/app/assets/javascripts/clusters/components/applications.vue
index af50ca7361d..b37e644b503 100644
--- a/app/assets/javascripts/clusters/components/applications.vue
+++ b/app/assets/javascripts/clusters/components/applications.vue
@@ -222,9 +222,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
elasticStackInstalled() {
return this.applications.elastic_stack.status === APPLICATION_STATUS.INSTALLED;
},
- elasticStackKibanaHostname() {
- return this.applications.elastic_stack.kibana_hostname;
- },
knative() {
return this.applications.knative;
},
@@ -681,9 +678,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
:uninstall-successful="applications.elastic_stack.uninstallSuccessful"
:uninstall-failed="applications.elastic_stack.uninstallFailed"
:disabled="!helmInstalled"
- :install-application-request-params="{
- kibana_hostname: applications.elastic_stack.kibana_hostname,
- }"
title-link="https://github.com/helm/charts/tree/master/stable/elastic-stack"
>
<div slot="description">
@@ -694,40 +688,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
)
}}
</p>
-
- <template v-if="ingressExternalEndpoint">
- <div class="form-group">
- <label for="elastic-stack-kibana-hostname">{{
- s__('ClusterIntegration|Kibana Hostname')
- }}</label>
-
- <div class="input-group">
- <input
- v-model="applications.elastic_stack.kibana_hostname"
- :readonly="elasticStackInstalled"
- type="text"
- class="form-control js-hostname"
- />
- <span class="input-group-btn">
- <clipboard-button
- :text="elasticStackKibanaHostname"
- :title="s__('ClusterIntegration|Copy Kibana Hostname')"
- class="js-clipboard-btn"
- />
- </span>
- </div>
-
- <p v-if="ingressInstalled" class="form-text text-muted">
- {{
- s__(`ClusterIntegration|Replace this with your own hostname if you want.
- If you do so, point hostname to Ingress IP Address from above.`)
- }}
- <a :href="ingressDnsHelpPath" target="_blank" rel="noopener noreferrer">
- {{ __('More information') }}
- </a>
- </p>
- </div>
- </template>
</div>
</application-row>
</div>
diff --git a/app/assets/javascripts/clusters/stores/clusters_store.js b/app/assets/javascripts/clusters/stores/clusters_store.js
index 9c8563e8f77..26456fb28db 100644
--- a/app/assets/javascripts/clusters/stores/clusters_store.js
+++ b/app/assets/javascripts/clusters/stores/clusters_store.js
@@ -5,7 +5,6 @@ import {
JUPYTER,
KNATIVE,
CERT_MANAGER,
- ELASTIC_STACK,
CROSSPLANE,
RUNNER,
APPLICATION_INSTALLED_STATUSES,
@@ -97,7 +96,6 @@ export default class ClusterStore {
elastic_stack: {
...applicationInitialState,
title: s__('ClusterIntegration|Elastic Stack'),
- kibana_hostname: null,
},
},
environments: [],
@@ -236,12 +234,6 @@ export default class ClusterStore {
} else if (appId === RUNNER) {
this.state.applications.runner.version = version;
this.state.applications.runner.updateAvailable = updateAvailable;
- } else if (appId === ELASTIC_STACK) {
- this.state.applications.elastic_stack.kibana_hostname = this.updateHostnameIfUnset(
- this.state.applications.elastic_stack.kibana_hostname,
- serverAppEntry.kibana_hostname,
- 'kibana',
- );
}
});
}
diff --git a/app/assets/javascripts/deploy_keys/components/key.vue b/app/assets/javascripts/deploy_keys/components/key.vue
index 4d36a492c1c..74f1373f144 100644
--- a/app/assets/javascripts/deploy_keys/components/key.vue
+++ b/app/assets/javascripts/deploy_keys/components/key.vue
@@ -115,7 +115,12 @@ export default {
<div role="rowheader" class="table-mobile-header">{{ s__('DeployKeys|Deploy key') }}</div>
<div class="table-mobile-content qa-key">
<strong class="title qa-key-title"> {{ deployKey.title }} </strong>
- <div class="fingerprint qa-key-fingerprint">{{ deployKey.fingerprint }}</div>
+ <div class="fingerprint qa-key-fingerprint">
+ {{ __('MD5') }}:{{ deployKey.fingerprint }}
+ </div>
+ <div class="fingerprint qa-key-fingerprint">
+ {{ __('SHA256') }}:{{ deployKey.fingerprint_sha256 }}
+ </div>
</div>
</div>
<div class="table-section section-30 section-wrap">
diff --git a/app/controllers/clusters/applications_controller.rb b/app/controllers/clusters/applications_controller.rb
index 788ebb14fec..51ddbe2beb4 100644
--- a/app/controllers/clusters/applications_controller.rb
+++ b/app/controllers/clusters/applications_controller.rb
@@ -47,7 +47,7 @@ class Clusters::ApplicationsController < Clusters::BaseController
end
def cluster_application_params
- params.permit(:application, :hostname, :kibana_hostname, :email, :stack, :modsecurity_enabled)
+ params.permit(:application, :hostname, :email, :stack, :modsecurity_enabled)
end
def cluster_application_destroy_params
diff --git a/app/models/clusters/applications/elastic_stack.rb b/app/models/clusters/applications/elastic_stack.rb
index 9854ad2ea3e..e86a4597ed8 100644
--- a/app/models/clusters/applications/elastic_stack.rb
+++ b/app/models/clusters/applications/elastic_stack.rb
@@ -15,24 +15,15 @@ module Clusters
include ::Clusters::Concerns::ApplicationData
include ::Gitlab::Utils::StrongMemoize
- default_value_for :version, VERSION
-
- def set_initial_status
- return unless not_installable?
- return unless cluster&.application_ingress_available?
+ include IgnorableColumns
+ ignore_column :kibana_hostname, remove_with: '12.8', remove_after: '2020-01-22'
- ingress = cluster.application_ingress
- self.status = status_states[:installable] if ingress.external_ip_or_hostname?
- end
+ default_value_for :version, VERSION
def chart
'stable/elastic-stack'
end
- def values
- content_values.to_yaml
- end
-
def install_command
Gitlab::Kubernetes::Helm::InstallCommand.new(
name: 'elastic-stack',
@@ -78,24 +69,6 @@ module Clusters
private
- def specification
- {
- "kibana" => {
- "ingress" => {
- "hosts" => [kibana_hostname],
- "tls" => [{
- "hosts" => [kibana_hostname],
- "secretName" => "kibana-cert"
- }]
- }
- }
- }
- end
-
- def content_values
- YAML.load_file(chart_values_file).deep_merge!(specification)
- end
-
def post_delete_script
[
Gitlab::Kubernetes::KubectlCmd.delete("pvc", "--selector", "release=elastic-stack")
diff --git a/app/models/clusters/applications/ingress.rb b/app/models/clusters/applications/ingress.rb
index d41fc72ae68..63f216c7af5 100644
--- a/app/models/clusters/applications/ingress.rb
+++ b/app/models/clusters/applications/ingress.rb
@@ -42,7 +42,7 @@ module Clusters
end
def allowed_to_uninstall?
- external_ip_or_hostname? && application_jupyter_nil_or_installable? && application_elastic_stack_nil_or_installable?
+ external_ip_or_hostname? && application_jupyter_nil_or_installable?
end
def install_command
@@ -155,10 +155,6 @@ module Clusters
def application_jupyter_nil_or_installable?
cluster.application_jupyter.nil? || cluster.application_jupyter&.installable?
end
-
- def application_elastic_stack_nil_or_installable?
- cluster.application_elastic_stack.nil? || cluster.application_elastic_stack&.installable?
- end
end
end
end
diff --git a/app/serializers/cluster_application_entity.rb b/app/serializers/cluster_application_entity.rb
index e7e4f5767e9..632718df780 100644
--- a/app/serializers/cluster_application_entity.rb
+++ b/app/serializers/cluster_application_entity.rb
@@ -8,7 +8,6 @@ class ClusterApplicationEntity < Grape::Entity
expose :external_ip, if: -> (e, _) { e.respond_to?(:external_ip) }
expose :external_hostname, if: -> (e, _) { e.respond_to?(:external_hostname) }
expose :hostname, if: -> (e, _) { e.respond_to?(:hostname) }
- expose :kibana_hostname, if: -> (e, _) { e.respond_to?(:kibana_hostname) }
expose :email, if: -> (e, _) { e.respond_to?(:email) }
expose :stack, if: -> (e, _) { e.respond_to?(:stack) }
expose :modsecurity_enabled, if: -> (e, _) { e.respond_to?(:modsecurity_enabled) }
diff --git a/app/serializers/deploy_key_entity.rb b/app/serializers/deploy_key_entity.rb
index 2682a47fbaa..653316ce4d2 100644
--- a/app/serializers/deploy_key_entity.rb
+++ b/app/serializers/deploy_key_entity.rb
@@ -5,6 +5,7 @@ class DeployKeyEntity < Grape::Entity
expose :user_id
expose :title
expose :fingerprint
+ expose :fingerprint_sha256
expose :destroyed_when_orphaned?, as: :destroyed_when_orphaned
expose :almost_orphaned?, as: :almost_orphaned
expose :created_at
diff --git a/app/services/clusters/applications/base_service.rb b/app/services/clusters/applications/base_service.rb
index 4b6c937fd5d..89b8163f798 100644
--- a/app/services/clusters/applications/base_service.rb
+++ b/app/services/clusters/applications/base_service.rb
@@ -19,10 +19,6 @@ module Clusters
application.hostname = params[:hostname]
end
- if application.has_attribute?(:kibana_hostname)
- application.kibana_hostname = params[:kibana_hostname]
- end
-
if application.has_attribute?(:email)
application.email = params[:email]
end