diff options
-rw-r--r-- | app/models/clusters/applications/knative.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/knative-0-5.yml | 5 | ||||
-rw-r--r-- | config/prometheus/common_metrics.yml | 2 | ||||
-rw-r--r-- | db/migrate/20190408163745_prometheus_knative05_fix.rb | 20 | ||||
-rw-r--r-- | db/schema.rb | 2 | ||||
-rw-r--r-- | spec/models/clusters/applications/knative_spec.rb | 2 |
6 files changed, 29 insertions, 4 deletions
diff --git a/app/models/clusters/applications/knative.rb b/app/models/clusters/applications/knative.rb index f7e54833296..38cbc9ce8eb 100644 --- a/app/models/clusters/applications/knative.rb +++ b/app/models/clusters/applications/knative.rb @@ -3,7 +3,7 @@ module Clusters module Applications class Knative < ApplicationRecord - VERSION = '0.3.0'.freeze + VERSION = '0.5.0'.freeze REPOSITORY = 'https://storage.googleapis.com/triggermesh-charts'.freeze METRICS_CONFIG = 'https://storage.googleapis.com/triggermesh-charts/istio-metrics.yaml'.freeze FETCH_IP_ADDRESS_DELAY = 30.seconds diff --git a/changelogs/unreleased/knative-0-5.yml b/changelogs/unreleased/knative-0-5.yml new file mode 100644 index 00000000000..c7112b957e9 --- /dev/null +++ b/changelogs/unreleased/knative-0-5.yml @@ -0,0 +1,5 @@ +--- +title: Knative version bump 0.3 -> 0.5 +merge_request: +author: Chris Baumbauer <cab@cabnetworks.net> +type: changed diff --git a/config/prometheus/common_metrics.yml b/config/prometheus/common_metrics.yml index 884868c6336..356f573c5e9 100644 --- a/config/prometheus/common_metrics.yml +++ b/config/prometheus/common_metrics.yml @@ -266,6 +266,6 @@ 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))' + query_range: 'floor(sum(rate(istio_revision_request_count{destination_configuration="%{function_name}", destination_namespace="%{kube_namespace}"}[1m])/3))' label: invocations / minute unit: requests diff --git a/db/migrate/20190408163745_prometheus_knative05_fix.rb b/db/migrate/20190408163745_prometheus_knative05_fix.rb new file mode 100644 index 00000000000..c11f6f0e29b --- /dev/null +++ b/db/migrate/20190408163745_prometheus_knative05_fix.rb @@ -0,0 +1,20 @@ +# 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 PrometheusKnative05Fix < ActiveRecord::Migration[5.0] + include Gitlab::Database::MigrationHelpers + + require Rails.root.join('db/importers/common_metrics_importer.rb') + + DOWNTIME = false + + def up + Importers::CommonMetricsImporter.new.execute + end + + def down + # no-op + end +end diff --git a/db/schema.rb b/db/schema.rb index d1b3672725d..c0399529deb 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20190326164045) do +ActiveRecord::Schema.define(version: 20190408163745) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/spec/models/clusters/applications/knative_spec.rb b/spec/models/clusters/applications/knative_spec.rb index 5e68f2634da..405b5ad691c 100644 --- a/spec/models/clusters/applications/knative_spec.rb +++ b/spec/models/clusters/applications/knative_spec.rb @@ -109,7 +109,7 @@ describe Clusters::Applications::Knative do subject { knative.install_command } it 'is initialized with latest version' do - expect(subject.version).to eq('0.3.0') + expect(subject.version).to eq('0.5.0') end it_behaves_like 'a command' |