Commit c9f6526c authored by Mark Florian's avatar Mark Florian

Merge branch '207322-fix-component-issues' into 'master'

Fix Kubernetes applications template issues

See merge request gitlab-org/gitlab!33266
parents aa1d7259 5c710d10
...@@ -2,16 +2,13 @@ ...@@ -2,16 +2,13 @@
import { escape } from 'lodash'; import { escape } from 'lodash';
import helmInstallIllustration from '@gitlab/svgs/dist/illustrations/kubernetes-installation.svg'; import helmInstallIllustration from '@gitlab/svgs/dist/illustrations/kubernetes-installation.svg';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon } from '@gitlab/ui';
import elasticsearchLogo from 'images/cluster_app_logos/elasticsearch.png';
import gitlabLogo from 'images/cluster_app_logos/gitlab.png'; import gitlabLogo from 'images/cluster_app_logos/gitlab.png';
import helmLogo from 'images/cluster_app_logos/helm.png'; import helmLogo from 'images/cluster_app_logos/helm.png';
import jeagerLogo from 'images/cluster_app_logos/jeager.png';
import jupyterhubLogo from 'images/cluster_app_logos/jupyterhub.png'; import jupyterhubLogo from 'images/cluster_app_logos/jupyterhub.png';
import kubernetesLogo from 'images/cluster_app_logos/kubernetes.png'; import kubernetesLogo from 'images/cluster_app_logos/kubernetes.png';
import certManagerLogo from 'images/cluster_app_logos/cert_manager.png'; import certManagerLogo from 'images/cluster_app_logos/cert_manager.png';
import crossplaneLogo from 'images/cluster_app_logos/crossplane.png'; import crossplaneLogo from 'images/cluster_app_logos/crossplane.png';
import knativeLogo from 'images/cluster_app_logos/knative.png'; import knativeLogo from 'images/cluster_app_logos/knative.png';
import meltanoLogo from 'images/cluster_app_logos/meltano.png';
import prometheusLogo from 'images/cluster_app_logos/prometheus.png'; import prometheusLogo from 'images/cluster_app_logos/prometheus.png';
import elasticStackLogo from 'images/cluster_app_logos/elastic_stack.png'; import elasticStackLogo from 'images/cluster_app_logos/elastic_stack.png';
import fluentdLogo from 'images/cluster_app_logos/fluentd.png'; import fluentdLogo from 'images/cluster_app_logos/fluentd.png';
...@@ -92,25 +89,7 @@ export default { ...@@ -92,25 +89,7 @@ export default {
default: false, default: false,
}, },
}, },
data: () => ({
elasticsearchLogo,
gitlabLogo,
helmLogo,
jeagerLogo,
jupyterhubLogo,
kubernetesLogo,
certManagerLogo,
crossplaneLogo,
knativeLogo,
meltanoLogo,
prometheusLogo,
elasticStackLogo,
fluentdLogo,
}),
computed: { computed: {
isProjectCluster() {
return this.type === CLUSTER_TYPE.PROJECT;
},
managedAppsLocalTillerEnabled() { managedAppsLocalTillerEnabled() {
return Boolean(gon.features?.managedAppsLocalTiller); return Boolean(gon.features?.managedAppsLocalTiller);
}, },
...@@ -133,9 +112,6 @@ export default { ...@@ -133,9 +112,6 @@ export default {
certManagerInstalled() { certManagerInstalled() {
return this.applications.cert_manager.status === APPLICATION_STATUS.INSTALLED; return this.applications.cert_manager.status === APPLICATION_STATUS.INSTALLED;
}, },
crossplaneInstalled() {
return this.applications.crossplane.status === APPLICATION_STATUS.INSTALLED;
},
ingressDescription() { ingressDescription() {
return sprintf( return sprintf(
escape( escape(
...@@ -208,9 +184,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -208,9 +184,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
jupyterHostname() { jupyterHostname() {
return this.applications.jupyter.hostname; return this.applications.jupyter.hostname;
}, },
elasticStackInstalled() {
return this.applications.elastic_stack.status === APPLICATION_STATUS.INSTALLED;
},
knative() { knative() {
return this.applications.knative; return this.applications.knative;
}, },
...@@ -240,9 +213,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -240,9 +213,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
return this.applications.ingress; return this.applications.ingress;
}, },
}, },
created() {
this.helmInstallIllustration = helmInstallIllustration;
},
methods: { methods: {
saveKnativeDomain() { saveKnativeDomain() {
eventHub.$emit('saveKnativeDomain', { eventHub.$emit('saveKnativeDomain', {
...@@ -267,6 +237,19 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -267,6 +237,19 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
}); });
}, },
}, },
logos: {
gitlabLogo,
helmLogo,
jupyterhubLogo,
kubernetesLogo,
certManagerLogo,
crossplaneLogo,
knativeLogo,
prometheusLogo,
elasticStackLogo,
fluentdLogo,
},
helmInstallIllustration,
}; };
</script> </script>
...@@ -284,7 +267,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -284,7 +267,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
<application-row <application-row
v-if="!managedAppsLocalTillerEnabled" v-if="!managedAppsLocalTillerEnabled"
id="helm" id="helm"
:logo-url="helmLogo" :logo-url="$options.logos.helmLogo"
:title="applications.helm.title" :title="applications.helm.title"
:status="applications.helm.status" :status="applications.helm.status"
:status-reason="applications.helm.statusReason" :status-reason="applications.helm.statusReason"
...@@ -308,7 +291,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -308,7 +291,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</div> </div>
</application-row> </application-row>
<div v-show="!helmInstalled" class="cluster-application-warning"> <div v-show="!helmInstalled" class="cluster-application-warning">
<div class="svg-container" v-html="helmInstallIllustration"></div> <div class="svg-container" v-html="$options.helmInstallIllustration"></div>
{{ {{
s__(`ClusterIntegration|You must first install Helm Tiller before s__(`ClusterIntegration|You must first install Helm Tiller before
installing the applications below`) installing the applications below`)
...@@ -316,7 +299,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -316,7 +299,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</div> </div>
<application-row <application-row
:id="ingressId" :id="ingressId"
:logo-url="kubernetesLogo" :logo-url="$options.logos.kubernetesLogo"
:title="applications.ingress.title" :title="applications.ingress.title"
:status="applications.ingress.status" :status="applications.ingress.status"
:status-reason="applications.ingress.statusReason" :status-reason="applications.ingress.statusReason"
...@@ -352,27 +335,29 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -352,27 +335,29 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
<template v-if="ingressInstalled"> <template v-if="ingressInstalled">
<div class="form-group"> <div class="form-group">
<label for="ingress-endpoint">{{ s__('ClusterIntegration|Ingress Endpoint') }}</label> <label for="ingress-endpoint">{{ s__('ClusterIntegration|Ingress Endpoint') }}</label>
<div v-if="ingressExternalEndpoint" class="input-group"> <div class="input-group">
<input <template v-if="ingressExternalEndpoint">
id="ingress-endpoint" <input
:value="ingressExternalEndpoint" id="ingress-endpoint"
type="text" :value="ingressExternalEndpoint"
class="form-control js-endpoint" type="text"
readonly class="form-control js-endpoint"
/> readonly
<span class="input-group-append">
<clipboard-button
:text="ingressExternalEndpoint"
:title="s__('ClusterIntegration|Copy Ingress Endpoint')"
class="input-group-text js-clipboard-btn"
/> />
</span> <span class="input-group-append">
</div> <clipboard-button
<div v-else class="input-group"> :text="ingressExternalEndpoint"
<input type="text" class="form-control js-endpoint" readonly /> :title="s__('ClusterIntegration|Copy Ingress Endpoint')"
<gl-loading-icon class="input-group-text js-clipboard-btn"
class="position-absolute align-self-center ml-2 js-ingress-ip-loading-icon" />
/> </span>
</template>
<template v-else>
<input type="text" class="form-control js-endpoint" readonly />
<gl-loading-icon
class="position-absolute align-self-center ml-2 js-ingress-ip-loading-icon"
/>
</template>
</div> </div>
<p class="form-text text-muted"> <p class="form-text text-muted">
{{ {{
...@@ -397,7 +382,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -397,7 +382,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</a> </a>
</p> </p>
</template> </template>
<template v-if="!ingressInstalled"> <template v-else>
<div class="bs-callout bs-callout-info"> <div class="bs-callout bs-callout-info">
<strong v-html="ingressDescription"></strong> <strong v-html="ingressDescription"></strong>
</div> </div>
...@@ -406,7 +391,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -406,7 +391,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</application-row> </application-row>
<application-row <application-row
id="cert_manager" id="cert_manager"
:logo-url="certManagerLogo" :logo-url="$options.logos.certManagerLogo"
:title="applications.cert_manager.title" :title="applications.cert_manager.title"
:status="applications.cert_manager.status" :status="applications.cert_manager.status"
:status-reason="applications.cert_manager.statusReason" :status-reason="applications.cert_manager.statusReason"
...@@ -430,6 +415,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -430,6 +415,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</label> </label>
<div class="input-group"> <div class="input-group">
<input <input
id="cert-manager-issuer-email"
v-model="applications.cert_manager.email" v-model="applications.cert_manager.email"
:readonly="certManagerInstalled" :readonly="certManagerInstalled"
type="text" type="text"
...@@ -454,7 +440,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -454,7 +440,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</application-row> </application-row>
<application-row <application-row
id="prometheus" id="prometheus"
:logo-url="prometheusLogo" :logo-url="$options.logos.prometheusLogo"
:title="applications.prometheus.title" :title="applications.prometheus.title"
:manage-link="managePrometheusPath" :manage-link="managePrometheusPath"
:status="applications.prometheus.status" :status="applications.prometheus.status"
...@@ -473,7 +459,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -473,7 +459,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</application-row> </application-row>
<application-row <application-row
id="runner" id="runner"
:logo-url="gitlabLogo" :logo-url="$options.logos.gitlabLogo"
:title="applications.runner.title" :title="applications.runner.title"
:status="applications.runner.status" :status="applications.runner.status"
:status-reason="applications.runner.statusReason" :status-reason="applications.runner.statusReason"
...@@ -503,7 +489,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -503,7 +489,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</application-row> </application-row>
<application-row <application-row
id="crossplane" id="crossplane"
:logo-url="crossplaneLogo" :logo-url="$options.logos.crossplaneLogo"
:title="applications.crossplane.title" :title="applications.crossplane.title"
:status="applications.crossplane.status" :status="applications.crossplane.status"
:status-reason="applications.crossplane.statusReason" :status-reason="applications.crossplane.statusReason"
...@@ -530,7 +516,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -530,7 +516,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
<application-row <application-row
id="jupyter" id="jupyter"
:logo-url="jupyterhubLogo" :logo-url="$options.logos.jupyterhubLogo"
:title="applications.jupyter.title" :title="applications.jupyter.title"
:status="applications.jupyter.status" :status="applications.jupyter.status"
:status-reason="applications.jupyter.statusReason" :status-reason="applications.jupyter.statusReason"
...@@ -562,6 +548,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -562,6 +548,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
<div class="input-group"> <div class="input-group">
<input <input
id="jupyter-hostname"
v-model="applications.jupyter.hostname" v-model="applications.jupyter.hostname"
:readonly="jupyterInstalled" :readonly="jupyterInstalled"
type="text" type="text"
...@@ -591,7 +578,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -591,7 +578,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</application-row> </application-row>
<application-row <application-row
id="knative" id="knative"
:logo-url="knativeLogo" :logo-url="$options.logos.knativeLogo"
:title="applications.knative.title" :title="applications.knative.title"
:status="applications.knative.status" :status="applications.knative.status"
:status-reason="applications.knative.statusReason" :status-reason="applications.knative.statusReason"
...@@ -613,18 +600,15 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -613,18 +600,15 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
title-link="https://github.com/knative/docs" title-link="https://github.com/knative/docs"
> >
<div slot="description"> <div slot="description">
<span v-if="!rbac"> <p v-if="!rbac" class="rbac-notice bs-callout bs-callout-info">
<p v-if="!rbac" class="rbac-notice bs-callout bs-callout-info gl-mb-0"> {{
{{ s__(`ClusterIntegration|You must have an RBAC-enabled cluster
s__(`ClusterIntegration|You must have an RBAC-enabled cluster to install Knative.`)
to install Knative.`) }}
}} <a :href="helpPath" target="_blank" rel="noopener noreferrer">
<a :href="helpPath" target="_blank" rel="noopener noreferrer"> {{ __('More information') }}
{{ __('More information') }} </a>
</a> </p>
</p>
<br />
</span>
<p> <p>
{{ {{
s__(`ClusterIntegration|Knative extends Kubernetes to provide s__(`ClusterIntegration|Knative extends Kubernetes to provide
...@@ -645,7 +629,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -645,7 +629,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</application-row> </application-row>
<application-row <application-row
id="elastic_stack" id="elastic_stack"
:logo-url="elasticStackLogo" :logo-url="$options.logos.elasticStackLogo"
:title="applications.elastic_stack.title" :title="applications.elastic_stack.title"
:status="applications.elastic_stack.status" :status="applications.elastic_stack.status"
:status-reason="applications.elastic_stack.statusReason" :status-reason="applications.elastic_stack.statusReason"
...@@ -677,7 +661,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity ...@@ -677,7 +661,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
<application-row <application-row
id="fluentd" id="fluentd"
:logo-url="fluentdLogo" :logo-url="$options.logos.fluentdLogo"
:title="applications.fluentd.title" :title="applications.fluentd.title"
:status="applications.fluentd.status" :status="applications.fluentd.status"
:status-reason="applications.fluentd.statusReason" :status-reason="applications.fluentd.statusReason"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment