diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss
index 03ddbfd9194..e36307f4f29 100644
--- a/app/assets/stylesheets/framework/typography.scss
+++ b/app/assets/stylesheets/framework/typography.scss
@@ -393,7 +393,7 @@
}
}
- .prometheus-graph-embed {
+ .metrics-embed {
h3.popover-header {
/** Override
.popover-header
* as embed metrics do not follow the same
diff --git a/app/policies/clusters/instance_policy.rb b/app/policies/clusters/instance_policy.rb
index c8e6c973bf5..d8e8f9ff2c1 100644
--- a/app/policies/clusters/instance_policy.rb
+++ b/app/policies/clusters/instance_policy.rb
@@ -12,3 +12,5 @@ module Clusters
end
end
end
+
+Clusters::InstancePolicy.prepend_if_ee('EE::Clusters::InstancePolicy')
diff --git a/app/views/clusters/clusters/show.html.haml b/app/views/clusters/clusters/show.html.haml
index 8b9844bcfc1..31d5f592d75 100644
--- a/app/views/clusters/clusters/show.html.haml
+++ b/app/views/clusters/clusters/show.html.haml
@@ -42,6 +42,6 @@
= render 'banner'
- if cluster_environments_path.present?
- = render_if_exists 'clusters/clusters/group_cluster_environments', expanded: expanded
+ = render_if_exists 'clusters/clusters/cluster_environments', expanded: expanded
- else
= render 'configure', expanded: expanded
diff --git a/changelogs/unreleased/tr-fix-embed-tooltip.yml b/changelogs/unreleased/tr-fix-embed-tooltip.yml
new file mode 100644
index 00000000000..0bd09d29c93
--- /dev/null
+++ b/changelogs/unreleased/tr-fix-embed-tooltip.yml
@@ -0,0 +1,5 @@
+---
+title: Fixes embedded metrics chart tooltip spacing
+merge_request: 18543
+author:
+type: fixed
diff --git a/config/routes.rb b/config/routes.rb
index 4319431ed48..f3dd43f78a9 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -145,6 +145,7 @@ Rails.application.routes.draw do
get :metrics, format: :json
get :metrics_dashboard
get :'/prometheus/api/v1/*proxy_path', to: 'clusters#prometheus_proxy', as: :prometheus_api
+ get :environments, format: :json
end
scope :applications do
diff --git a/doc/administration/integration/plantuml.md b/doc/administration/integration/plantuml.md
index c34f9f90e7c..e595c640aac 100644
--- a/doc/administration/integration/plantuml.md
+++ b/doc/administration/integration/plantuml.md
@@ -21,6 +21,28 @@ docker run -d --name plantuml -p 8080:8080 plantuml/plantuml-server:tomcat
The **PlantUML URL** will be the hostname of the server running the container.
+When running GitLab in Docker, it will need to have access to the PlantUML container.
+The easiest way to achieve that is by using [Docker Compose](https://docs.docker.com/compose/).
+
+A simple `docker-compose.yml` file would be:
+
+```yaml
+version: "3"
+services:
+ gitlab:
+ image: 'gitlab/gitlab-ce:12.2.5-ce.0'
+ environment:
+ GITLAB_OMNIBUS_CONFIG: |
+ nginx['custom_gitlab_server_config'] = "location /-/plantuml/ { \n proxy_cache off; \n proxy_pass http://plantuml:8080/; \n}\n"
+
+ plantuml:
+ image: 'plantuml/plantuml-server:tomcat'
+ container_name: plantuml
+```
+
+In this scenario, PlantUML will be accessible for GitLab at the URL
+`http://plantuml:8080/`.
+
### Debian/Ubuntu
Installing and configuring your
@@ -54,6 +76,10 @@ http://localhost:8080/plantuml
you can change these defaults by editing the `/etc/tomcat7/server.xml` file.
+Note that the default URL is different than when using the Docker-based image,
+where the service is available at the root of URL with no relative path. Adjust
+the configuration below accordingly.
+
### Making local PlantUML accessible using custom GitLab setup
The PlantUML server runs locally on your server, so it is not accessible
@@ -61,11 +87,15 @@ externally. As such, it is necessary to catch external PlantUML calls and
redirect them to the local server.
The idea is to redirect each call to `https://gitlab.example.com/-/plantuml/`
-to the local PlantUML server `http://localhost:8080/plantuml`.
+to the local PlantUML server `http://plantuml:8080/` or `http://localhost:8080/plantuml/`, depending on your setup.
To enable the redirection, add the following line in `/etc/gitlab/gitlab.rb`:
```ruby
+# Docker deployment
+nginx['custom_gitlab_server_config'] = "location /-/plantuml/ { \n proxy_cache off; \n proxy_pass http://plantuml:8080/; \n}\n"
+
+# Built from source
nginx['custom_gitlab_server_config'] = "location /-/plantuml/ { \n proxy_cache off; \n proxy_pass http://127.0.0.1:8080/plantuml/; \n}\n"
```
diff --git a/doc/user/clusters/environments.md b/doc/user/clusters/environments.md
index ed56463d0a5..bbf01dc27f9 100644
--- a/doc/user/clusters/environments.md
+++ b/doc/user/clusters/environments.md
@@ -10,12 +10,6 @@ deployed to the Kubernetes cluster and it:
## Overview
-NOTE: **Note:**
-Cluster environments are only available for
-[group-level clusters](../group/clusters/index.md).
-Support for [instance-level](../instance/clusters/index.md) clusters is
-[planned](https://gitlab.com/gitlab-org/gitlab-foss/issues/63985).
-
With cluster environments, you can gain insight into:
- Which projects are deployed to the cluster.
@@ -37,7 +31,7 @@ In order to:
- Show pod usage correctly, you must
[enable Deploy Boards](../project/deploy_boards.md#enabling-deploy-boards).
-Once you have successful deployments to your group-level cluster:
+Once you have successful deployments to your group-level or instance-level cluster:
1. Navigate to your group's **Kubernetes** page.
1. Click on the **Environments** tab.
diff --git a/doc/user/group/clusters/index.md b/doc/user/group/clusters/index.md
index 9b6b6e41019..4742e7189b7 100644
--- a/doc/user/group/clusters/index.md
+++ b/doc/user/group/clusters/index.md
@@ -139,7 +139,9 @@ The result will then be:
## Cluster environments **(PREMIUM)**
-Please see the documentation for [cluster environments](../../clusters/environments.md).
+For a consolidated view of which CI [environments](../../../ci/environments.md)
+are deployed to the Kubernetes cluster, see the documentation for
+[cluster environments](../../clusters/environments.md).
## Security of Runners
diff --git a/doc/user/instance/clusters/index.md b/doc/user/instance/clusters/index.md
index 56693a1db1f..3d9a1eb219e 100644
--- a/doc/user/instance/clusters/index.md
+++ b/doc/user/instance/clusters/index.md
@@ -20,3 +20,9 @@ GitLab will try match to clusters in the following order:
To be selected, the cluster must be enabled and
match the [environment selector](../../../ci/environments.md#scoping-environments-with-specs).
+
+## Cluster environments **(PREMIUM)**
+
+For a consolidated view of which CI [environments](../../../ci/environments.md)
+are deployed to the Kubernetes cluster, see the documentation for
+[cluster environments](../../clusters/environments.md).
diff --git a/spec/features/clusters/cluster_detail_page_spec.rb b/spec/features/clusters/cluster_detail_page_spec.rb
index 927862689c1..437e7f18c48 100644
--- a/spec/features/clusters/cluster_detail_page_spec.rb
+++ b/spec/features/clusters/cluster_detail_page_spec.rb
@@ -14,10 +14,6 @@ describe 'Clusterable > Show page' do
end
shared_examples 'show page' do
- before do
- clusterable.add_maintainer(current_user)
- end
-
it 'allow the user to set domain' do
visit cluster_path
@@ -63,7 +59,6 @@ describe 'Clusterable > Show page' do
shared_examples 'editing a GCP cluster' do
before do
- clusterable.add_maintainer(current_user)
visit cluster_path
end
@@ -92,7 +87,6 @@ describe 'Clusterable > Show page' do
shared_examples 'editing a user-provided cluster' do
before do
stub_kubeclient_discover(cluster.platform.api_url)
- clusterable.add_maintainer(current_user)
visit cluster_path
end
@@ -123,6 +117,10 @@ describe 'Clusterable > Show page' do
let(:cluster_path) { project_cluster_path(clusterable, cluster) }
let(:cluster) { create(:cluster, :provided_by_gcp, :project, projects: [clusterable]) }
+ before do
+ clusterable.add_maintainer(current_user)
+ end
+
it_behaves_like 'show page'
it_behaves_like 'editing a GCP cluster'
@@ -137,6 +135,10 @@ describe 'Clusterable > Show page' do
let(:cluster_path) { group_cluster_path(clusterable, cluster) }
let(:cluster) { create(:cluster, :provided_by_gcp, :group, groups: [clusterable]) }
+ before do
+ clusterable.add_maintainer(current_user)
+ end
+
it_behaves_like 'show page'
it_behaves_like 'editing a GCP cluster'
@@ -145,4 +147,18 @@ describe 'Clusterable > Show page' do
let(:cluster) { create(:cluster, :provided_by_user, :group, groups: [clusterable]) }
end
end
+
+ context 'when clusterable is an instance' do
+ let(:current_user) { create(:admin) }
+ let(:cluster_path) { admin_cluster_path(cluster) }
+ let(:cluster) { create(:cluster, :provided_by_gcp, :instance) }
+
+ it_behaves_like 'show page'
+
+ it_behaves_like 'editing a GCP cluster'
+
+ it_behaves_like 'editing a user-provided cluster' do
+ let(:cluster) { create(:cluster, :provided_by_user, :instance) }
+ end
+ end
end