diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/helpers/is_ee_env.js | 4 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 1 | ||||
-rw-r--r-- | config/prometheus/common_metrics.yml | 10 | ||||
-rw-r--r-- | config/routes/project.rb | 8 | ||||
-rw-r--r-- | config/webpack.config.js | 2 |
5 files changed, 21 insertions, 4 deletions
diff --git a/config/helpers/is_ee_env.js b/config/helpers/is_ee_env.js index 1fdbca591c0..3fe9bb891eb 100644 --- a/config/helpers/is_ee_env.js +++ b/config/helpers/is_ee_env.js @@ -4,6 +4,6 @@ const path = require('path'); const ROOT_PATH = path.resolve(__dirname, '../..'); module.exports = - process.env.EE !== undefined - ? JSON.parse(process.env.EE) + process.env.IS_GITLAB_EE !== undefined + ? JSON.parse(process.env.IS_GITLAB_EE) : fs.existsSync(path.join(ROOT_PATH, 'ee')); diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 01ffcade931..3c426cdb969 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -126,6 +126,7 @@ Settings['issues_tracker'] ||= {} # GitLab # Settings['gitlab'] ||= Settingslogic.new({}) +Settings.gitlab['default_project_creation'] ||= ::Gitlab::Access::DEVELOPER_MAINTAINER_PROJECT_ACCESS Settings.gitlab['default_projects_limit'] ||= 100000 Settings.gitlab['default_branch_protection'] ||= 2 Settings.gitlab['default_can_create_group'] = true if Settings.gitlab['default_can_create_group'].nil? diff --git a/config/prometheus/common_metrics.yml b/config/prometheus/common_metrics.yml index 9bdaf1575e9..884868c6336 100644 --- a/config/prometheus/common_metrics.yml +++ b/config/prometheus/common_metrics.yml @@ -259,3 +259,13 @@ label: Pod average unit: "cores" track: canary + - title: "Knative function invocations" + y_label: "Invocations" + required_metrics: + - istio_revision_request_count + weight: 1 + queries: + - id: system_metrics_knative_function_invocation_count + query_range: 'floor(sum(rate(istio_revision_request_count{destination_configuration="%{function_name}", destination_namespace="%{kube_namespace}"}[1m])*30))' + label: invocations / minute + unit: requests diff --git a/config/routes/project.rb b/config/routes/project.rb index d60a5cc9ae8..93d168fc595 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -219,6 +219,8 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do get :metrics get :additional_metrics get '/terminal.ws/authorize', to: 'environments#terminal_websocket_authorize', constraints: { format: nil } + + get '/prometheus/api/v1/*proxy_path', to: 'environments/prometheus_api#proxy' end collection do @@ -250,7 +252,11 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end namespace :serverless do - get '/functions/:environment_id/:id', to: 'functions#show' + scope :functions do + get '/:environment_id/:id', to: 'functions#show' + get '/:environment_id/:id/metrics', to: 'functions#metrics', as: :metrics + end + resources :functions, only: [:index] end diff --git a/config/webpack.config.js b/config/webpack.config.js index 9a37856a99e..19b48845305 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -322,7 +322,7 @@ module.exports = { }), new webpack.DefinePlugin({ - 'process.env.EE': JSON.stringify(IS_EE), + 'process.env.IS_GITLAB_EE': JSON.stringify(IS_EE), }), ].filter(Boolean), |