rancher-partner-charts/charts/prophetstor/federatorai/templates/fedemeter-influxdb/statefulsets.yaml

106 lines
3.7 KiB
YAML

---
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations:
{{- if .Values.global.commonAnnotations }}
{{- include "render-value" ( dict "value" .Values.global.commonAnnotations "context" .) | nindent 4 }}
{{- end }}
labels:
{{- if .Values.global.commonLabels }}
{{- include "render-value" ( dict "value" .Values.global.commonLabels "context" .) | nindent 4 }}
{{- end }}
app.kubernetes.io/part-of: federatorai
app: alameda
component: fedemeter-influxdb
name: fedemeter-influxdb
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: alameda
component: fedemeter-influxdb
serviceName: fedemeter-influxdb
template:
metadata:
annotations:
{{- if .Values.global.podAnnotations }}
{{- include "render-value" ( dict "value" .Values.global.podAnnotations "context" .) | nindent 8 }}
{{- end }}
labels:
{{- if .Values.global.podLabels }}
{{- include "render-value" ( dict "value" .Values.global.podLabels "context" .) | nindent 8 }}
{{- end }}
app.kubernetes.io/part-of: federatorai
app: alameda
component: fedemeter-influxdb
spec:
affinity:
{{- if .Values.fedemeterInfluxdb.affinity }}
{{- include "render-value" ( dict "value" .Values.fedemeterInfluxdb.affinity "context" .) | nindent 8 }}
{{- end }}
containers:
- env:
- name: INFLUXDB_LOGGING_LEVEL
value: warn
- name: FEDERATORAI_MAXIMUM_LOG_SIZE
value: "1932735283"
image: {{ .Values.global.imageRegistry }}/fedemeter-influxdb:{{ .Values.global.imageTag }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
livenessProbe:
exec:
command:
- /bin/bash
- -c
- /run.sh liveness
failureThreshold: 3
initialDelaySeconds: 300
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 300
name: fedemeter-influxdb
ports:
- containerPort: 8086
protocol: TCP
resources:
{{- if .Values.global.resourcesLimitsEnabled }}
limits:
{{- include "render-value" ( dict "value" .Values.fedemeterInfluxdb.resources.limits "context" .) | nindent 14 }}
{{- end }}
{{- if .Values.global.resourcesRequestsEnabled }}
requests:
{{- include "render-value" ( dict "value" .Values.fedemeterInfluxdb.resources.requests "context" .) | nindent 14 }}
{{- end }}
volumeMounts:
- mountPath: /var/log/influxdb
name: fedemeter-influxdb-log-storage
subPath: influxdb
- mountPath: /influxdb
name: fedemeter-influxdb-data-storage
subPath: influxdb
imagePullSecrets:
{{- if .Values.global.imagePullSecrets }}
{{ include "render-value" ( dict "value" .Values.global.imagePullSecrets "context" .) | nindent 8 }}
{{- end }}
securityContext:
fsGroup: 1001
{{- if .Values.fedemeterInfluxdb.podSecurityContext }}
{{- include "render-value" ( dict "value" .Values.fedemeterInfluxdb.podSecurityContext "context" .) | nindent 8 }}
{{- end }}
serviceAccount: fedemeter-influxdb
serviceAccountName: fedemeter-influxdb
tolerations:
{{- if .Values.fedemeterInfluxdb.tolerations }}
{{- include "render-value" ( dict "value" .Values.fedemeterInfluxdb.tolerations "context" .) | nindent 6 }}
{{- end }}
volumes:
- name: fedemeter-influxdb-data-storage
persistentVolumeClaim:
claimName: fedemeter.influxdb-data.pvc
- name: fedemeter-influxdb-log-storage
persistentVolumeClaim:
claimName: fedemeter.influxdb-log.pvc
updateStrategy:
type: RollingUpdate