Skip to content

Commit 8581474

Browse files
committed
cleanup, use goldilocks
1 parent 94759a1 commit 8581474

6 files changed

Lines changed: 6 additions & 126 deletions

File tree

docs/vpa-resource-optimization.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ MEM:.status.recommendation.containerRecommendations[0].target.memory
6262
|------|-------------|----------|
6363
| **metrics-server** | Provides `metrics.k8s.io` API (CPU/memory data from kubelet) | `infrastructure/controllers/metrics-server/` |
6464
| **VPA** (Vertical Pod Autoscaler) | Analyzes metrics, generates resource recommendations | `infrastructure/controllers/vertical-pod-autoscaler/` |
65-
| **Kyverno Policy** (`vpa-auto-create`) | Auto-generates a VPA resource for every Deployment and StatefulSet | `infrastructure/controllers/kyverno/policies/vpa-auto-create.yaml` |
66-
| **Goldilocks** | Web dashboard to visualize VPA recommendations per namespace | `infrastructure/controllers/goldilocks/` |
65+
| **Goldilocks** | Auto-creates VPA resources for all workloads AND provides web dashboard to visualize recommendations | `infrastructure/controllers/goldilocks/` |
6766

6867
### How They Fit Together
6968

@@ -77,7 +76,7 @@ metrics-server (provides metrics.k8s.io API)
7776
VPA Recommender (reads metrics, writes recommendations to VPA status)
7877
^
7978
|
80-
Kyverno generate policy (auto-creates VPA for every Deployment/StatefulSet)
79+
Goldilocks Controller (on-by-default: true, auto-creates VPA for all workloads)
8180
|
8281
v
8382
VPA resources (one per workload, updateMode: "Off")
@@ -89,7 +88,7 @@ Goldilocks Dashboard (reads VPA recommendations, shows per-namespace view)
8988
Human reviews → updates values.yaml → Git push → ArgoCD applies
9089
```
9190

92-
**Key point**: Kyverno creates VPAs for ALL workloads automatically. Goldilocks also creates VPAs for namespaces it scans, but since `on-by-default: "true"` is set, both cover all namespaces. Duplicate VPAs are harmless — they share the same name and Kyverno's `synchronize: true` keeps them in sync.
91+
**Key point**: Goldilocks with `on-by-default: "true"` auto-creates VPA resources for all Deployments, StatefulSets, and DaemonSets cluster-wide. No Kyverno policy or manual VPA resources needed.
9392

9493
## Accessing the Dashboard
9594

@@ -260,10 +259,7 @@ See `infrastructure/controllers/argocd/values.yaml` for the actual implementatio
260259
261260
## Excluded Namespaces
262261
263-
The Kyverno `vpa-auto-create` policy excludes:
264-
- `kube-system` — critical system components, don't touch
265-
- `kyverno` — policy engine, restart = cluster-wide impact
266-
- `vertical-pod-autoscaler` — VPA managing itself creates feedback loops
262+
Goldilocks can be configured to exclude namespaces via the `goldilocks.fairwinds.com/enabled=false` label. By default with `on-by-default: "true"`, all namespaces are included.
267263
268264
## K8s 1.35: In-Place Pod Resize (Future)
269265
@@ -291,7 +287,7 @@ spec:
291287
### Goldilocks dashboard is empty
292288
- Check if Goldilocks controller is running: `kubectl get pods -n goldilocks`
293289
- Goldilocks is set to `on-by-default: "true"` — all namespaces should appear
294-
- VPA resources must exist (Kyverno creates them on Deployment/StatefulSet CREATE/UPDATE)
290+
- VPA resources are created by Goldilocks automatically for all workloads
295291

296292
### VPA recommendations seem too high/low
297293
- Not enough data — wait 7-14 days
@@ -329,7 +325,6 @@ kubectl get vpa <name> -n <ns> -o jsonpath='{.status.recommendation.containerRec
329325

330326
- [Monitoring README](../monitoring/README.md) — metrics-server vs Prometheus pipelines
331327
- [VPA component README](../infrastructure/controllers/vertical-pod-autoscaler/README.md)
332-
- [Kyverno VPA policy](../infrastructure/controllers/kyverno/policies/vpa-auto-create.yaml)
333328
- [Goldilocks config](../infrastructure/controllers/goldilocks/)
334329

335330
---

infrastructure/controllers/argocd/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ resources:
88
# By including it here, the ArgoCD installation will immediately start managing
99
# the rest of the applications in the repository.
1010
- root.yaml
11-
- vpa.yaml
1211
helmCharts:
1312
- name: argo-cd
1413
repo: https://argoproj.github.io/argo-helm

infrastructure/controllers/argocd/vpa.yaml

Lines changed: 0 additions & 38 deletions
This file was deleted.

infrastructure/controllers/kyverno/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ resources:
77
- policies/volsync-pvc-backup-restore.yaml
88
- policies/volsync-nfs-inject.yaml
99
- policies/volsync-orphan-cleanup.yaml
10-
- policies/vpa-auto-create.yaml
1110
helmCharts:
1211
- name: kyverno
1312
repo: https://kyverno.github.io/kyverno

infrastructure/controllers/kyverno/policies/vpa-auto-create.yaml

Lines changed: 0 additions & 75 deletions
This file was deleted.

infrastructure/controllers/vertical-pod-autoscaler/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Recommendations include four values per container:
3939
## Dependencies
4040

4141
- **metrics-server** (`infrastructure/controllers/metrics-server/`) — provides the `metrics.k8s.io` API that VPA reads from
42-
- **Kyverno** — auto-generates VPA resources via `vpa-auto-create` ClusterPolicy
42+
- **Goldilocks** (`infrastructure/controllers/goldilocks/`) — auto-creates VPA resources for all workloads and provides dashboard UI
4343

4444
## Notes
4545

0 commit comments

Comments
 (0)