summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Baumbauer <cab@cabnetworks.net>2018-10-30 14:12:10 -0700
committerChris Baumbauer <cab@cabnetworks.net>2018-10-30 14:12:10 -0700
commit6aa0645fa780d220cab0e730e1bcbdaeed6d0ff4 (patch)
treeb2236e897a2fb722fe4236e34521157bc96e613a
parent93cafdb45d6671ab9693e49f2224119d36e8a210 (diff)
downloadgitlab-ce-6aa0645fa780d220cab0e730e1bcbdaeed6d0ff4.tar.gz
Rename knative domainname field to hostname and fix changelog entry
-rw-r--r--app/assets/javascripts/clusters/components/applications.vue2
-rw-r--r--app/assets/javascripts/clusters/stores/clusters_store.js2
-rw-r--r--app/controllers/projects/clusters/applications_controller.rb1
-rw-r--r--app/models/clusters/applications/knative.rb6
-rw-r--r--app/serializers/cluster_application_entity.rb1
-rw-r--r--app/services/clusters/applications/create_service.rb4
-rw-r--r--changelogs/unreleased/introduce-knative-support.yml5
-rw-r--r--changelogs/unreleased/update-helm-version.yml4
-rw-r--r--db/migrate/20180912111628_add_knative_application.rb2
-rw-r--r--db/schema.rb2
-rw-r--r--locale/gitlab.pot6
-rw-r--r--spec/fixtures/api/schemas/cluster_status.json3
-rw-r--r--spec/javascripts/clusters/components/applications_spec.js10
-rw-r--r--spec/javascripts/clusters/stores/clusters_store_spec.js2
14 files changed, 22 insertions, 28 deletions
diff --git a/app/assets/javascripts/clusters/components/applications.vue b/app/assets/javascripts/clusters/components/applications.vue
index a477892fadd..e1d868dbac4 100644
--- a/app/assets/javascripts/clusters/components/applications.vue
+++ b/app/assets/javascripts/clusters/components/applications.vue
@@ -383,7 +383,7 @@ export default {
:status-reason="applications.knative.statusReason"
:request-status="applications.knative.requestStatus"
:request-reason="applications.knative.requestReason"
- :install-application-request-params="{ domainname: applications.knative.domainname}"
+ :install-application-request-params="{ hostname: applications.knative.domainname}"
:disabled="!helmInstalled"
class="hide-bottom-border rounded-bottom"
title-link="https://github.com/knative/docs"
diff --git a/app/assets/javascripts/clusters/stores/clusters_store.js b/app/assets/javascripts/clusters/stores/clusters_store.js
index c54a49eedd0..3727c147641 100644
--- a/app/assets/javascripts/clusters/stores/clusters_store.js
+++ b/app/assets/javascripts/clusters/stores/clusters_store.js
@@ -52,7 +52,7 @@ export default class ClusterStore {
statusReason: null,
requestStatus: null,
requestReason: null,
- domainname: ''
+ hostname: ''
},
},
};
diff --git a/app/controllers/projects/clusters/applications_controller.rb b/app/controllers/projects/clusters/applications_controller.rb
index 2e45e47b55d..bcea96bce94 100644
--- a/app/controllers/projects/clusters/applications_controller.rb
+++ b/app/controllers/projects/clusters/applications_controller.rb
@@ -25,6 +25,5 @@ class Projects::Clusters::ApplicationsController < Projects::ApplicationControll
def create_cluster_application_params
params.permit(:application, :hostname)
- params.permit(:application, :domainname)
end
end
diff --git a/app/models/clusters/applications/knative.rb b/app/models/clusters/applications/knative.rb
index 0c64bde73ae..76d23870f4c 100644
--- a/app/models/clusters/applications/knative.rb
+++ b/app/models/clusters/applications/knative.rb
@@ -18,7 +18,7 @@ module Clusters
include ::Clusters::Concerns::ApplicationData
default_value_for :version, VERSION
- default_value_for :domainname, ''
+ default_value_for :hostname, ''
def chart
'knative/knative'
@@ -26,8 +26,8 @@ module Clusters
def install_command
args = []
- if !domainname.nil? && !domainname.eql?('')
- args = ["domain=" + domainname]
+ if !hostname.nil? && !hostname.eql?('')
+ args = ["domain=" + hostname]
end
Gitlab::Kubernetes::Helm::InstallCommand.new(
diff --git a/app/serializers/cluster_application_entity.rb b/app/serializers/cluster_application_entity.rb
index d2f3e6ad130..2bd17e58086 100644
--- a/app/serializers/cluster_application_entity.rb
+++ b/app/serializers/cluster_application_entity.rb
@@ -6,5 +6,4 @@ class ClusterApplicationEntity < Grape::Entity
expose :status_reason
expose :external_ip, if: -> (e, _) { e.respond_to?(:external_ip) }
expose :hostname, if: -> (e, _) { e.respond_to?(:hostname) }
- expose :domainname, if: -> (e, _) { e.respond_to?(:domainname) }
end
diff --git a/app/services/clusters/applications/create_service.rb b/app/services/clusters/applications/create_service.rb
index 50107578bd5..c348cad4803 100644
--- a/app/services/clusters/applications/create_service.rb
+++ b/app/services/clusters/applications/create_service.rb
@@ -19,10 +19,6 @@ module Clusters
application.hostname = params[:hostname]
end
- if application.has_attribute?(:domainname)
- application.domainname = params[:domainname]
- end
-
if application.respond_to?(:oauth_application)
application.oauth_application = create_oauth_application(application, request)
end
diff --git a/changelogs/unreleased/introduce-knative-support.yml b/changelogs/unreleased/introduce-knative-support.yml
new file mode 100644
index 00000000000..53290d71977
--- /dev/null
+++ b/changelogs/unreleased/introduce-knative-support.yml
@@ -0,0 +1,5 @@
+---
+title: Introduce Knative support
+author: Chris Baumbauer
+merge_request: 43959
+type: added
diff --git a/changelogs/unreleased/update-helm-version.yml b/changelogs/unreleased/update-helm-version.yml
deleted file mode 100644
index 37ba2aeb64c..00000000000
--- a/changelogs/unreleased/update-helm-version.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: Update Helm version to 2.11.0 and introduce Knative support
-author: Chris Baumbauer
-type: added
diff --git a/db/migrate/20180912111628_add_knative_application.rb b/db/migrate/20180912111628_add_knative_application.rb
index aa3ddf84b1c..d80da02e26d 100644
--- a/db/migrate/20180912111628_add_knative_application.rb
+++ b/db/migrate/20180912111628_add_knative_application.rb
@@ -35,7 +35,7 @@ class AddKnativeApplication < ActiveRecord::Migration
t.datetime_with_timezone "updated_at", null: false
t.integer "status", null: false
t.string "version", null: false
- t.string "domainname", null: false
+ t.string "hostname", null: false
t.text "status_reason"
end
end
diff --git a/db/schema.rb b/db/schema.rb
index f695e70339d..7ef3d1941b2 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -674,7 +674,7 @@ ActiveRecord::Schema.define(version: 20181013005024) do
t.datetime_with_timezone "updated_at", null: false
t.integer "status", null: false
t.string "version", null: false
- t.string "domainname", null: false
+ t.string "hostname", null: false
t.text "status_reason"
end
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index e7bea1ce2cb..d0bd24f5f18 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -1343,6 +1343,9 @@ msgstr ""
msgid "ClusterIntegration|%{boldNotice} This will add some extra resources like a load balancer, which may incur additional costs depending on the hosting provider your Kubernetes cluster is installed on. If you are using Google Kubernetes Engine, you can %{pricingLink}."
msgstr ""
+msgid "ClusterIntegration|A Knative build extends Kubernetes and utilizes existing Kubernetes primitives to provide you with the ability to run on-cluster container builds from source. For example, you can write a build that uses Kubernetes-native resources to obtain your source code from a repository, build it into container a image, and then run that image."
+msgstr ""
+
msgid "ClusterIntegration|API URL"
msgstr ""
@@ -1715,9 +1718,6 @@ msgstr ""
msgid "ClusterIntegration|sign up"
msgstr ""
-msgid "ClusterIntegration||A Knative build extends Kubernetes and utilizes existing Kubernetes primitives to provide you with the ability to run on-cluster container builds from source. For example, you can write a build that uses Kubernetes-native resources to obtain your source code from a repository, build it into container a image, and then run that image."
-msgstr ""
-
msgid "Cohorts"
msgstr ""
diff --git a/spec/fixtures/api/schemas/cluster_status.json b/spec/fixtures/api/schemas/cluster_status.json
index bc59198bd4d..ccef17a6615 100644
--- a/spec/fixtures/api/schemas/cluster_status.json
+++ b/spec/fixtures/api/schemas/cluster_status.json
@@ -32,8 +32,7 @@
},
"status_reason": { "type": ["string", "null"] },
"external_ip": { "type": ["string", "null"] },
- "hostname": { "type": ["string", "null"] },
- "domainname": { "type": ["string", "null"] }
+ "hostname": { "type": ["string", "null"] }
},
"required" : [ "name", "status" ]
}
diff --git a/spec/javascripts/clusters/components/applications_spec.js b/spec/javascripts/clusters/components/applications_spec.js
index 3946e1bccf9..5471b39ceba 100644
--- a/spec/javascripts/clusters/components/applications_spec.js
+++ b/spec/javascripts/clusters/components/applications_spec.js
@@ -92,7 +92,7 @@ describe('Applications', () => {
runner: { title: 'GitLab Runner' },
prometheus: { title: 'Prometheus' },
jupyter: { title: 'JupyterHub', hostname: '' },
- knative: { title: 'Knative', domainname: '' },
+ knative: { title: 'Knative', hostname: '' },
},
});
@@ -112,7 +112,7 @@ describe('Applications', () => {
runner: { title: 'GitLab Runner' },
prometheus: { title: 'Prometheus' },
jupyter: { title: 'JupyterHub', hostname: '' },
- knative: { title: 'Knative', domainname: '' },
+ knative: { title: 'Knative', hostname: '' },
},
});
@@ -131,7 +131,7 @@ describe('Applications', () => {
runner: { title: 'GitLab Runner' },
prometheus: { title: 'Prometheus' },
jupyter: { title: 'JupyterHub', hostname: '', status: 'installable' },
- knative: { title: 'Knative', domainname: '', status: 'installable' },
+ knative: { title: 'Knative', hostname: '', status: 'installable' },
},
});
@@ -148,7 +148,7 @@ describe('Applications', () => {
runner: { title: 'GitLab Runner' },
prometheus: { title: 'Prometheus' },
jupyter: { title: 'JupyterHub', hostname: '', status: 'installable' },
- knative: { title: 'Knative', domainname: '', status: 'installable' },
+ knative: { title: 'Knative', hostname: '', status: 'installable' },
},
});
@@ -165,7 +165,7 @@ describe('Applications', () => {
runner: { title: 'GitLab Runner' },
prometheus: { title: 'Prometheus' },
jupyter: { title: 'JupyterHub', status: 'installed', hostname: '' },
- knative: { title: 'Knative', status: 'installed', domainname: '' },
+ knative: { title: 'Knative', status: 'installed', hostname: '' },
},
});
diff --git a/spec/javascripts/clusters/stores/clusters_store_spec.js b/spec/javascripts/clusters/stores/clusters_store_spec.js
index 3757d83f01e..0586724d451 100644
--- a/spec/javascripts/clusters/stores/clusters_store_spec.js
+++ b/spec/javascripts/clusters/stores/clusters_store_spec.js
@@ -106,7 +106,7 @@ describe('Clusters Store', () => {
statusReason: mockResponseData.applications[5].status_reason,
requestStatus: null,
requestReason: null,
- domainname: '',
+ hostname: '',
},
},
});