30 lines
874 B
Markdown
30 lines
874 B
Markdown
---
|
||
title: "Declarative Configuration"
|
||
type: concept
|
||
tags: [DevOps, GitOps, 配置管理]
|
||
sources: [ctp-topic-33-an-introduction-to-gitops.md]
|
||
last_updated: 2026-04-19
|
||
---
|
||
|
||
## Definition
|
||
Declarative Configuration(声明式配置)是一种配置管理方法,通过描述系统的期望状态(what)而非具体步骤(how)来定义基础设施和应用配置。
|
||
|
||
## Key Characteristics
|
||
- 定义期望的结果状态,而非实现步骤
|
||
- 工具负责计算如何达到期望状态
|
||
- 幂等性:多次应用产生相同结果
|
||
- 易于理解和版本控制
|
||
|
||
## Examples
|
||
- Kubernetes YAML 配置
|
||
- Terraform HCL 配置
|
||
- Docker Compose 配置
|
||
- Ansible Playbook
|
||
|
||
## Related Concepts
|
||
- [[Infrastructure as Code (IaC)]]
|
||
- [[GitOps]]
|
||
- [[Idempotent Operation]](幂等操作)
|
||
|
||
## Related Sources
|
||
- [[ctp-topic-33-an-introduction-to-gitops]] — GitOps 入门介绍 |