Update K8S to include an auto generator of values template
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{{- if index .Values.ocCatalog.enabled }}
|
||||
{{- if .Values.ocCatalog.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@@ -6,7 +6,7 @@ metadata:
|
||||
app: oc-catalog
|
||||
name: {{ .Release.Name }}-oc-catalog
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: {{ .Values.ocCatalog.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: oc-catalog
|
||||
@@ -36,4 +36,4 @@ spec:
|
||||
requests:
|
||||
cpu: "{{ .Values.ocCatalog.resources.requests.cpu }}"
|
||||
memory: "{{ .Values.ocCatalog.resources.requests.memory }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- if index .Values.ocCatalog.enabled }}
|
||||
{{- if .Values.ocCatalog.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
@@ -14,4 +14,27 @@ spec:
|
||||
selector:
|
||||
app: oc-catalog
|
||||
type: ClusterIP
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if and .Values.ocCatalog.enabled .Values.ocCatalog.hpa.enabled }}
|
||||
---
|
||||
# Horizontal Pod Autoscaler
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-oc-catalog
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ .Release.Name }}-oc-catalog
|
||||
minReplicas: {{ .Values.ocCatalog.hpa.minReplicas }}
|
||||
maxReplicas: {{ .Values.ocCatalog.hpa.maxReplicas }}
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.ocCatalog.hpa.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user