Skip to content

Commit

Permalink
Fix dashboard issues
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
  • Loading branch information
kvaps committed Dec 27, 2024
1 parent 7afa0d5 commit 17dbf8b
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 6 deletions.
6 changes: 6 additions & 0 deletions packages/apps/tenant/templates/tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,12 @@ subjects:
- kind: Group
name: {{ include "tenant.name" . }}-admin
apiGroup: rbac.authorization.k8s.io
- kind: Group
name: {{ include "tenant.name" . }}-use
apiGroup: rbac.authorization.k8s.io
- kind: Group
name: {{ include "tenant.name" . }}-view
apiGroup: rbac.authorization.k8s.io
- kind: ServiceAccount
name: {{ include "tenant.name" . }}
namespace: {{ include "tenant.name" . }}
Expand Down
7 changes: 5 additions & 2 deletions packages/system/dashboard/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ update-dockerfiles:
version=$$(echo "$$tag" | sed 's/^v//') && \
sed -i "s/ARG VERSION=.*/ARG VERSION=$${version}/" images/dashboard/Dockerfile

image-dashboard:
image-dashboard: update-version
docker buildx build images/dashboard \
--provenance false \
--tag $(REGISTRY)/dashboard:$(call settag,$(TAG)) \
Expand All @@ -44,7 +44,7 @@ image-dashboard:
yq -i '.kubeapps.dashboard.image.digest = strenv(DIGEST)' values.yaml
rm -f images/dashboard.json

image-kubeapps-apis:
image-kubeapps-apis: update-version
docker buildx build images/kubeapps-apis \
--provenance false \
--tag $(REGISTRY)/kubeapps-apis:$(call settag,$(TAG)) \
Expand All @@ -62,3 +62,6 @@ image-kubeapps-apis:
DIGEST=$$(yq e '."containerimage.digest"' images/kubeapps-apis.json -o json -r) \
yq -i '.kubeapps.kubeappsapis.image.digest = strenv(DIGEST)' values.yaml
rm -f images/kubeapps-apis.json

update-version:
sed -i "s|\(\"appVersion\":\).*|\1 \"$(TAG)\",|g" ./charts/kubeapps/templates/dashboard/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ data:
"kubeappsNamespace": {{ .Release.Namespace | quote }},
"helmGlobalNamespace": {{ include "kubeapps.helmGlobalPackagingNamespace" . | quote }},
"carvelGlobalNamespace": {{ .Values.kubeappsapis.pluginConfig.kappController.packages.v1alpha1.globalPackagingNamespace | quote }},
"appVersion": {{ printf "v%s" .Chart.AppVersion | quote }},
"appVersion": "latest",
"authProxyEnabled": {{ .Values.authProxy.enabled }},
"oauthLoginURI": {{ .Values.authProxy.oauthLoginURI | quote }},
"oauthLogoutURI": {{ .Values.authProxy.oauthLogoutURI | quote }},
Expand Down
4 changes: 4 additions & 0 deletions packages/system/dashboard/images/dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ RUN wget -O- https://github.com/vmware-tanzu/kubeapps/archive/refs/tags/v${VERSI
COPY apple-touch-icon.png favicon-16x16.png favicon-32x32.png favicon.ico mstile-144x144.png mstile-150x150.png mstile-310x150.png mstile-310x310.png mstile-70x70.png safari-pinned-tab.svg public/

COPY release-url.diff /patches/release-url.diff
COPY remove-manage-repositories.diff /patches/remove-manage-repositories.diff
COPY documentation.diff /patches/documentation.diff
RUN patch -p2 < /patches/release-url.diff
RUN patch -p2 < /patches/remove-manage-repositories.diff
RUN patch -p2 < /patches/documentation.diff

RUN sed -i 's/opacity: 0.05;/display: none;/g' src/components/InfoCard/InfoCard.scss
RUN sed -i 's/"Kubeapps",/"Cozystack",/' lang/en.json
Expand Down
13 changes: 13 additions & 0 deletions packages/system/dashboard/images/dashboard/documentation.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/dashboard/src/components/AppList/AppListGrid.tsx b/dashboard/src/components/AppList/AppListGrid.tsx
index d3261e459..597512e62 100644
--- a/dashboard/src/components/AppList/AppListGrid.tsx
+++ b/dashboard/src/components/AppList/AppListGrid.tsx
@@ -42,7 +42,7 @@ function AppListGrid(props: IAppListProps) {
Start browsing your <Link to={url.app.catalog(cluster, namespace)}>favourite apps</Link>{" "}
or check the{" "}
<a
- href={`https://github.com/vmware-tanzu/kubeapps/blob/${appVersion}/site/content/docs/latest/tutorials/getting-started.md`}
+ href={`https://cozystack.io/docs/`}
target="_blank"
rel="noopener noreferrer"
>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
diff --git a/dashboard/src/components/Catalog/Catalog.tsx b/dashboard/src/components/Catalog/Catalog.tsx
index 5f2d2a1c5..093cb598d 100644
--- a/dashboard/src/components/Catalog/Catalog.tsx
+++ b/dashboard/src/components/Catalog/Catalog.tsx
@@ -15,7 +15,6 @@ import qs from "qs";
import React, { useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import * as ReactRouter from "react-router-dom";
-import { Link } from "react-router-dom";
import { IClusterServiceVersion, IStoreState } from "shared/types";
import { app } from "shared/url";
import { escapeRegExp, getPluginPackageName } from "shared/utils";
@@ -85,7 +84,6 @@ export default function Catalog() {
operators,
repos: { reposSummaries: repos },
config: {
- appVersion,
kubeappsCluster,
helmGlobalNamespace,
carvelGlobalNamespace,
@@ -420,24 +418,6 @@ export default function Catalog() {
<div className="empty-catalog">
<CdsIcon shape="bundle" />
<p>The current catalog is empty.</p>
- <p>
- Manage your Package Repositories in Kubeapps by visiting the Package repositories
- configuration page.
- </p>
- <Link to={app.config.pkgrepositories(cluster || "", namespace || "")}>
- <CdsButton>Manage Package Repositories</CdsButton>
- </Link>
- <p>
- For help managing other packaging formats, such as Flux or Carvel, please refer to the{" "}
- <a
- target="_blank"
- rel="noopener noreferrer"
- href={`https://github.com/vmware-tanzu/kubeapps/tree/${appVersion}/site/content/docs/latest`}
- >
- Kubeapps documentation
- </a>
- .
- </p>
</div>
) : (
<Row>
diff --git a/dashboard/src/components/Header/Menu.tsx b/dashboard/src/components/Header/Menu.tsx
index c8ec1da8c..e59f90190 100644
--- a/dashboard/src/components/Header/Menu.tsx
+++ b/dashboard/src/components/Header/Menu.tsx
@@ -78,16 +78,6 @@ function Menu({ clusters, appVersion, logout }: IContextSelectorProps) {
<div className="dropdown-menu dropdown-configuration-menu" role="menu" hidden={!open}>
<div>
<label className="dropdown-menu-padding dropdown-menu-label">Administration</label>
- <Link
- to={app.config.pkgrepositories(clusters.currentCluster, namespaceSelected)}
- className="dropdown-menu-link"
- onClick={toggleOpen}
- >
- <div className="dropdown-menu-item" role="menuitem">
- <CdsIcon solid={true} size="md" shape="library" />{" "}
- <span>Package Repositories</span>
- </div>
- </Link>
<div className="dropdown-divider" role="separator" />
{featureFlags?.operators && (
<Link
2 changes: 1 addition & 1 deletion packages/system/dashboard/images/kubeapps-apis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# syntax = docker/dockerfile:1

FROM alpine as source
ARG COMMIT_REF=bcf015b116061cd1b07ed3cb533bb689423087c8
ARG COMMIT_REF=cb657ea90a7bc1a2545db046692612317ef1a546
RUN apk add --no-cache patch
WORKDIR /source
RUN wget -O- https://github.com/aenix-io/kubeapps/archive/${COMMIT_REF}.tar.gz | tar xzf - --strip-components=1
Expand Down
4 changes: 2 additions & 2 deletions packages/system/dashboard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ kubeapps:
registry: ghcr.io/aenix-io/cozystack
repository: dashboard
tag: latest
digest: "sha256:4cef715f4398299c4405e3a7ca5c66d175564314b8e0ea681fd8da9b0a847c2a"
digest: "sha256:48d84bd1d0371d89bba8e2b379186cc1349f88e99ddd41bd453d91ffce9ab5c0"
kubeappsapis:
image:
registry: ghcr.io/aenix-io/cozystack
repository: kubeapps-apis
tag: latest
digest: "sha256:f279dbf3392c6d0fc08fe6a5f4581fc43855b9a26ecf43bff65d68423f2626b4"
digest: "sha256:00f1545c7bb3a98ff387a9ab1bb5501e3108a868be0c7cf138bd1eb7452ceddf"
pluginConfig:
flux:
packages:
Expand Down

0 comments on commit 17dbf8b

Please sign in to comment.