feat(dashboard): update UI image to amd64 and remove old UI build

- Update openapiUI image to amd64 build (sha256:9d8fc5c1...)
- Remove old openapi-ui and openapi-ui-k8s-bff build targets from Makefile
- Remove old UI Dockerfiles and related files
- Add RBAC permissions for cozystack.io/applicationdefinitions to fix 403 errors

The new cozystack-ui requires read access to applicationdefinitions API group
for marketplace and application catalog functionality.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
This commit is contained in:
IvanHunters 2026-04-28 03:02:59 +03:00
parent ed01319aa1
commit ddcc1f2ad6
4 changed files with 10 additions and 114 deletions

View file

@ -5,7 +5,7 @@ include ../../../hack/common-envs.mk
include ../../../hack/package.mk
update: update-crd update-dockerfiles
image: image-openapi-ui image-openapi-ui-k8s-bff image-token-proxy update-tenant-text
image: image-token-proxy update-tenant-text
update-dockerfiles:
@ -18,38 +18,6 @@ update-crd:
rm -f crds/_helpers.tpl
sed -i '/{{/d' crds/*.yml crds/*.yaml
image-openapi-ui:
docker buildx build images/openapi-ui \
--provenance false \
--builder=$(BUILDER) \
--platform=linux/amd64 \
--tag $(REGISTRY)/openapi-ui:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/openapi-ui:latest \
--cache-to type=inline \
--metadata-file images/openapi-ui.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
IMAGE="$(REGISTRY)/openapi-ui:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/openapi-ui.json -r)" \
yq -i '.openapiUI.image = strenv(IMAGE)' values.yaml
rm -f images/openapi-ui.json
image-openapi-ui-k8s-bff:
docker buildx build images/openapi-ui-k8s-bff \
--provenance false \
--builder=$(BUILDER) \
--platform=linux/amd64 \
--tag $(REGISTRY)/openapi-ui-k8s-bff:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/openapi-ui-k8s-bff:latest \
--cache-to type=inline \
--metadata-file images/openapi-ui-k8s-bff.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
IMAGE="$(REGISTRY)/openapi-ui-k8s-bff:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/openapi-ui-k8s-bff.json -r)" \
yq -i '.openapiUIK8sBff.image = strenv(IMAGE)' values.yaml
rm -f images/openapi-ui-k8s-bff.json
image-token-proxy:
docker buildx build images/token-proxy \
--provenance false \

View file

@ -4,6 +4,14 @@ kind: ClusterRole
metadata:
name: cozystack-dashboard-readonly
rules:
- apiGroups:
- cozystack.io
resources:
- applicationdefinitions
verbs:
- get
- list
- watch
- apiGroups:
- dashboard.cozystack.io
resources:

View file

@ -38,84 +38,6 @@ spec:
topologyKey: kubernetes.io/hostname
weight: 100
containers:
- env:
- name: BASE_API_GROUP
value: dashboard.cozystack.io
- name: BASE_API_VERSION
value: v1alpha1
- name: BASE_NAMESPACE_FULL_PATH
value: "/apis/core.cozystack.io/v1alpha1/tenantnamespaces"
- name: BASE_NAVIGATION_RESOURCE_PLURAL
value: navigations
- name: BASE_NAVIGATION_RESOURCE_NAME
value: navigation
- name: BASE_FRONTEND_PREFIX
value: /openapi-ui
- name: BASE_FACTORY_NAMESPACED_API_KEY
value: base-factory-namespaced-api
- name: BASE_FACTORY_CLUSTERSCOPED_API_KEY
value: base-factory-clusterscoped-api
- name: BASE_FACTORY_NAMESPACED_BUILTIN_KEY
value: base-factory-namespaced-builtin
- name: BASE_FACTORY_CLUSTERSCOPED_BUILTIN_KEY
value: base-factory-clusterscoped-builtin
- name: BASE_NAMESPACE_FACTORY_KEY
value: base-factory-clusterscoped-builtin
- name: BASE_ALLOWED_AUTH_HEADERS
value: user-agent,accept,content-type,origin,referer,accept-encoding,cookie,authorization
- name: LOGGER
value: "true"
- name: LOGGER_WITH_HEADERS
value: "false"
- name: PORT
value: "64231"
image: {{ .Values.openapiUIK8sBff.image | quote }}
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthcheck
port: 64231
scheme: HTTP
initialDelaySeconds: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2
startupProbe:
httpGet:
path: /healthcheck
port: 64231
scheme: HTTP
failureThreshold: 30
periodSeconds: 2
name: bff
ports:
- containerPort: 64231
name: http-bff
protocol: TCP
resources:
limits:
cpu: 1
memory: 1Gi
requests:
cpu: 100m
ephemeral-storage: 50Mi
memory: 128Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
add: []
drop:
- ALL
privileged: false
readOnlyRootFilesystem: false
runAsGroup: 0
runAsNonRoot: true
runAsUser: 101
seccompProfile:
type: RuntimeDefault
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
- env:
- name: BASEPREFIX
value: /openapi-ui

View file

@ -1,6 +1,4 @@
openapiUI:
image: 999669/cozystack-ui:latest@sha256:74e39ad4f199fe5bc728793acbfb1d6d4fc76e32894521668a486306d498b71d
openapiUIK8sBff:
image: ghcr.io/cozystack/cozystack/openapi-ui-k8s-bff:v1.3.0@sha256:1b3ea6d4c7dbbe6a8def3b2807fffdfab2ac4afc39d7a846e57dd491fa168f92
image: 999669/cozystack-ui:latest@sha256:9d8fc5c1a16b5d61e6e6bc9a02621c5d7681de960bb7054a5908a61ab4310799
tokenProxy:
image: ghcr.io/cozystack/cozystack/token-proxy:v1.3.0@sha256:2e280991e07853ea48f97b0a42946afffa10d03d6a83d41099ed83e6ffc94fdc