發表於 程式分享

GitOps概念說明

有幾個潛在的issue,GitOps有其應對方式
1.手動佈署很難追蹤問題 => kubernets可用yaml檔放入Git維護
2.pipeline由GUI設定很方便,但運行的真正狀態很難由GUI全部觀察到
3.權限控管也是一難題

GitOps概念說明如下

一.GitOps三大核心概念

  • Audited (稽核性) change managment of source code: 誰在何時做什麼變動均可被查到
  • Declarative (宣告式) data definition of systems: 如kubernetes 的yaml佈署檔
  • Control loop Configuaration managment of systems: 讓當前狀態符合預期狀態

二.GitOps四大原則

  • The entire system described declaratively (宣告式)
  • The canonial (典範) desired system state versioned in GitOps: 系統狀態的各版本變動也會保存在Git內供追蹤
  • Approved changes that can be automatically applied to the system: 認可的改變可自動佈署至系統內
  • Software agents to ensure correctness & alert an divergence: 軟體代理可確保正確性及警告、提示不一致性

三.GitOps主要流程說明

  • Git Repository分為兩部份
    • 程式原始碼 => 放Application Repo
    • 設定檔 => 放Config Repo
  • Git版本已不用latest而用commit hash tag取代
  • 以下架構只是概念性的描述,實際依應用情境會有所調整

參考網址: https://openpracticelibrary.com/practice/gitops/

發表留言