FEAT(goldilocks): add vpa and goldilocks
- for resource optimization - Add VPA (Vertical Pod Autoscaler) for automatic resource recommendation - Add Goldilocks dashboard for visualizing VPA recommendations - Update kustomization.yaml to include both applications
This commit is contained in:
46
vpa/argocd/vpa.yaml
Normal file
46
vpa/argocd/vpa.yaml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: vpa
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
|
||||||
|
sources:
|
||||||
|
# Helm chart from external repository
|
||||||
|
- repoURL: https://charts.fairwinds.com/stable
|
||||||
|
chart: vpa
|
||||||
|
targetRevision: 4.6.0
|
||||||
|
helm:
|
||||||
|
valueFiles:
|
||||||
|
- $values/vpa/helm-values/vpa.yaml
|
||||||
|
# Values file from Git repository
|
||||||
|
- repoURL: https://gitea0213.kro.kr/bluemayne/cluster-infrastructure.git
|
||||||
|
targetRevision: main
|
||||||
|
ref: values
|
||||||
|
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: vpa
|
||||||
|
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
allowEmpty: false
|
||||||
|
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
- PrunePropagationPolicy=foreground
|
||||||
|
- PruneLast=true
|
||||||
|
|
||||||
|
retry:
|
||||||
|
limit: 5
|
||||||
|
backoff:
|
||||||
|
duration: 5s
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 3m
|
||||||
|
|
||||||
|
revisionHistoryLimit: 10
|
||||||
47
vpa/helm-values/vpa.yaml
Normal file
47
vpa/helm-values/vpa.yaml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
# VPA Helm Values
|
||||||
|
# Reference: https://github.com/FairwindsOps/charts/tree/master/stable/vpa
|
||||||
|
|
||||||
|
# Recommender - recommends resource requests based on historical usage
|
||||||
|
recommender:
|
||||||
|
enabled: true
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: null
|
||||||
|
memory: 1Gi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 512Mi
|
||||||
|
|
||||||
|
# Updater - applies recommended resource requests to pods
|
||||||
|
updater:
|
||||||
|
enabled: true
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: null
|
||||||
|
memory: 1Gi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 512Mi
|
||||||
|
|
||||||
|
# Admission Controller - injects resource requests into new pods
|
||||||
|
admissionController:
|
||||||
|
enabled: true
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: null
|
||||||
|
memory: 512Mi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 256Mi
|
||||||
|
|
||||||
|
# Generate self-signed certificate
|
||||||
|
generateCertificate: true
|
||||||
|
|
||||||
|
# Optional: Configure default VPA behavior
|
||||||
|
# metrics-server should be installed in the cluster
|
||||||
6
vpa/kustomization.yaml
Normal file
6
vpa/kustomization.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
# ArgoCD Application 리소스는 infrastructure/kustomization.yaml에서 관리
|
||||||
|
# - argocd/vpa.yaml
|
||||||
Reference in New Issue
Block a user