diff --git a/charts/example-content/Chart.yaml b/charts/example-content/Chart.yaml index 0b98a7c13..81ae71981 100644 --- a/charts/example-content/Chart.yaml +++ b/charts/example-content/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "v0.158.15" description: Helm Chart for the openmfp Portal name: example-content -version: 0.114.39 +version: 0.114.40 dependencies: - name: common version: 0.5.2 diff --git a/charts/example-content/templates/hpa.yaml b/charts/example-content/templates/hpa.yaml new file mode 100644 index 000000000..25e1ae7d8 --- /dev/null +++ b/charts/example-content/templates/hpa.yaml @@ -0,0 +1,23 @@ +{{- if ((.Values).hpa).enabled | default false }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "common.entity.name" . }} + namespace: {{ .Release.Namespace }} +spec: + minReplicas: {{ .Values.hpa.minReplicas }} + maxReplicas: {{ .Values.hpa.maxReplicas }} + metrics: + {{- range .Values.hpa.metrics }} + - type: {{ .type }} + resource: + name: {{ .resource.name }} + target: + type: {{ .resource.target.type }} + averageUtilization: {{ .resource.target.averageUtilization }} + {{- end }} + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "common.entity.name" . }} +{{- end }} \ No newline at end of file diff --git a/charts/example-content/values.yaml b/charts/example-content/values.yaml index deb635102..352496c58 100644 --- a/charts/example-content/values.yaml +++ b/charts/example-content/values.yaml @@ -33,3 +33,16 @@ contentConfigurations: # internalUrl: null contentProtocolDomain: https://example-content.some-domain.com + +# Horizontal Pod Autoscaler configuration +# hpa: +# enabled: true +# minReplicas: 1 +# maxReplicas: 10 +# metrics: +# - type: Resource +# resource: +# name: cpu +# target: +# type: Utilization +# averageUtilization: 80 diff --git a/charts/kubernetes-graphql-gateway/Chart.yaml b/charts/kubernetes-graphql-gateway/Chart.yaml index d12fec2ec..b1812dfeb 100644 --- a/charts/kubernetes-graphql-gateway/Chart.yaml +++ b/charts/kubernetes-graphql-gateway/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -version: 0.20.35 -appVersion: v0.83.6 +version: 0.20.38 +appVersion: v0.83.5 name: kubernetes-graphql-gateway description: Basic helm chart that contains listener and gateway dependencies: diff --git a/charts/kubernetes-graphql-gateway/templates/hpa.yaml b/charts/kubernetes-graphql-gateway/templates/hpa.yaml new file mode 100644 index 000000000..25e1ae7d8 --- /dev/null +++ b/charts/kubernetes-graphql-gateway/templates/hpa.yaml @@ -0,0 +1,23 @@ +{{- if ((.Values).hpa).enabled | default false }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "common.entity.name" . }} + namespace: {{ .Release.Namespace }} +spec: + minReplicas: {{ .Values.hpa.minReplicas }} + maxReplicas: {{ .Values.hpa.maxReplicas }} + metrics: + {{- range .Values.hpa.metrics }} + - type: {{ .type }} + resource: + name: {{ .resource.name }} + target: + type: {{ .resource.target.type }} + averageUtilization: {{ .resource.target.averageUtilization }} + {{- end }} + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "common.entity.name" . }} +{{- end }} \ No newline at end of file diff --git a/charts/kubernetes-graphql-gateway/values.yaml b/charts/kubernetes-graphql-gateway/values.yaml index 9c138b2d4..4c059e9a4 100644 --- a/charts/kubernetes-graphql-gateway/values.yaml +++ b/charts/kubernetes-graphql-gateway/values.yaml @@ -111,3 +111,16 @@ health: path: "/readyz" failureThreshold: 30 periodSeconds: 10 + +# Horizontal Pod Autoscaler configuration +# hpa: +# enabled: true +# minReplicas: 1 +# maxReplicas: 10 +# metrics: +# - type: Resource +# resource: +# name: cpu +# target: +# type: Utilization +# averageUtilization: 80 diff --git a/charts/portal/Chart.yaml b/charts/portal/Chart.yaml index 449a4d42f..9f88e5d54 100644 --- a/charts/portal/Chart.yaml +++ b/charts/portal/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: Helm Chart for the openmfp Portal name: portal -version: 0.74.11 +version: 0.74.12 appVersion: "v0.377.193" dependencies: - name: common diff --git a/charts/portal/templates/hpa.yaml b/charts/portal/templates/hpa.yaml new file mode 100644 index 000000000..25e1ae7d8 --- /dev/null +++ b/charts/portal/templates/hpa.yaml @@ -0,0 +1,23 @@ +{{- if ((.Values).hpa).enabled | default false }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "common.entity.name" . }} + namespace: {{ .Release.Namespace }} +spec: + minReplicas: {{ .Values.hpa.minReplicas }} + maxReplicas: {{ .Values.hpa.maxReplicas }} + metrics: + {{- range .Values.hpa.metrics }} + - type: {{ .type }} + resource: + name: {{ .resource.name }} + target: + type: {{ .resource.target.type }} + averageUtilization: {{ .resource.target.averageUtilization }} + {{- end }} + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "common.entity.name" . }} +{{- end }} \ No newline at end of file diff --git a/charts/portal/values.yaml b/charts/portal/values.yaml index c1d2d5d54..0ea97e221 100644 --- a/charts/portal/values.yaml +++ b/charts/portal/values.yaml @@ -77,3 +77,16 @@ health: startup: # -- path used for the startup probe path: /rest/health + +# Horizontal Pod Autoscaler configuration +# hpa: +# enabled: true +# minReplicas: 1 +# maxReplicas: 10 +# metrics: +# - type: Resource +# resource: +# name: cpu +# target: +# type: Utilization +# averageUtilization: 80