Replicas > 1 is not allowed with sqlite driver (#269)
Co-authored-by: Faisal Memon <[email protected]> Co-authored-by: Marco Franssen <[email protected]>
This commit is contained in:
co-authored by
Faisal Memon
Marco Franssen
parent
d3da3eed55
commit
c4656a74b2
@@ -12,6 +12,9 @@ spec:
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
name: {{ include "spire-server.fullname" . }}
|
name: {{ include "spire-server.fullname" . }}
|
||||||
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||||
|
{{- if and (eq .Values.dataStore.sql.databaseType "sqlite3") .Values.autoscaling.enabled (gt (int .Values.autoscaling.maxReplicas) 1) }}
|
||||||
|
{{- fail "When running with sqlite3 database, you can't scale up to more then one instance. 'autoscaling.maxReplicas' MUST be 1" }}
|
||||||
|
{{- end }}
|
||||||
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||||
metrics:
|
metrics:
|
||||||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ metadata:
|
|||||||
{{- include "spire-server.labels" . | nindent 4 }}
|
{{- include "spire-server.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
{{- if not .Values.autoscaling.enabled }}
|
{{- if not .Values.autoscaling.enabled }}
|
||||||
|
{{- if and (eq .Values.dataStore.sql.databaseType "sqlite3") (gt (int .Values.replicaCount) 1) }}
|
||||||
|
{{- fail "When running with sqlite3 database, you can't scale up to more then one instance. 'replicaCount' MUST be 1" }}
|
||||||
|
{{- end }}
|
||||||
replicas: {{ .Values.replicaCount }}
|
replicas: {{ .Values.replicaCount }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceName: {{ include "spire-server.fullname" . }}
|
serviceName: {{ include "spire-server.fullname" . }}
|
||||||
|
|||||||
Reference in New Issue
Block a user