Skip to content

Commit

Permalink
Merge pull request #28 from tspiri26/low_359_statefulset
Browse files Browse the repository at this point in the history
Low 359 statefulset
  • Loading branch information
vktrbrlv authored Jun 4, 2024
2 parents 0f10e8a + e5dabeb commit b6b8b66
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 170 deletions.
2 changes: 1 addition & 1 deletion charts/app-mendix/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: app-mendix
version: 2.3.0
version: 3.0.0
description: Mendix Application Chart.
icon: https://cinaq.github.io/helm-charts/icons/mendix-logo.png
maintainers:
Expand Down
4 changes: 2 additions & 2 deletions charts/app-mendix/templates/autoscale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ metadata:
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "app-mendix.fullname" . }}-slave
kind: StatefulSet
name: {{ template "app-mendix.fullname" . }}
minReplicas: {{ .Values.autoscale.minSlaveReplicas }}
maxReplicas: {{ .Values.autoscale.maxSlaveReplicas }}
targetCPUUtilizationPercentage: {{ .Values.autoscale.targetCPUUtilizationPercentage }}
Expand Down
145 changes: 0 additions & 145 deletions charts/app-mendix/templates/deployment-slave.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
---
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: {{ template "app-mendix.fullname" . }}-leader
name: {{ template "app-mendix.fullname" . }}
labels:
{{- include "app-mendix.labels" . | nindent 4 }}
spec:
{{- if (ge (int .Values.replicaCount) 1) }}
replicas: 1
{{- else }}
replicas: 0
{{- end }}
replicas: {{ default 1 .Values.replicaCount }}
selector:
matchLabels:
{{- include "app-mendix.selectorLabels" . | nindent 6 }}
strategy:
type: Recreate
updateStrategy:
type: RollingUpdate
serviceName: {{ template "app-mendix.fullname" . }}
minReadySeconds: 10
template:
metadata:
labels:
Expand All @@ -41,8 +39,6 @@ spec:
env:
- name: NON_MENDIX_PUBLIC_CLOUD
value: "true"
- name: CF_INSTANCE_INDEX
value: "0"
- name: MXRUNTIME_Metrics_Registries
value: '[{"type": "prometheus", "settings": {"step": "5m"}}]'
- name: RUNTIME_LOGIN_METRICS_ENABLED
Expand Down
12 changes: 1 addition & 11 deletions charts/app-mendix/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# initial replica, if:
# less than 1 => no leader or slaves
# equal 1 => 1 leader no slaves
# larger than 1 => 1 leader, rest slaves
# replicaCount: 2 | 1 leader, 1 slave
replicaCount: 1

image:
Expand Down Expand Up @@ -98,13 +95,6 @@ autoscale:
maxSlaveReplicas: 3
targetCPUUtilizationPercentage: 70

strategy:
enabled: false
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0

readinessProbe:
enabled: true
type: httpGet
Expand Down

0 comments on commit b6b8b66

Please sign in to comment.