PERF(repo): add PriorityClasses for workloads
- Create high-priority (1000) for critical infra - Create medium-priority (500) for observability - Create low-priority (100) as global default
This commit is contained in:
@@ -6,6 +6,7 @@ resources:
|
|||||||
- application.yaml
|
- application.yaml
|
||||||
|
|
||||||
# Core infrastructure
|
# Core infrastructure
|
||||||
|
- priority-classes/argocd.yaml
|
||||||
- cert-manager/argocd.yaml
|
- cert-manager/argocd.yaml
|
||||||
- traefik/argocd.yaml
|
- traefik/argocd.yaml
|
||||||
- argocd-image-updater/argocd.yaml
|
- argocd-image-updater/argocd.yaml
|
||||||
|
|||||||
17
priority-classes/argocd.yaml
Normal file
17
priority-classes/argocd.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: priority-classes
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: https://github.com/Mayne0213/platform.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: priority-classes/manifests
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
5
priority-classes/manifests/kustomization.yaml
Normal file
5
priority-classes/manifests/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- priority-classes.yaml
|
||||||
28
priority-classes/manifests/priority-classes.yaml
Normal file
28
priority-classes/manifests/priority-classes.yaml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# High Priority (1000) - Critical infrastructure
|
||||||
|
# ArgoCD, Gitea, CNPG, Vault, MinIO
|
||||||
|
apiVersion: scheduling.k8s.io/v1
|
||||||
|
kind: PriorityClass
|
||||||
|
metadata:
|
||||||
|
name: high-priority
|
||||||
|
value: 1000
|
||||||
|
globalDefault: false
|
||||||
|
description: "High priority for critical infrastructure"
|
||||||
|
---
|
||||||
|
# Medium Priority (500) - Observability stack
|
||||||
|
# Thanos, Prometheus, Loki, Tempo
|
||||||
|
apiVersion: scheduling.k8s.io/v1
|
||||||
|
kind: PriorityClass
|
||||||
|
metadata:
|
||||||
|
name: medium-priority
|
||||||
|
value: 500
|
||||||
|
globalDefault: false
|
||||||
|
description: "Medium priority for observability stack"
|
||||||
|
---
|
||||||
|
# Low Priority (100) - Everything else
|
||||||
|
apiVersion: scheduling.k8s.io/v1
|
||||||
|
kind: PriorityClass
|
||||||
|
metadata:
|
||||||
|
name: low-priority
|
||||||
|
value: 100
|
||||||
|
globalDefault: true
|
||||||
|
description: "Low priority for all other applications"
|
||||||
Reference in New Issue
Block a user