Comments (4)
Hi @vitobotta - interesting question. Are these cron jobs configured at the OS level or are they kubernetes CronJob resources? If they're the latter, you can use the new blocking reboots via pods feature in kured 1.2.0. If it's the former, I'm not sure what will happen to be honest - kured just runs systemctl reboot
, so unless that happens to interact gracefully with running cron jobs and lets them run to completion, they'll probably just get terminated.
from kured.
Hi @awh , I was referring to Kubernetes cron jobs since I prefer not doing anything outside K8S if I am using K8S for my apps. I checked that page but there would be a problem with the name of the pods used by cron jobs because they change. For example when MySQL jobs are running the jobs are named something like mysql-cluster-auto<timestamp>-backup
. Any ideas of how to handle this? Thanks!
from kured.
@vitobotta great, that makes things much simpler. You can specify additional labels on the pods created by CronJob
resources - you have to get them in the right place though:
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: backup-cronjob
spec: # CronJobSpec
jobTemplate: #JobTemplateSpec
spec: #JobSpec
template: # PodTemplateSpec
metadata:
labels:
block-reboots: true
spec:
...
then add
--blocking-pod-selector=block-reboots=true
to your kured configuration.
from kured.
I will have to check if I can change the specs of the cron jobs but it seems a little complicated because they are created by the MySQL operator. I was actually mistaken in that they are not exactly cron jobs in Kubernetes terms, they are one-time jobs created by a separate scheduler which is in the operator, or at least I think it works this way more or less. I will have to investigate. Thanks for pointing me to the blocking option, I'm closing this one for now. :)
from kured.
Related Issues (20)
- Kured Helm hostNetwork problem HOT 2
- stderr/stdout of custom reboot command HOT 1
- Team Kured is looking for help! HOT 1
- [Feature request] Use cloud APIs to increase node pool size before reboots and decrease after HOT 6
- [Bug] The new dockerhub yaml is broken, ServiceAccount is declared twice HOT 2
- Add Support for Kubernetes 1.28.0
- Unable to receive teams notification. We have the http_proxy as environment variable in kured pod HOT 4
- HashiCorp license change to BSL HOT 2
- Lock TTL not being honored HOT 5
- Build fails on aarch64
- Kured pods crash looping on clusters running Cilium Network plugin HOT 2
- Kured pods are not deployed to all nodes having taints on it in AKS ckuster HOT 3
- KURED supportability of the 6.2 kernel version HOT 2
- kured cordon node before checking if just 1 up HOT 8
- [DOC] Make Control Plane use kured
- AKS Node not rebooted with lock held for not existing node HOT 11
- If a sentinel command is configured, it runs every minute. HOT 8
- path-based reboot mechanism HOT 5
- Reboot delay between two nodes HOT 4
- Retry reboot when the node is NotReady and still has SchedulingDisabled after the first reboot HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kured.