Files
nexus/wiki/concepts/GitOps.md
2026-04-15 08:15:46 +08:00

37 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: GitOps
type: concept
tags: [GitOps, DevOps, 基础设施, 声明式]
sources: ["sources/DevOps-Culture-and-Transformation.md"]
last_updated: 2026-04-15
---
## 定义
GitOps 是一种以 Git 为单一真实源Single Source of Truth来管理基础设施和应用配置的方法论所有变更通过 Pull Request 驱动,实现声明式基础设施管理。
## 核心原则
- **声明式配置**:以代码形式声明期望状态
- **Git 单一真实源**:所有配置存储在 Git 仓库中
- **自动同步**:系统自动检测并纠正与期望状态的偏差
- **变更可追溯**:所有变更通过 Pull Request 记录和审查
## 关键工具
- [[GitHub]] Actions + Flux 或 Argo CDGitOps 核心引擎
- [[Kubernetes]]GitOps 的典型承载平台
- Weave GitOpsGitOps 实现工具
- Argo CDKubernetes 专用 GitOps 工具
## 在 DevOps 中的角色
- GitOps 是 [[DevOps]] 自动化的演进方向
- 与 [[CI/CD Pipelines]] 互补CI/CD 关注应用交付GitOps 关注基础设施和应用配置的声明式管理
- 天然支撑 [[Infrastructure as Code]] 实践
## 优势
- 提高变更可追溯性和安全性
- 简化回滚操作git revert
- 提升部署一致性
- 降低人为错误
## Aliases
- GitOps