Added some fluxcd notes
This commit is contained in:
parent
bde604e75b
commit
9a4f1a87de
42
vlads-notes/FluxCD/---.md
Normal file
42
vlads-notes/FluxCD/---.md
Normal 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.
|
||||
Loading…
Reference in New Issue
Block a user