Skip to content
Snippets Groups Projects
Commit 427c549b authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 74a89b12
No related branches found
No related tags found
No related merge requests found
Showing
with 175 additions and 113 deletions
Loading
Loading
@@ -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;
},
Loading
Loading
@@ -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">
Loading
Loading
@@ -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>
Loading
Loading
Loading
Loading
@@ -5,7 +5,6 @@ import {
JUPYTER,
KNATIVE,
CERT_MANAGER,
ELASTIC_STACK,
CROSSPLANE,
RUNNER,
APPLICATION_INSTALLED_STATUSES,
Loading
Loading
@@ -97,7 +96,6 @@ export default class ClusterStore {
elastic_stack: {
...applicationInitialState,
title: s__('ClusterIntegration|Elastic Stack'),
kibana_hostname: null,
},
},
environments: [],
Loading
Loading
@@ -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',
);
}
});
}
Loading
Loading
Loading
Loading
@@ -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">
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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',
Loading
Loading
@@ -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")
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
@@ -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) }
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
---
title: Display SHA fingerprint for Deploy Keys and extend api to query those
merge_request: 22665
author: Roger Meier <r.meier@siemens.com>
type: added
---
title: Add informational message about page limits to environments dashboard
merge_request: 22489
author:
type: added
Loading
Loading
@@ -128,3 +128,65 @@ Example response:
}
}
```
Deploy Keys are bound to the creating user, so if you query with a deploy key
fingerprint you get additional information about the projects using that key:
```sh
curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/keys?fingerprint=SHA256%3AnUhzNyftwADy8AH3wFY31tAKs7HufskYTte2aXo%2FlCg
```
Example response:
```json
{
"id": 1,
"title": "Sample key 1",
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt1016k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
"created_at": "2019-11-14T15:11:13.222Z",
"user": {
"id": 1,
"name": "Administrator",
"username": "root",
"state": "active",
"avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
"web_url": "http://0.0.0.0:3000/root",
"created_at": "2019-11-14T15:09:34.831Z",
"bio": null,
"location": null,
"public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
"website_url": "",
"organization": null,
"last_sign_in_at": "2019-11-16T22:41:26.663Z",
"confirmed_at": "2019-11-14T15:09:34.575Z",
"last_activity_on": "2019-11-20",
"email": "admin@example.com",
"theme_id": 1,
"color_scheme_id": 1,
"projects_limit": 100000,
"current_sign_in_at": "2019-11-19T14:42:18.078Z",
"identities": [
],
"can_create_group": true,
"can_create_project": true,
"two_factor_enabled": false,
"external": false,
"private_profile": false,
"shared_runners_minutes_limit": null,
"extra_shared_runners_minutes_limit": null
},
"deploy_keys_projects": [
{
"id": 1,
"deploy_key_id": 1,
"project_id": 1,
"created_at": "2020-01-09T07:32:52.453Z",
"updated_at": "2020-01-09T07:32:52.453Z",
"can_push": false
}
]
}
```
Loading
Loading
@@ -15,7 +15,9 @@ should be leveraged:
- Feature flags should remain in the codebase for as short period as possible
to reduce the need for feature flag accounting.
- The person operating with feature flags is responsible for clearly communicating
the status of a feature behind the feature flag with responsible stakeholders.
the status of a feature behind the feature flag with responsible stakeholders. The
issue description should be updated with the feature flag name and whether it is
defaulted on or off as soon it is evident that a feature flag is needed.
- Merge requests that make changes hidden behind a feature flag, or remove an
existing feature flag because a feature is deemed stable must have the
~"feature flag" label assigned.
Loading
Loading
Loading
Loading
@@ -41,6 +41,7 @@ The following applications can be installed:
- [JupyterHub](#jupyterhub)
- [Knative](#knative)
- [Crossplane](#crossplane)
- [Elastic Stack](#elastic-stack)
 
With the exception of Knative, the applications will be installed in a dedicated
namespace called `gitlab-managed-apps`.
Loading
Loading
@@ -431,6 +432,38 @@ administrator to run following command within a Rails console:
Feature.enable(:enable_cluster_application_crossplane)
```
 
### Elastic Stack
> Introduced in GitLab 12.7 for project- and group-level clusters.
[Elastic Stack](https://www.elastic.co/products/elastic-stack) is a complete end-to-end
log analysis solution which helps in deep searching, analyzing and visualizing the logs
generated from different machines.
GitLab is able to gather logs from pods in your cluster automatically.
Filebeat will run as a DaemonSet on each node in your cluster, and it will ship container logs to Elasticsearch for querying.
GitLab will then connect to Elasticsearch for logs instead of the Kubernetes API,
and you will have access to more advanced querying capabilities.
This is a preliminary release of Elastic Stack as a GitLab-managed application. By default,
the ability to install it is disabled.
To allow installation of Elastic Stack as a GitLab-managed application, ask a GitLab
administrator to run following command within a Rails console:
```ruby
Feature.enable(:enable_cluster_application_elastic_stack)
```
Once the feature flag is set, to enable log shipping, install Elastic Stack into the cluster with the
**Install** button.
NOTE: **Note:**
The [`stable/elastic-stack`](https://github.com/helm/charts/tree/master/stable/elastic-stack)
chart is used to install this application with a
[`values.yaml`](https://gitlab.com/gitlab-org/gitlab/blob/master/vendor/elastic_stack/values.yaml)
file.
## Install using GitLab CI (alpha)
 
> [Introduced](https://gitlab.com/gitlab-org/gitlab/merge_requests/20822) in GitLab 12.6.
Loading
Loading
@@ -639,6 +672,7 @@ The applications below can be uninstalled.
| Knative | 12.1+ | The associated IP will be deleted and cannot be restored. |
| Prometheus | 11.11+ | All data will be deleted and cannot be restored. |
| Crossplane | 12.5+ | All data will be deleted and cannot be restored. |
| Elastic Stack | 12.7+ | All data will be deleted and cannot be restored. |
| Sentry | 12.6+ | The PostgreSQL persistent volume will remain and should be manually removed for complete uninstall. |
 
To uninstall an application:
Loading
Loading
Loading
Loading
@@ -41,9 +41,37 @@ Logs can be displayed by clicking on a specific pod from [Deploy Boards](../depl
1. On the **Environments** page, you should see the status of the environment's pods with [Deploy Boards](../deploy_boards.md).
1. When mousing over the list of pods, a tooltip will appear with the exact pod name and status.
![Deploy Boards pod list](img/pod_logs_deploy_board.png)
1. Click on the desired pod to bring up the logs view, which will contain the last 500 lines for that pod.
You may switch between the following in this view:
- Pods.
- [From GitLab 12.4](https://gitlab.com/gitlab-org/gitlab/issues/5769), environments.
1. Click on the desired pod to bring up the logs view.
 
Support for pods with multiple containers is coming [in a future release](https://gitlab.com/gitlab-org/gitlab/issues/6502).
### Logs view
The logs view will contain the last 500 lines for a pod, and has control to filter via:
- Pods.
- [From GitLab 12.4](https://gitlab.com/gitlab-org/gitlab/issues/5769), environments.
- [From GitLab 12.7](https://gitlab.com/gitlab-org/gitlab/merge_requests/21656), [full text search](#full-text-search).
Support for pods with multiple containers is coming [in a future release](https://gitlab.com/gitlab-org/gitlab/issues/13404).
Support for historical data is coming [in a future release](https://gitlab.com/gitlab-org/gitlab/issues/196191).
### Full text search
> [Introduced](https://gitlab.com/gitlab-org/gitlab/merge_requests/21656) in GitLab 12.7.
When you enable [Elastic Stack](../../clusters/applications.md#elastic-stack) on your cluster,
you can search the content of your logs via a search bar.
The search is passed on to Elasticsearch using the [simple_query_string](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html)
Elasticsearch function, which supports the following operators:
```
+ signifies AND operation
| signifies OR operation
- negates a single token
" wraps a number of tokens to signify a phrase for searching
* at the end of a term signifies a prefix query
( and ) signify precedence
~N after a word signifies edit distance (fuzziness)
~N after a phrase signifies slop amount
```
Loading
Loading
@@ -924,6 +924,10 @@ module API
expose :user, using: Entities::UserPublic
end
 
class DeployKeyWithUser < SSHKeyWithUser
expose :deploy_keys_projects
end
class DeployKeysProject < Grape::Entity
expose :deploy_key, merge: true, using: Entities::SSHKey
expose :can_push
Loading
Loading
Loading
Loading
@@ -26,12 +26,15 @@ module API
get do
authenticated_with_can_read_all_resources!
 
finder_params = params.merge(key_type: 'ssh')
key = KeysFinder.new(current_user, finder_params).execute
key = KeysFinder.new(current_user, params).execute
 
not_found!('Key') unless key
present key, with: Entities::SSHKeyWithUser, current_user: current_user
if key.type == "DeployKey"
present key, with: Entities::DeployKeyWithUser, current_user: current_user
else
present key, with: Entities::SSHKeyWithUser, current_user: current_user
end
rescue KeysFinder::InvalidFingerprint
render_api_error!('Failed to return the key', 400)
end
Loading
Loading
Loading
Loading
@@ -3824,9 +3824,6 @@ msgstr ""
msgid "ClusterIntegration|Copy Jupyter Hostname"
msgstr ""
 
msgid "ClusterIntegration|Copy Kibana Hostname"
msgstr ""
msgid "ClusterIntegration|Copy Knative Endpoint"
msgstr ""
 
Loading
Loading
@@ -4043,9 +4040,6 @@ msgstr ""
msgid "ClusterIntegration|Key pair name"
msgstr ""
 
msgid "ClusterIntegration|Kibana Hostname"
msgstr ""
msgid "ClusterIntegration|Knative"
msgstr ""
 
Loading
Loading
@@ -6927,12 +6921,18 @@ msgstr ""
msgid "EnvironmentsDashboard|More actions"
msgstr ""
 
msgid "EnvironmentsDashboard|Read more."
msgstr ""
msgid "EnvironmentsDashboard|Remove"
msgstr ""
 
msgid "EnvironmentsDashboard|The environments dashboard provides a summary of each project's environments' status, including pipeline and alert statuses."
msgstr ""
 
msgid "EnvironmentsDashboard|This dashboard displays a maximum of 7 projects and 3 environments per project. %{readMoreLink}"
msgstr ""
msgid "Environments|An error occurred while canceling the auto stop, please try again"
msgstr ""
 
Loading
Loading
Loading
Loading
@@ -8,11 +8,9 @@ module QA
before do
Flow::Login.sign_in
 
issue = Resource::Issue.fabricate_via_api! do |issue|
Resource::Issue.fabricate_via_api! do |issue|
issue.title = 'issue title'
end
issue.visit!
end.visit!
 
Page::Project::Issue::Show.perform do |show|
show.select_all_activities_filter
Loading
Loading
Loading
Loading
@@ -6,10 +6,9 @@ module QA
before do
Flow::Login.sign_in
 
issue = Resource::Issue.fabricate_via_api! do |issue|
Resource::Issue.fabricate_via_api! do |issue|
issue.title = 'issue title'
end
issue.visit!
end.visit!
end
 
it 'user comments on an issue and edits the comment' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment