Mastering Argo CD Sync Waves: A Deep Dive into Effective GitOps Synchronization Strategies

  Рет қаралды 9,356

DevOps Toolkit

DevOps Toolkit

Күн бұрын

Discover the ultimate control for your Kubernetes GitOps deployments with Argo CD's Sync Waves, Statuses, and Dry-Run features! 🌊⚙️
#argocd #kubernetes #gitops
Consider joining the channel: / devopstoolkit
▬▬▬▬▬▬ 🔗 Additional Info 🔗 ▬▬▬▬▬▬
➡ Gist with the commands: gist.github.com/vfarcic/64a2d...
🎬 Argo CD - Applying GitOps Principles To Manage A Production Environment In Kubernetes: • Argo CD - Applying Git...
🎬 How To Apply GitOps To Everything - Combining Argo CD And Crossplane: • How To Apply GitOps To...
🎬 Crossplane - GitOps-based Infrastructure as Code through Kubernetes API: • Crossplane - GitOps-ba...
🎬 How To Shift Left Infrastructure Management Using Crossplane Compositions: • How To Shift Left Infr...
🎬 SchemaHero - Database Schema Migrations Inside Kubernetes: • SchemaHero - Database ...
🎬 Is Timoni With CUE a Helm Replacement?: • Is Timoni With CUE a H...
🎬 GitHub CLI - How to manage repositories more efficiently: • GitHub CLI (gh) - How ...
▬▬▬▬▬▬ 💰 Sponsoships 💰 ▬▬▬▬▬▬
If you are interested in sponsoring this channel, please use calendly.com/vfarcic/meet to book a timeslot that suits you, and we'll go over the details. Or feel free to contact me over Twitter or LinkedIn (see below).
▬▬▬▬▬▬ 👋 Contact me 👋 ▬▬▬▬▬▬
➡ Twitter: / vfarcic
➡ LinkedIn: / viktorfarcic
▬▬▬▬▬▬ 🚀 Other Channels 🚀 ▬▬▬▬▬▬
🎤 Podcast: www.devopsparadox.com/
💬 Live streams: / devopsparadox
▬▬▬▬▬▬ ⏱ Timecodes ⏱ ▬▬▬▬▬▬
00:00 Introduction to Argo CD dry-run, sync order, and statuses
03:26 Stateless Application With a Database
05:37 Create The Application, The Database Server, and The Schema
07:42 Argo CD Phases and Sync Waves
10:00 Argo CD Resource Statuses
12:13 Skip Argo CD Dry-Run
14:05 Resource Ordering With Argo CD

Пікірлер: 54
@DevOpsToolkit
@DevOpsToolkit 9 ай бұрын
How do you orchestrate your orchestrators? 🤔
@DennisHaney
@DennisHaney 9 ай бұрын
Add a couple of retries in your argocd application and most of these issues disappear. Then you only need it for critical things where order really matters
@DevOpsToolkit
@DevOpsToolkit 9 ай бұрын
You're right. More often than not, sync waves and LUA status scripts and not needed and dry-runs can keep being enabled. But there are cases when that's not true. Dry-run fails miserably if you have CRDs and CRs in the same app, sync waves are a must with databases, and status scripts are often necessary when working with CRs.
@DennisHaney
@DennisHaney 9 ай бұрын
@@DevOpsToolkit No? I haven't had any problems with that since we switched to ArgoCD. It's gonna fail to sync the cr, but the retries will pick it up in a few seconds usually after the crd has synced. Perhaps it is because i use micro helm Chart.yaml to specify dependency instead of directly in Application CR.
@DevOpsToolkit
@DevOpsToolkit 9 ай бұрын
Yeah. Some of those features are available in helm so you might not have experienced those issues.
@DennisHaney
@DennisHaney 9 ай бұрын
@@DevOpsToolkit Helm alone absolutely sucks with cr and crd in same chart/subcharts. But argocd dry-run+serverside apply+retry and the problem goes away since it does sync for each resource on its own is my experience.
@microst99
@microst99 9 ай бұрын
Great stuff as always ! Also: Yes, we need the schemahero replacement vid too ! PS: Whenever i see the Timoni thumbnail i read REPLAY CEMENT xD
@DevOpsToolkit
@DevOpsToolkit 9 ай бұрын
Yeah. It's not one of the best thumbnails.
@lukas-pastva
@lukas-pastva 9 ай бұрын
YEAS! Finally I was given explanation how to make the sync waves are working. I've been dealing with it for half a year. Chicken/Egg issue solved ;-)
@nzalex1
@nzalex1 4 ай бұрын
Man, you content is awesome. I am Devops engineer for years, and still find tons of very useful things in your videos. Thank you!
@IvanRizzante
@IvanRizzante 9 ай бұрын
Thanks for another great video 🎉 yes I am curious to know about the new upcoming misterious tool for the database schemas
@SiCrip09
@SiCrip09 9 ай бұрын
Interesting to see using hooks with timoni in ArgoCD which is like helm hooks 🎉
@Fayaz-Rehman
@Fayaz-Rehman 9 ай бұрын
Thank you for sharing your experience - how would you address cache memory after changing ID and Passwords in an application through ArgoCD?
@franpereyra5459
@franpereyra5459 9 ай бұрын
hey @DevOpsToolkit , thank you very much for your content. Here's a small suggestion/request for future videos: with so many new technologies coming up periodically, could you create a video or maybe a series of videos that helps Kubernetes Administrators and/or architects to choose a set of recommended toolkit and tools for creating and managing a K8S cluster from SCRATCH? This could be based on specific use cases or company/team sizes, etc. Thanks for advance!
@DevOpsToolkit
@DevOpsToolkit 9 ай бұрын
I do something like that once a year. It's not limited to kubernetes but it does end up being about kubernetes in most cases. kzbin.info/www/bejne/Y6uuiodofsSKnqc is the last one.
@hugolopes5604
@hugolopes5604 9 ай бұрын
these are edge cases... imo eventual consistency is the #1 solution. regarding the schema changes in particular, if one wanted to do them without downtime, aren't backwards compatible schema changes methodologies needed? ... and fully agree that schemahero should return a state... amazed they failed such basic stuff!
@aditya-iq8cp
@aditya-iq8cp 3 ай бұрын
firstly, thank you for the awesome tutorials. Being said that I have a question, if a resource creation during the sync wave fails, would the other resource of sync wave rollback too along with the failed resource? if not then how we can achieve this so that there isn't a version drift in between the components of application upon failed upgrade.
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
As far as I know, there is not auto rollback in that scenario. The question is whether there should be rollback (and i would say that if you want HA, the answer is no).
@aditya-iq8cp
@aditya-iq8cp 3 ай бұрын
@@DevOpsToolkit Makes sense, can you please suggest a standard way to tackle this situation since if the one component is at a different version of application, than the other components due to failure upon upgradation that would result in incompatibility in between the components. I thought of reverting back to the previous commit (healthy state) in the repository that argocd is monitoring although am not sure if that's the best solution.
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
@aditya-iq8cp it's very simple. You cannot release a new version that is not compatible with the previous one. Otherwise, it is impossible to accomplish high availability and zero downtime.
@CestMoi-rw8zx
@CestMoi-rw8zx 9 ай бұрын
I am new to GitOps, kubernetes, containers, etc and have been consuming yours and other's videos in an effort to get preview environments established for our developers. I seem to be having this very problem with ordering, but I'm using flux. Could you please cover how you would order and skip dry runs as related to flux?
@DevOpsToolkit
@DevOpsToolkit 9 ай бұрын
Adding it to my to-do list... 🙂
@CestMoi-rw8zx
@CestMoi-rw8zx 9 ай бұрын
Thank you! I am so new to this I wasn't sure whether to choose flux or argo, but I went with flux because of the bootstrapping. Always keeping argo in mind though because it is included in most vcluster mentions. When trying to envision how we might test our containers prior to merging to master, I saw your videos concerning vclusters and preview environments, and then I could finally see a path forward. Even so, finding the particulars on how to set this vcluster preview env up has me combing through the internet for details with little success so far. Any instruction you can throw this way will be greatly appreciated, I assure you. Thank you!
@DevOpsToolkit
@DevOpsToolkit 9 ай бұрын
I'll do my best to make a video on that subject.
@hugolopes5604
@hugolopes5604 9 ай бұрын
for the schema change, can't a readiness probe check if the required schema change was applied? just an idea... like that, one could deploy the app container before the schema change no?
@DevOpsToolkit
@DevOpsToolkit 9 ай бұрын
Readyness probe could and should do that but schema hero does not report the status so there nothing to hook the probe.
@hugolopes5604
@hugolopes5604 9 ай бұрын
maybe the readyness probe code would connect directly to the db or a specialized api of the app that would return the db schema or an schema compatibility value... ugly, but it would work... and if one forgot to update the probe, it would be caught some CI test. just an idea... not sure if this would be a better workaround than other options...
@DevOpsToolkit
@DevOpsToolkit 9 ай бұрын
That would work, but only if there is no better alternative (alternative tool) that would do what is expected from Kubernetes resources to do.
@geowalrus
@geowalrus 9 ай бұрын
What about orchestrating using k8s native workflow tools like argo workflows or kubevela workflows?
@DevOpsToolkit
@DevOpsToolkit 9 ай бұрын
That's a different type of orchestration. I put those into pipelines category that is useful for one-shot actions like building images and running tests, but not for those that should be continuous like drift detection and reconciliation (e.g. gitops).
@joebowbeer
@joebowbeer 9 ай бұрын
I don't think you mentioned ArgoCD's ApplicationSet in this video, but if you did, it would be worth mentioning that ApplicationSet doesn't currently obey sync waves on updates.
@DevOpsToolkit
@DevOpsToolkit 9 ай бұрын
You're right. I forgot to mention that one.
@Luther_Luffeigh
@Luther_Luffeigh 9 ай бұрын
ApplicationSet has Progressive-Sync which currently experimental feature
@cacojr5381
@cacojr5381 7 ай бұрын
Why does applicationset need syncwave? Does this refer to the update order of the app the appset renders?
@DevOpsToolkit
@DevOpsToolkit 7 ай бұрын
I don't think syncwave is mandatory@@cacojr5381 . It's there if you need it.
@cacojr5381
@cacojr5381 6 ай бұрын
Sorry for the delayed response. I may have not expressed myself accurately earlier. As I understand it, sync-wave pertains to the synchronize order of resources within an app. However, I'm not sure what applicationset's sync-wave refers to. Is there an official wiki that provides guidance on this?"@@DevOpsToolkit
@RonakKogta
@RonakKogta 7 ай бұрын
Good video! Can we do inter application ordering as well. Cause from way i understand it pre-sync and post-sync are good annotations for objects belonging to same argocd application. But i was hoping to see waves to co-ordinate one argocd application dependency on another one.
@DevOpsToolkit
@DevOpsToolkit 7 ай бұрын
If they are manifests if the same argo CD application, the answer is yes. If they are different argo CD apps, then no. They are likely not even the same commit.
@pavelpikat8950
@pavelpikat8950 9 ай бұрын
A better way of managing schema - is it Atlas? :D
@DevOpsToolkit
@DevOpsToolkit 9 ай бұрын
We'll see in 4 weeks approx 🙂
@invalidred
@invalidred 9 ай бұрын
What is the best way to manage schema k8s style? Suck a cliffhanger!
@kasvith
@kasvith 7 ай бұрын
for somehow if a deployment failed, would previous version be deployed? so users can access it anyways
@DevOpsToolkit
@DevOpsToolkit 7 ай бұрын
Assuming that you're using the default rollout strategy in a Deployment, changing a Deployment creates a new ReplicaSet and starts the process by creating a new Pod, waiting until it is healthy, then shutting down the old Pod, and so on. So, as long as you have healthchecks, it should be fine. As a side note, that is completely unrelated to Argo CD.
@kasvith
@kasvith 7 ай бұрын
@@DevOpsToolkit thanks
@kasvith
@kasvith 7 ай бұрын
@@DevOpsToolkit for example let's say a PreSyncHook failed, it runs the db migrations(usually application ships migration schema with tools to deploy it[like knex in js world]). In platforms like Heroku, Dokku when this happens whole release rollout and previous app keeps working until the new version fixes issue and pass release phase. how can we achive something like this in argo
@DevOpsToolkit
@DevOpsToolkit 7 ай бұрын
Now I (think I) understand what you mean. You're asking what happens if you're applying multiple workloads, and one of them fails. Is that correct? If that's the case, Argo CD will move to the next sync wave only if the workloads in the previous one were successful. So, if the first wave is a change to the DB schema and that fails, the second with, let's say, the application will not be applied. Now, if you have 3 waves, and the second one fails (by fail, I mean that the health checks failed), then the 3rd will not be applied, but the 1st will stay as it is (with whatever was applied to the first wave).
@DevOpsToolkit
@DevOpsToolkit 7 ай бұрын
That you have more than two waves, and the last scenario is unacceptable, all you have to do is revert the commit or re-commit it.
@julianomoraisbarbosa
@julianomoraisbarbosa 9 ай бұрын
# til
Should We Run Databases In Kubernetes? CloudNativePG (CNPG) PostgreSQL
19:10
小路飞姐姐居然让路飞小路飞都消失了#海贼王  #路飞
00:47
路飞与唐舞桐
Рет қаралды 93 МЛН
1❤️
00:20
すしらーめん《りく》
Рет қаралды 29 МЛН
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 91 МЛН
How To Create A Complete Internal Developer Platform (IDP)?
27:01
DevOps Toolkit
Рет қаралды 31 М.
Stop Using VPNs! Peer-to-Peer Zero-Trust Communication With Twingate
22:52
Kubernetes Testing Techniques with KUTTL
24:40
DevOps Toolkit
Рет қаралды 8 М.
Is Timoni With CUE a Helm Replacement?
18:01
DevOps Toolkit
Рет қаралды 10 М.
Secrets Made My Life Miserable - Consume Secrets Easily With Teller
13:48
AI for Kubernetes with ChatGPT and k8sgpt
23:32
DevOps Toolkit
Рет қаралды 18 М.
Kubernetes-Native Observability Through eBPF And Scripting With Pixie
23:44
Выложил СВОЙ АЙФОН НА АВИТО #shorts
0:42
Дмитрий Левандовский
Рет қаралды 667 М.
👎Главный МИНУС планшета Apple🍏
0:29
Demin's Lounge
Рет қаралды 430 М.
Полный обзор iPad Pro M4 - хвалю!
26:27
Rozetked
Рет қаралды 243 М.
😱НОУТБУК СОСЕДКИ😱
0:30
OMG DEN
Рет қаралды 2,2 МЛН
Introducing GPT-4o
26:13
OpenAI
Рет қаралды 4,4 МЛН
Apple, как вас уделал Тюменский бренд CaseGuru? Конец удивил #caseguru #кейсгуру #наушники
0:54
CaseGuru / Наушники / Пылесосы / Смарт-часы /
Рет қаралды 4,3 МЛН