如何仅运行一次CouchbaseBackupRestore

huangapple go评论89阅读模式
英文:

How to run CouchbaseBackupRestore only once

问题

我定义了一个用于我的Kubernetes集群的CouchbaseBackupRestore资源。通过Flux和Kustomize(GitOps)进行管理。
恢复操作进行得很顺利。但在完成后它会启动另一个恢复操作。
我希望它只运行一次。
是否可以告诉Kubernetes在第一个成功后不重新创建Pod?

当任务成功时,我必须注释掉我的Kustomize文件中的CouchbaseBackupRestore资源。
但这不是生产中可行的选项。
BackoffLimit也不是一个解决方案,因为如果失败,我希望它重试。

感谢您的帮助。

英文:

I define a CoucbaseBackupRestore resource for my kubernetes cluster. Managed with flux and kustomize (gitops)
The restore goes well. But when it is finished it starts another restore.
I want it to run only once.
Is it possible to tell kubernetes to not recreate a pod when the first one succeeds?

I have to comment out my CouchbaseBackupRestore resource in my kustomize file when the job succeeds.
But this is not a viable option for production.
BackoffLimit is not a solution either, as I want it to retry if it fails.

Thanks for tour help

答案1

得分: 1

目前,操作员将对成功还原的作业进行垃圾回收。期望的行为是仅在需要还原作业时应用还原YAML。

这会在这样的工作流中导致重复创建;但是,我们已经开了一张跟踪此请求的工单!https://issues.couchbase.com/browse/K8S-3121

英文:

Currently, the Operator will garbage collect successful restore jobs. The expected behaviour is that the restore yaml would only be applied when a restore job is required.

This causes repeat creation in workflows like this; however, we've opened a ticket to track this request! https://issues.couchbase.com/browse/K8S-3121

huangapple
  • 本文由 发表于 2023年3月7日 03:30:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/75655054.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定