Update K8S to include an auto generator of values template

This commit is contained in:
mr
2025-11-12 13:13:43 +01:00
parent 7ad4bf0b5d
commit 9f9b1849eb
141 changed files with 13168 additions and 211 deletions

View File

@@ -1,4 +1,4 @@
{{- if index .Values.ocFront.enabled }}
{{- if .Values.ocFront.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -6,7 +6,7 @@ metadata:
app: oc-front
name: {{ .Release.Name }}-oc-front
spec:
replicas: 1
replicas: {{ .Values.ocFront.replicas }}
selector:
matchLabels:
app: oc-front
@@ -30,6 +30,12 @@ spec:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /metrics
port: http
initialDelaySeconds: 10
periodSeconds: 30
resources:
limits:
cpu: "{{ .Values.ocFront.resources.limits.cpu }}"

View File

@@ -1,4 +1,4 @@
{{- if index .Values.ocFront.enabled }}
{{- if .Values.ocFront.enabled }}
apiVersion: v1
kind: Service
metadata:
@@ -14,4 +14,27 @@ spec:
selector:
app: oc-front
type: ClusterIP
{{- end }}
{{- end }}
{{- if and .Values.ocFront.enabled .Values.ocFront.hpa.enabled }}
---
# Horizontal Pod Autoscaler
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Release.Name }}-oc-front
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ .Release.Name }}-oc-front
minReplicas: {{ .Values.ocFront.hpa.minReplicas }}
maxReplicas: {{ .Values.ocFront.hpa.maxReplicas }}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.ocFront.hpa.targetCPUUtilizationPercentage }}
{{- end }}