Added some fluxcd notes
All checks were successful
Publish new notes / build-quartz (push) Successful in 1m0s
Publish new notes / deploy (push) Successful in 7s

This commit is contained in:
V 2025-12-17 19:00:12 +00:00
parent bde604e75b
commit 9a4f1a87de

42
vlads-notes/FluxCD/---.md Normal file
View File

@ -0,0 +1,42 @@
---
title: FluxCD notes
tags:
- cicd
- fluxcd
- k8s
- learning-notes
date: 2025-12-17
---
## Testing Kustomization rendering before pushing changes
This got me so many times... making some changes to the manifests and pushing them without a worry only to then see error when checking the Kustomization status!
Anyway, the "kubectl" client can render any Kustomization and alert you of any YAML shenanigans or if any dependencies are missing in advance. In a repo directory with this structure:
```
.
├── base
│ ├── dashboards
│ │ ├── cluster.json
│ │ └── control-plane.json
│ ├── kustomization.yaml
│ └── podmonitor.yaml
├── dev
│ └── kustomization.yaml
└── prod
└── kustomization.yaml
```
, you can run from the root of the directory:
```
kubectl kustomize ./prod
# Or
kubectl kustomize ./dev
```
Which will render the manifests to stdout. In my case, the "base/dashboards" directory was misspelled (it was "dashboard") which led to the FluxCD Kustomization failing.
Ideally these changes would go via a feature branch and they'd be validated in CICD, but for now this will do.