Workaround: The declarative way to flush redis for our dashboard (#24)

This commit is contained in:
Andrei Kvapil
2024-02-19 20:13:55 +01:00
committed by GitHub
parent 24151b09f3
commit 235a2fcf47
2 changed files with 14 additions and 5 deletions

View File

@@ -646,6 +646,20 @@ spec:
namespace: cozy-cilium
- name: kubeovn
namespace: cozy-kubeovn
{{- if .Capabilities.APIVersions.Has "source.toolkit.fluxcd.io/v1beta2" }}
{{- with (lookup "source.toolkit.fluxcd.io/v1beta2" "HelmRepository" "cozy-public" "").items }}
values:
kubeapps:
redis:
master:
podAnnotations:
{{- range $index, $repo := . }}
{{- with (($repo.status).artifact).revision }}
repository.cozystack.io/{{ $repo.metadata.name }}: {{ quote . }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease

View File

@@ -35,11 +35,6 @@ kubectl annotate helmrepositories.source.toolkit.fluxcd.io -A -l cozystack.io/re
# Install platform chart
make -C packages/core/platform apply
# Flush kubeapps cache
if kubectl wait --for=condition=ready -n cozy-dashboard pod/dashboard-redis-master-0 --timeout=1s; then
kubectl exec -ti -n cozy-dashboard dashboard-redis-master-0 -- sh -c 'redis-cli -a "$REDIS_PASSWORD" flushdb'
fi
# Reconcile platform chart
trap 'exit' INT TERM
while true; do