Auto-sync: 2026-04-16 17:30
This commit is contained in:
@@ -1,36 +1,21 @@
|
||||
---
|
||||
title: GitOps
|
||||
title: "GitOps"
|
||||
type: concept
|
||||
tags: [GitOps, DevOps, 基础设施, 声明式]
|
||||
sources: ["sources/DevOps-Culture-and-Transformation.md"]
|
||||
last_updated: 2026-04-15
|
||||
tags: [DevOps, Git, 基础设施, 部署]
|
||||
sources: [DevOps-Culture-and-Transformation.md]
|
||||
last_updated: 2025-03-02
|
||||
---
|
||||
|
||||
## 定义
|
||||
GitOps 是一种以 Git 为单一真实源(Single Source of Truth)来管理基础设施和应用配置的方法论,所有变更通过 Pull Request 驱动,实现声明式基础设施管理。
|
||||
## Definition
|
||||
GitOps 是一种使用 Git 作为单一真相源(Single Source of Truth)来管理基础设施和部署的文化理念和运维框架,所有配置和部署声明都存储在 Git 仓库中。
|
||||
|
||||
## 核心原则
|
||||
- **声明式配置**:以代码形式声明期望状态
|
||||
- **Git 单一真实源**:所有配置存储在 Git 仓库中
|
||||
- **自动同步**:系统自动检测并纠正与期望状态的偏差
|
||||
- **变更可追溯**:所有变更通过 Pull Request 记录和审查
|
||||
## Key Principles(关键原则)
|
||||
- 声明式基础设施
|
||||
- Git 作为单一真相源
|
||||
- 自动同步和部署
|
||||
- 可审计和可回滚
|
||||
|
||||
## 关键工具
|
||||
- [[GitHub]] Actions + Flux 或 Argo CD:GitOps 核心引擎
|
||||
- [[Kubernetes]]:GitOps 的典型承载平台
|
||||
- Weave GitOps:GitOps 实现工具
|
||||
- Argo CD:Kubernetes 专用 GitOps 工具
|
||||
|
||||
## 在 DevOps 中的角色
|
||||
- GitOps 是 [[DevOps]] 自动化的演进方向
|
||||
- 与 [[CI/CD Pipelines]] 互补:CI/CD 关注应用交付,GitOps 关注基础设施和应用配置的声明式管理
|
||||
- 天然支撑 [[Infrastructure as Code]] 实践
|
||||
|
||||
## 优势
|
||||
- 提高变更可追溯性和安全性
|
||||
- 简化回滚操作(git revert)
|
||||
- 提升部署一致性
|
||||
- 降低人为错误
|
||||
|
||||
## Aliases
|
||||
- GitOps
|
||||
## Related Concepts
|
||||
- [[DevOps 文化]]
|
||||
- [[Infrastructure as Code (IaC)]]
|
||||
- [[CI/CD 流水线]]
|
||||
|
||||
Reference in New Issue
Block a user