diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 11:59:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 11:59:07 +0000 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /app/assets/javascripts/clusters | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) | |
download | gitlab-ce-8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca.tar.gz |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'app/assets/javascripts/clusters')
6 files changed, 76 insertions, 34 deletions
diff --git a/app/assets/javascripts/clusters/clusters_bundle.js b/app/assets/javascripts/clusters/clusters_bundle.js index a75646db162..a533a1a78e8 100644 --- a/app/assets/javascripts/clusters/clusters_bundle.js +++ b/app/assets/javascripts/clusters/clusters_bundle.js @@ -52,6 +52,7 @@ export default class Clusters { clusterStatus, clusterStatusReason, helpPath, + helmHelpPath, ingressHelpPath, ingressDnsHelpPath, ingressModSecurityHelpPath, @@ -68,8 +69,9 @@ export default class Clusters { this.clusterBannerDismissedKey = `cluster_${this.clusterId}_banner_dismissed`; this.store = new ClustersStore(); - this.store.setHelpPaths( + this.store.setHelpPaths({ helpPath, + helmHelpPath, ingressHelpPath, ingressDnsHelpPath, ingressModSecurityHelpPath, @@ -78,7 +80,7 @@ export default class Clusters { deployBoardsHelpPath, cloudRunHelpPath, ciliumHelpPath, - ); + }); this.store.setManagePrometheusPath(managePrometheusPath); this.store.updateStatus(clusterStatus); this.store.updateStatusReason(clusterStatusReason); @@ -162,6 +164,7 @@ export default class Clusters { type, applications: this.state.applications, helpPath: this.state.helpPath, + helmHelpPath: this.state.helmHelpPath, ingressHelpPath: this.state.ingressHelpPath, managePrometheusPath: this.state.managePrometheusPath, ingressDnsHelpPath: this.state.ingressDnsHelpPath, @@ -262,13 +265,21 @@ export default class Clusters { removeListeners() { eventHub.$off('installApplication', this.installApplication); eventHub.$off('updateApplication', this.updateApplication); + // eslint-disable-next-line @gitlab/no-global-event-off eventHub.$off('saveKnativeDomain'); + // eslint-disable-next-line @gitlab/no-global-event-off eventHub.$off('setKnativeDomain'); + // eslint-disable-next-line @gitlab/no-global-event-off eventHub.$off('setCrossplaneProviderStack'); + // eslint-disable-next-line @gitlab/no-global-event-off eventHub.$off('uninstallApplication'); + // eslint-disable-next-line @gitlab/no-global-event-off eventHub.$off('setIngressModSecurityEnabled'); + // eslint-disable-next-line @gitlab/no-global-event-off eventHub.$off('setIngressModSecurityMode'); + // eslint-disable-next-line @gitlab/no-global-event-off eventHub.$off('resetIngressModSecurityChanges'); + // eslint-disable-next-line @gitlab/no-global-event-off eventHub.$off('setFluentdSettings'); } diff --git a/app/assets/javascripts/clusters/components/applications.vue b/app/assets/javascripts/clusters/components/applications.vue index 271d862afab..fdffaa24d03 100644 --- a/app/assets/javascripts/clusters/components/applications.vue +++ b/app/assets/javascripts/clusters/components/applications.vue @@ -1,6 +1,7 @@ <script> -import { GlLoadingIcon, GlSprintf, GlLink } from '@gitlab/ui'; +import { GlLoadingIcon, GlSprintf, GlLink, GlAlert } from '@gitlab/ui'; import gitlabLogo from 'images/cluster_app_logos/gitlab.png'; +import helmLogo from 'images/cluster_app_logos/helm.png'; import jupyterhubLogo from 'images/cluster_app_logos/jupyterhub.png'; import kubernetesLogo from 'images/cluster_app_logos/kubernetes.png'; import certManagerLogo from 'images/cluster_app_logos/cert_manager.png'; @@ -29,6 +30,7 @@ export default { CrossplaneProviderStack, IngressModsecuritySettings, FluentdOutputSettings, + GlAlert, }, props: { type: { @@ -46,6 +48,11 @@ export default { required: false, default: '', }, + helmHelpPath: { + type: String, + required: false, + default: '', + }, ingressHelpPath: { type: String, required: false, @@ -150,6 +157,7 @@ export default { }, logos: { gitlabLogo, + helmLogo, jupyterhubLogo, kubernetesLogo, certManagerLogo, @@ -173,6 +181,35 @@ export default { <div class="cluster-application-list gl-mt-3"> <application-row + v-if="applications.helm.installed || applications.helm.uninstalling" + id="helm" + :logo-url="$options.logos.helmLogo" + :title="applications.helm.title" + :status="applications.helm.status" + :status-reason="applications.helm.statusReason" + :request-status="applications.helm.requestStatus" + :request-reason="applications.helm.requestReason" + :installed="applications.helm.installed" + :install-failed="applications.helm.installFailed" + :uninstallable="applications.helm.uninstallable" + :uninstall-successful="applications.helm.uninstallSuccessful" + :uninstall-failed="applications.helm.uninstallFailed" + title-link="https://v2.helm.sh/" + > + <template #description> + <p> + {{ + s__(`ClusterIntegration|Can be safely removed. Prior to GitLab + 13.2, GitLab used a remote Tiller server to manage the + applications. GitLab no longer uses this server. + Uninstalling this server will not affect your other + applications. This row will disappear afterwards.`) + }} + <gl-link :href="helmHelpPath">{{ __('More information') }}</gl-link> + </p> + </template> + </application-row> + <application-row :id="ingressId" :logo-url="$options.logos.kubernetesLogo" :title="applications.ingress.title" @@ -257,8 +294,8 @@ export default { </p> </template> <template v-else> - <div class="bs-callout bs-callout-info"> - <strong data-testid="ingressCostWarning"> + <gl-alert variant="info" :dismissible="false"> + <span data-testid="ingressCostWarning"> <gl-sprintf :message=" s__( @@ -272,8 +309,8 @@ export default { }}</gl-link> </template> </gl-sprintf> - </strong> - </div> + </span> + </gl-alert> </template> </template> </application-row> @@ -536,13 +573,13 @@ export default { title-link="https://github.com/knative/docs" > <template #description> - <p v-if="!rbac" class="rbac-notice bs-callout bs-callout-info"> + <gl-alert v-if="!rbac" variant="info" class="rbac-notice gl-my-3" :dismissible="false"> {{ s__(`ClusterIntegration|You must have an RBAC-enabled cluster to install Knative.`) }} <gl-link :href="helpPath" target="_blank">{{ __('More information') }}</gl-link> - </p> + </gl-alert> <p> {{ s__(`ClusterIntegration|Knative extends Kubernetes to provide diff --git a/app/assets/javascripts/clusters/components/knative_domain_editor.vue b/app/assets/javascripts/clusters/components/knative_domain_editor.vue index cb415d902e8..d80bd6f5b42 100644 --- a/app/assets/javascripts/clusters/components/knative_domain_editor.vue +++ b/app/assets/javascripts/clusters/components/knative_domain_editor.vue @@ -7,6 +7,7 @@ import { GlSearchBoxByType, GlSprintf, GlButton, + GlAlert, } from '@gitlab/ui'; import ClipboardButton from '../../vue_shared/components/clipboard_button.vue'; import { __, s__ } from '~/locale'; @@ -25,6 +26,7 @@ export default { GlDropdownItem, GlSearchBoxByType, GlSprintf, + GlAlert, }, props: { knative: { @@ -106,12 +108,13 @@ export default { <template> <div class="row"> - <div + <gl-alert v-if="knative.updateFailed" - class="bs-callout bs-callout-danger cluster-application-banner col-12 mt-2 mb-2 js-cluster-knative-domain-name-failure-message" + class="gl-mb-5 col-12 js-cluster-knative-domain-name-failure-message" + variant="danger" > {{ s__('ClusterIntegration|Something went wrong while updating Knative domain name.') }} - </div> + </gl-alert> <div :class="{ 'col-md-6': knativeInstalled, 'col-12': !knativeInstalled }" diff --git a/app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue b/app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue index 477dd13db4f..2a197e40b60 100644 --- a/app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue +++ b/app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue @@ -16,7 +16,7 @@ import { const CUSTOM_APP_WARNING_TEXT = { [HELM]: sprintf( s__( - 'ClusterIntegration|The associated Tiller pod, the %{gitlabManagedAppsNamespace} namespace, and all of its resources will be deleted and cannot be restored.', + 'ClusterIntegration|The associated Tiller pod will be deleted and cannot be restored. Your other applications will remain unaffected.', ), { gitlabManagedAppsNamespace: '<code>gitlab-managed-apps</code>', diff --git a/app/assets/javascripts/clusters/services/application_state_machine.js b/app/assets/javascripts/clusters/services/application_state_machine.js index 683b0e18534..1dd815ae44d 100644 --- a/app/assets/javascripts/clusters/services/application_state_machine.js +++ b/app/assets/javascripts/clusters/services/application_state_machine.js @@ -193,6 +193,12 @@ const applicationStateMachine = { uninstallSuccessful: true, }, }, + [NOT_INSTALLABLE]: { + target: NOT_INSTALLABLE, + effects: { + uninstallSuccessful: true, + }, + }, [UNINSTALL_ERRORED]: { target: INSTALLED, effects: { diff --git a/app/assets/javascripts/clusters/stores/clusters_store.js b/app/assets/javascripts/clusters/stores/clusters_store.js index 53868b7c02d..88505eac3a9 100644 --- a/app/assets/javascripts/clusters/stores/clusters_store.js +++ b/app/assets/javascripts/clusters/stores/clusters_store.js @@ -36,6 +36,7 @@ export default class ClusterStore { constructor() { this.state = { helpPath: null, + helmHelpPath: null, ingressHelpPath: null, environmentsHelpPath: null, clustersHelpPath: null, @@ -49,7 +50,7 @@ export default class ClusterStore { applications: { helm: { ...applicationInitialState, - title: s__('ClusterIntegration|Helm Tiller'), + title: s__('ClusterIntegration|Legacy Helm Tiller server'), }, ingress: { ...applicationInitialState, @@ -126,26 +127,10 @@ export default class ClusterStore { }; } - setHelpPaths( - helpPath, - ingressHelpPath, - ingressDnsHelpPath, - ingressModSecurityHelpPath, - environmentsHelpPath, - clustersHelpPath, - deployBoardsHelpPath, - cloudRunHelpPath, - ciliumHelpPath, - ) { - this.state.helpPath = helpPath; - this.state.ingressHelpPath = ingressHelpPath; - this.state.ingressDnsHelpPath = ingressDnsHelpPath; - this.state.ingressModSecurityHelpPath = ingressModSecurityHelpPath; - this.state.environmentsHelpPath = environmentsHelpPath; - this.state.clustersHelpPath = clustersHelpPath; - this.state.deployBoardsHelpPath = deployBoardsHelpPath; - this.state.cloudRunHelpPath = cloudRunHelpPath; - this.state.ciliumHelpPath = ciliumHelpPath; + setHelpPaths(helpPaths) { + Object.assign(this.state, { + ...helpPaths, + }); } setManagePrometheusPath(managePrometheusPath) { |