diff --git a/app/models/cluster.js b/app/models/cluster.js index c12b04c1e..3aa2baa48 100644 --- a/app/models/cluster.js +++ b/app/models/cluster.js @@ -4,7 +4,7 @@ import { inject as service } from '@ember/service'; import Resource from 'ember-api-store/models/resource'; import { hasMany } from 'ember-api-store/utils/denormalize'; import ResourceUsage from 'shared/mixins/resource-usage'; -import { alias } from '@ember/object/computed'; +import { equal, alias } from '@ember/object/computed'; import { resolve } from 'rsvp'; export default Resource.extend(ResourceUsage, { @@ -20,6 +20,7 @@ export default Resource.extend(ResourceUsage, { machines: alias('nodes'), clusterRoleTemplateBindings: hasMany('id', 'clusterRoleTemplateBinding', 'clusterId'), roleTemplateBindings: alias('clusterRoleTemplateBindings'), + isGKE: equal('driver', 'googleKubernetesEngine'), actions: { edit() { diff --git a/lib/shared/addon/components/input-answers/component.js b/lib/shared/addon/components/input-answers/component.js index 919249299..14f0c3128 100644 --- a/lib/shared/addon/components/input-answers/component.js +++ b/lib/shared/addon/components/input-answers/component.js @@ -6,6 +6,8 @@ import { isSafari } from 'ui/utils/platform'; import { evaluate } from 'shared/utils/evaluate'; import layout from './template'; +const HIDDEN = 'Hidden'; + export default Component.extend({ layout, originQuestions: alias('selectedTemplate.questions'), @@ -119,6 +121,10 @@ export default Component.extend({ filterdQuestions.forEach((item) => { if ( item.group ) { + if ( item.group === HIDDEN ) { + return; + } + if ( !sections[item.group] ) { sections[item.group] = []; } diff --git a/lib/shared/addon/components/new-catalog/component.js b/lib/shared/addon/components/new-catalog/component.js index abd132098..797bee039 100644 --- a/lib/shared/addon/components/new-catalog/component.js +++ b/lib/shared/addon/components/new-catalog/component.js @@ -21,6 +21,8 @@ export default Component.extend(NewOrEdit, { settings: service(), globalStore: service(), + isGKE: alias('scope.currentCluster.isGKE'), + namespaceErrors: null, allTemplates: null, templateResource: null, diff --git a/lib/shared/addon/components/new-catalog/template.hbs b/lib/shared/addon/components/new-catalog/template.hbs index 1011efb88..482c8bea3 100644 --- a/lib/shared/addon/components/new-catalog/template.hbs +++ b/lib/shared/addon/components/new-catalog/template.hbs @@ -186,6 +186,15 @@ {{/if}} + {{#if isGKE}} + + {{/if}} + {{#if errors.length}}
diff --git a/lib/shared/addon/components/new-edit-ingress/component.js b/lib/shared/addon/components/new-edit-ingress/component.js index c24ec3e94..ec9f6170c 100644 --- a/lib/shared/addon/components/new-edit-ingress/component.js +++ b/lib/shared/addon/components/new-edit-ingress/component.js @@ -9,6 +9,7 @@ import layout from './template'; export default Component.extend(NewOrEdit, { layout, intl: service(), + scope: service(), ingress: null, editing: null, @@ -16,6 +17,8 @@ export default Component.extend(NewOrEdit, { namespacedCertificates: null, certificates: null, + isGKE: alias('scope.currentCluster.isGKE'), + primaryResource: alias('ingress'), actions: { diff --git a/lib/shared/addon/components/new-edit-ingress/template.hbs b/lib/shared/addon/components/new-edit-ingress/template.hbs index c9a1f5f21..39399aff1 100644 --- a/lib/shared/addon/components/new-edit-ingress/template.hbs +++ b/lib/shared/addon/components/new-edit-ingress/template.hbs @@ -52,5 +52,14 @@ }} {{/accordion-list}} +{{#if isGKE}} + +{{/if}} + {{top-errors errors=errors}} {{save-cancel editing=true save="save" cancel="cancel"}} diff --git a/translations/en-us.yaml b/translations/en-us.yaml index 8d1433d75..9401c98ea 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -704,6 +704,7 @@ clustersPage: ingressPage: header: 'Ingress: {name}' + gkeIngressWarning: 'It may take a few minutes for Kubernetes Engine to allocate an external IP address and prepare the load balancer. In the meanwhile, you may get errors like HTTP 404 and HTTP 500 until the load balancer is ready to serve the traffic.' table: targets: label: Targets