rancher-partner-charts/charts/prophetstor/federatorai/templates/federatorai-rest/deployments.yaml

143 lines
5.1 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
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: federatorai-rest
name: federatorai-rest
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: alameda
component: federatorai-rest
strategy:
type: Recreate
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: federatorai-rest
name: federatorai-rest
spec:
affinity:
{{- if .Values.federatoraiRest.affinity }}
{{- include "render-value" ( dict "value" .Values.federatoraiRest.affinity "context" .) | nindent 8 }}
{{- end }}
containers:
- env:
- name: NAMESPACE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: INFLUXDB_ADDRESS
value: https://alameda-influxdb.{{ .Release.Namespace }}.svc:8086
- name: INFLUXDB_USERNAME
value: admin
- name: INFLUXDB_PASSWORD
value: adminpass
- name: DATAHUB_ADDRESS
value: alameda-datahub.{{ .Release.Namespace }}.svc:50050
- name: BINDADDRESS
value: :5055
- name: FEDEMETER_ADDRESS
value: http://fedemeter-api.{{ .Release.Namespace }}.svc:8888/fedemeter-api
- name: FEDEMETER_USERNAME
value: fedemeter
- name: FEDEMETER_PASSWORD
value: $6$pOwGiawPSjz7qLaN$fnMXEhwzWnUw.bOKohdAhB5K5iCCOJJaZXxQkhzH4URsHP8qLTT4QeBPUKjlOAeAHbKsqlf.fyuL2pNRmR6oQD1
- name: NOTIFIER_USERNAME
value: admin
- name: NOTIFIER_PASSWORD
value: adminpass
- name: NOTIFIER_ADDRESS
value: alameda-rabbitmq.{{ .Release.Namespace }}.svc:5672
- name: FEDERATORAI_MAXIMUM_LOG_SIZE
value: "1932735283"
{{- if .Values.federatoraiRest.image }}
image: {{ .Values.federatoraiRest.image }}
{{- else }}
image: {{ .Values.global.imageRegistry }}/federatorai-rest-ubi:{{ .Values.global.imageTag }}
{{- end }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
livenessProbe:
exec:
command:
- /usr/local/bin/federatorai-rest
- probe
- --type=liveness
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 5
name: federatorai-rest
readinessProbe:
exec:
command:
- /usr/local/bin/federatorai-rest
- probe
- --type=readiness
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 5
resources:
{{- if .Values.global.resourcesLimitsEnabled }}
limits:
{{- include "render-value" ( dict "value" .Values.federatoraiRest.resources.limits "context" .) | nindent 14 }}
{{- end }}
{{- if .Values.global.resourcesRequestsEnabled }}
requests:
{{- include "render-value" ( dict "value" .Values.federatoraiRest.resources.requests "context" .) | nindent 14 }}
{{- end }}
volumeMounts:
- mountPath: /var/log/alameda
name: federatorai-rest-log-storage
imagePullSecrets:
{{- if .Values.global.imagePullSecrets }}
{{ include "render-value" ( dict "value" .Values.global.imagePullSecrets "context" .) | nindent 8 }}
{{- end }}
securityContext:
fsGroup: 1001
{{- if .Values.federatoraiRest.podSecurityContext }}
{{- include "render-value" ( dict "value" .Values.federatoraiRest.podSecurityContext "context" .) | nindent 8 }}
{{- end }}
serviceAccount: federatorai-rest
serviceAccountName: federatorai-rest
tolerations:
{{- if .Values.federatoraiRest.tolerations }}
{{- include "render-value" ( dict "value" .Values.federatoraiRest.tolerations "context" .) | nindent 6 }}
{{- end }}
volumes:
- emptyDir: {}
name: federatorai-rest-data-storage
- name: federatorai-rest-log-storage
persistentVolumeClaim:
claimName: federatorai-rest-log.pvc