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

139 lines
5.3 KiB
YAML
Raw Normal View History

---
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-agent
name: federatorai-agent
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: alameda
component: federatorai-agent
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-agent
spec:
affinity:
{{- if .Values.federatoraiAgent.affinity }}
{{- include "render-value" ( dict "value" .Values.federatoraiAgent.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: FEDERATORAI_MAXIMUM_LOG_SIZE
value: "1932735283"
image: {{ .Values.global.imageRegistry }}/federatorai-agent-ubi:{{ .Values.global.imageTag }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
livenessProbe:
exec:
command:
- /opt/alameda/federatorai-agent/bin/transmitter
- probe
- --type=liveness
failureThreshold: 20
initialDelaySeconds: 5
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 5
name: federatorai-agent
readinessProbe:
exec:
command:
- /opt/alameda/federatorai-agent/bin/transmitter
- probe
- --type=readiness
failureThreshold: 20
initialDelaySeconds: 5
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 5
resources:
{{- if .Values.global.resourcesLimitsEnabled }}
limits:
{{- include "render-value" ( dict "value" .Values.federatoraiAgent.resources.limits "context" .) | nindent 14 }}
{{- end }}
{{- if .Values.global.resourcesRequestsEnabled }}
requests:
{{- include "render-value" ( dict "value" .Values.federatoraiAgent.resources.requests "context" .) | nindent 14 }}
{{- end }}
volumeMounts:
- name: federatorai-agent-config
mountPath: /etc/alameda/federatorai-agent/transmitter.toml
subPath: transmitter.toml
- name: federatorai-agent-config
mountPath: /etc/alameda/federatorai-agent/input/cost_analysis_normal_daily.toml
subPath: cost_analysis_normal_daily.toml
- name: federatorai-agent-config
mountPath: /etc/alameda/federatorai-agent/input/cost_analysis_normal_cluster_daily.toml
subPath: cost_analysis_normal_cluster_daily.toml
- name: federatorai-agent-config
mountPath: /etc/alameda/federatorai-agent/input/cost_analysis_high_recommendation.toml
subPath: cost_analysis_high_recommendation.toml
- name: federatorai-agent-config
mountPath: /etc/alameda/federatorai-agent/input/cost_analysis_normal_weekly.toml
subPath: cost_analysis_normal_weekly.toml
- name: federatorai-agent-config
mountPath: /etc/alameda/federatorai-agent/input/cost_analysis_normal_yearly.toml
subPath: cost_analysis_normal_yearly.toml
- name: federatorai-agent-config
mountPath: /etc/alameda/federatorai-agent/input/cost_analysis_normal_monthly.toml
subPath: cost_analysis_normal_monthly.toml
imagePullSecrets:
{{- if .Values.global.imagePullSecrets }}
{{ include "render-value" ( dict "value" .Values.global.imagePullSecrets "context" .) | nindent 8 }}
{{- end }}
securityContext:
fsGroup: 1001
{{- if .Values.federatoraiAgent.podSecurityContext }}
{{- include "render-value" ( dict "value" .Values.federatoraiAgent.podSecurityContext "context" .) | nindent 8 }}
{{- end }}
serviceAccount: federatorai-agent
serviceAccountName: federatorai-agent
tolerations:
{{- if .Values.federatoraiAgent.tolerations }}
{{- include "render-value" ( dict "value" .Values.federatoraiAgent.tolerations "context" .) | nindent 6 }}
{{- end }}
volumes:
- configMap:
defaultMode: 420
name: federatorai-agent-config
name: federatorai-agent-config
- emptyDir: {}
name: federatorai-agent-data-storage
- name: federatorai-agent-log-storage
persistentVolumeClaim:
claimName: federatorai-agent-log.pvc