Skip to content

Commit

Permalink
OPSEXP-2525 alfresco-transform-service introduce optional hpa (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmacius authored Apr 8, 2024
1 parent e3fcc5c commit eb7e9b7
Show file tree
Hide file tree
Showing 14 changed files with 797 additions and 12 deletions.
2 changes: 1 addition & 1 deletion charts/alfresco-transform-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: alfresco-transform-service
description: A Helm chart for deploying Alfresco Transform Services
type: application
version: 1.2.0
version: 1.3.0-alpha.0
appVersion: 4.1.0
dependencies:
- name: alfresco-common
Expand Down
52 changes: 46 additions & 6 deletions charts/alfresco-transform-service/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ metadata:
labels:
{{- include "alfresco-transform-service.imagemagick.labels" . | nindent 4 }}
spec:
{{- if not .Values.imagemagick.autoscaling.enabled }}
replicas: {{ .Values.imagemagick.replicaCount }}
{{ end }}
selector:
matchLabels:
{{- include "alfresco-transform-service.imagemagick.selectorLabels" . | nindent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ metadata:
labels:
{{- include "alfresco-transform-service.libreoffice.labels" . | nindent 4 }}
spec:
{{- if not .Values.libreoffice.autoscaling.enabled }}
replicas: {{ .Values.libreoffice.replicaCount }}
{{ end }}
selector:
matchLabels:
{{- include "alfresco-transform-service.libreoffice.selectorLabels" . | nindent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ metadata:
labels:
{{- include "alfresco-transform-service.pdfrenderer.labels" . | nindent 4 }}
spec:
{{- if not .Values.pdfrenderer.autoscaling.enabled }}
replicas: {{ .Values.pdfrenderer.replicaCount }}
{{ end }}
selector:
matchLabels:
{{- include "alfresco-transform-service.pdfrenderer.selectorLabels" . | nindent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ metadata:
labels:
{{- include "alfresco-transform-service.tika.labels" . | nindent 4 }}
spec:
{{- if not .Values.tika.autoscaling.enabled }}
replicas: {{ .Values.tika.replicaCount }}
{{ end }}
selector:
matchLabels:
{{- include "alfresco-transform-service.tika.selectorLabels" . | nindent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ metadata:
labels:
{{- include "alfresco-transform-service.transform-misc.labels" . | nindent 4 }}
spec:
{{- if not .Values.transformmisc.autoscaling.enabled }}
replicas: {{ .Values.transformmisc.replicaCount }}
{{ end }}
selector:
matchLabels:
{{- include "alfresco-transform-service.transform-misc.selectorLabels" . | nindent 6 }}
Expand Down
16 changes: 16 additions & 0 deletions charts/alfresco-transform-service/templates/hpa-imagemagick.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ if and .Values.imagemagick.enabled .Values.imagemagick.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "alfresco-transform-service.imagemagick.name" . }}
labels: {{- include "alfresco-transform-service.imagemagick.labels" . | nindent 4 }}
spec:
minReplicas: {{ .Values.imagemagick.autoscaling.minReplicas }}
maxReplicas: {{ .Values.imagemagick.autoscaling.maxReplicas }}
behavior: {{ toYaml .Values.imagemagick.autoscaling.behavior | nindent 4 }}
metrics: {{ toYaml .Values.imagemagick.autoscaling.metrics | nindent 4 }}
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "alfresco-transform-service.imagemagick.name" . }}
{{ end }}
16 changes: 16 additions & 0 deletions charts/alfresco-transform-service/templates/hpa-libreoffice.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ if and .Values.libreoffice.enabled .Values.libreoffice.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "alfresco-transform-service.libreoffice.name" . }}
labels: {{- include "alfresco-transform-service.libreoffice.labels" . | nindent 4 }}
spec:
minReplicas: {{ .Values.libreoffice.autoscaling.minReplicas }}
maxReplicas: {{ .Values.libreoffice.autoscaling.maxReplicas }}
behavior: {{ toYaml .Values.libreoffice.autoscaling.behavior | nindent 4 }}
metrics: {{ toYaml .Values.libreoffice.autoscaling.metrics | nindent 4 }}
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "alfresco-transform-service.libreoffice.name" . }}
{{ end }}
16 changes: 16 additions & 0 deletions charts/alfresco-transform-service/templates/hpa-pdfrenderer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ if and .Values.pdfrenderer.enabled .Values.pdfrenderer.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "alfresco-transform-service.pdfrenderer.name" . }}
labels: {{- include "alfresco-transform-service.pdfrenderer.labels" . | nindent 4 }}
spec:
minReplicas: {{ .Values.pdfrenderer.autoscaling.minReplicas }}
maxReplicas: {{ .Values.pdfrenderer.autoscaling.maxReplicas }}
behavior: {{ toYaml .Values.pdfrenderer.autoscaling.behavior | nindent 4 }}
metrics: {{ toYaml .Values.pdfrenderer.autoscaling.metrics | nindent 4 }}
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "alfresco-transform-service.pdfrenderer.name" . }}
{{ end }}
16 changes: 16 additions & 0 deletions charts/alfresco-transform-service/templates/hpa-tika.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ if and .Values.tika.enabled .Values.tika.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "alfresco-transform-service.tika.name" . }}
labels: {{- include "alfresco-transform-service.tika.labels" . | nindent 4 }}
spec:
minReplicas: {{ .Values.tika.autoscaling.minReplicas }}
maxReplicas: {{ .Values.tika.autoscaling.maxReplicas }}
behavior: {{ toYaml .Values.tika.autoscaling.behavior | nindent 4 }}
metrics: {{ toYaml .Values.tika.autoscaling.metrics | nindent 4 }}
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "alfresco-transform-service.tika.name" . }}
{{ end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ if and .Values.transformmisc.enabled .Values.transformmisc.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "alfresco-transform-service.transform-misc.name" . }}
labels: {{- include "alfresco-transform-service.transform-misc.labels" . | nindent 4 }}
spec:
minReplicas: {{ .Values.transformmisc.autoscaling.minReplicas }}
maxReplicas: {{ .Values.transformmisc.autoscaling.maxReplicas }}
behavior: {{ toYaml .Values.transformmisc.autoscaling.behavior | nindent 4 }}
metrics: {{ toYaml .Values.transformmisc.autoscaling.metrics | nindent 4 }}
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "alfresco-transform-service.transform-misc.name" . }}
{{ end }}
Loading

0 comments on commit eb7e9b7

Please sign in to comment.