Compare commits

...

7 Commits

Author SHA1 Message Date
hysyeah
d13d233076 fix: add max retry for delete action (#2425) 2026-01-19 19:53:37 +08:00
hys
654918c682 fix: add max retry for delete action 2026-01-19 19:49:37 +08:00
eball
a3032638e5 Merge branch 'main' into module-tapr
* main: (97 commits)
  system fronted, market backend, chart repo: add suspend app function (#2329)
  fix: files sync reconnection (#2327)
  fix(daemon): update module appservice dependency to fix security issues (#2326)
  fix(cli): update module appservice dependency to fix security issues (#2325)
  chore(deps): bump github.com/open-policy-agent/opa from 0.18.0 to 1.4.0 in /infrastructure/kubesphere (#2324)
  chore(deps): bump github.com/docker/docker from 20.10.7+incompatible to 25.0.13+incompatible in /infrastructure/kubesphere (#2323)
  chore: keep three days log (#2319)
  fix(olares-app): fix some secret warning (#2320)
  chore(deps): bump github.com/emicklei/go-restful from 2.14.3+incompatible to 2.16.0+incompatible in /infrastructure/kubesphere (#2322)
  chore(deps): bump golang.org/x/crypto from 0.0.0-20210817164053-32db794688a5 to 0.45.0 in /framework/kube-state-metrics (#2321)
  fix(appservice): update depedencies to fix some vulnerabilities (#2314)
  feat: use poppler-utils and catdoc (#2318)
  feat(olares-app): update olares-app version to v1.6.31 (#2317)
  fix(cli): handle invalid modprobe sys conf when upgrading GPU driver (#2316)
  infisical: secret limit up to 1000 per minute (#2315)
  opa: enhance image trust validation by trimming docker.io prefix (#2308)
  chore(deps): bump github.com/gofiber/fiber/v2 from 2.49.2 to 2.52.9 in /platform/tapr (#2309)
  feat(wizard): remove the option to select an FRP node when activating a sub-account. (#2305)
  feat(bfl): reuse owner's proxy config when activating sub-accounts (#2302)
  opa: add trusted image for kldtks image repo (#2301)
  ...
2025-12-26 15:41:17 +08:00
eball
3e1efb19bd tapr: change kvrocks running as root by default 2025-12-26 15:34:05 +08:00
eball
8b51b85cb9 fix(kvrocks): update init container image and pull policy configuration (#2331) 2025-12-26 15:25:50 +08:00
eball
1481178b48 tapr: upgrade pod template and image for PGCluster reconciliation 2025-12-11 21:01:35 +08:00
eball
71ffa42faa tapr: upgrade pod template and image for PGCluster reconciliation (#2213)
* tapr: upgrade pod template and image for PGCluster reconciliation

* fix(ci): specify working directory in github action for tapr (#2215)

---------

Co-authored-by: dkeven <82354774+dkeven@users.noreply.github.com>
2025-12-11 20:47:04 +08:00
7 changed files with 34 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ target: prebuilt
output:
containers:
-
name: beclab/kvrocks:0.1.1
name: beclab/kvrocks:0.1.2

View File

@@ -57,7 +57,7 @@ spec:
path: '{{ $dbbackup_rootpath }}/pg_backup'
containers:
- name: operator-api
image: beclab/middleware-operator:0.2.29
image: beclab/middleware-operator:0.2.30
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9080

View File

@@ -64,7 +64,7 @@ spec:
kvrocks:
owner: system
backupStorage: '{{ $redix_backuppath }}/kvrocks_backup'
image: beclab/kvrocks:0.1.1
image: beclab/kvrocks:0.1.2
imagePullPolicy: IfNotPresent
password:
valueFrom:

View File

@@ -198,6 +198,9 @@ func (c *controller) processNextWorkItem() bool {
return nil
}
deleteRetryCount := 0
const maxDeleteRetries = 10
// Run the syncHandler, passing it the namespace/name string of the
// Foo resource to be synced.
for e := c.syncHandler(eobj); e != nil; e = c.syncHandler(eobj) {
@@ -208,6 +211,12 @@ func (c *controller) processNextWorkItem() bool {
return fmt.Errorf("error syncing '%v': %s, requeuing", eobj, e.Error())
}
deleteRetryCount++
if deleteRetryCount >= maxDeleteRetries {
klog.Errorf("error syncing '%v': %s, reached max delete retries, skipping", eobj, e.Error())
break
}
// cause delete action cannot be requeued at the end,
klog.Errorf("error syncing '%v': %s, retry after 1 second", eobj, e.Error())
time.Sleep(time.Second)
@@ -216,6 +225,12 @@ func (c *controller) processNextWorkItem() bool {
// Finally, if no error occurs we Forget this item so it does not
// get queued again until another change happens.
c.workqueue.Forget(obj)
if deleteRetryCount >= maxDeleteRetries {
klog.Warningf("Skipped syncing '%v' after %d delete retries", eobj, deleteRetryCount)
return nil
}
klog.Infof("Successfully synced '%v'", eobj)
return nil
}(obj)

View File

@@ -64,6 +64,19 @@ func GetKVRocksDefineByUser(ctx context.Context, client *kubernetes.Clientset,
sts.Namespace = namespace
sts.Name = kvrocksDef.Name
for i, c := range sts.Spec.Template.Spec.InitContainers {
if c.Name == "init-kvrocks-cfg" {
ptrC := &sts.Spec.Template.Spec.InitContainers[i]
if kvrocksDef.Spec.KVRocks.Image != "" {
ptrC.Image = kvrocksDef.Spec.KVRocks.Image
}
if kvrocksDef.Spec.KVRocks.ImagePullPolicy != "" {
ptrC.ImagePullPolicy = kvrocksDef.Spec.KVRocks.ImagePullPolicy
}
}
}
for i, c := range sts.Spec.Template.Spec.Containers {
if c.Name == "kvrocks" {
ptrC := &sts.Spec.Template.Spec.Containers[i]

View File

@@ -12,7 +12,7 @@ import (
const (
DefaultKVRocksName = "kvrocks"
DefaultKVRocksImage = "beclab/kvrocks:0.1.1"
DefaultKVRocksImage = "beclab/kvrocks:0.1.2"
KVRocksVolumeName = "kvrdata"
KVRocksBackupVolumeName = "kvrbackup"
KVRocksBackupDir = "/backup"

View File

@@ -37,8 +37,8 @@ func RequireHeader() func(c *fiber.Ctx) error {
klog.Infof("ws-client conn: %s, accessPublic: %v, token: %s, user: %s , header: %+v", connId, accessPublic, token, userName, headers)
var secWebsocketProtocol, ok = headers[constants.WsHeaderSecWebsocketProtocol]
if ok {
c.Set(constants.WsHeaderSecWebsocketProtocol, secWebsocketProtocol)
if ok && len(secWebsocketProtocol) > 0 {
c.Set(constants.WsHeaderSecWebsocketProtocol, secWebsocketProtocol[0])
}
c.Locals(constants.WsLocalAccessPublic, accessPublic)