Automate Suspending Kubernetes Cron Jobs with find and sed
HTML-код
- Опубликовано: 7 июл 2024
- Treat yourself by automating the mundane tasks in your life with command line tools and scripts.
Hit the subscribe button to receive more videos like this!
REFERENCE LINKS
---------------------------------------------------
► nickjanetakis.com/blog/automa...
► github.com/kubernetes-sigs/ku...
► github.com/argoproj/argo-cd
COURSES
---------------------------------------------------
Courses I've created that focus on web dev and deployment topics.
► nickjanetakis.com/courses/
THE TOOLS I USE / GEAR
---------------------------------------------------
► nickjanetakis.com/blog/the-to...
FOLLOW ME ELSEWHERE
---------------------------------------------------
► Twitter: / nickjanetakis
► GitHub: github.com/nickjj
TIMESTAMPS
---------------------------------------------------
0:00 -- Intro
0:18 -- Looking at a Kubernetes cron job config
1:05 -- This could be useful for temporary maintenance
2:07 -- Demoing the disable and enable run script functions
2:52 -- Going over the disable and enable functions
3:21 -- Using Kustomize and Argo CD to stick with the GitOps philosophy
3:50 -- Back to the disable and enable functions
5:55 -- Was it worth it? Yes, now the intent is clear that we do this
I also often use replacement via perl istead of sed because of escaping nightmare
I'd use yq instead of perl + sed - one command. Not everybody knows perl. In fact, I don't know sys admins knowing it.
In this case you end up running an identical regex to what you'd use with sed. I don't really know Perl either. The thing that bugs me about yq is the Go version of it messes with the formatting of the file.