maidn-cli/internal/assets/templates/manifests.md.tmpl

45 lines
2.2 KiB
Cheetah

# %s
## Overview
This repository serves as the centralized source for all Kubernetes deployment manifests. It is managed by Flux CD, adhering to GitOps principles to ensure that the state of the Kubernetes clusters reflects the configuration defined here.
## Repository Structure
The repository is organized to support multiple environments and to provide a clear separation of concerns.
```
.
├── apps/
│ ├── previews/ # Manifests for dynamic preview environments
│ ├── staging/ # Manifests for the staging environment
│ └── production/ # Manifests for the production environment
├── namespaces/ # Core Kubernetes namespace definitions
│ ├── staging.yaml
│ ├── production.yaml
│ └── kustomization.yaml
└── README.md
```
### Key Directories
* **/namespaces**: Contains the YAML definitions for Kubernetes namespaces used across all environments. This ensures that foundational resources are managed consistently.
* **/apps**: Holds the application-specific deployment manifests, categorized by environment.
## Environment Management
- **Production**: The live environment serving end-users. Changes to this directory directly impact production services.
- **Staging**: A pre-production environment that mirrors production. It is used for final testing and validation before deploying changes to production.
- **Previews**: A dynamic environment for deploying feature branches or pull requests. These are short-lived and used for testing and review purposes.
## Deployment Workflow
Changes are deployed automatically by Flux CD, which continuously monitors this repository. The standard workflow is as follows:
1. **Commit Manifests**: A developer or an automated process commits new or updated Kubernetes manifests to the appropriate directory (e.g., `apps/staging`).
2. **Push to `main`**: The changes are pushed to the `main` branch.
3. **Flux Synchronization**: Flux detects the changes in the repository.
4. **Cluster Reconciliation**: Flux applies the manifest changes to the corresponding Kubernetes cluster, ensuring the cluster's state matches the repository's configuration.
---
*This repository is automatically generated and managed by internal CI/CD tooling.*