1
0

deployment-streaming.yaml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: {{ include "mastodon.fullname" . }}-streaming
  5. labels:
  6. {{- include "mastodon.labels" . | nindent 4 }}
  7. spec:
  8. {{- if not .Values.autoscaling.enabled }}
  9. replicas: {{ .Values.replicaCount }}
  10. {{- end }}
  11. selector:
  12. matchLabels:
  13. {{- include "mastodon.selectorLabels" . | nindent 6 }}
  14. template:
  15. metadata:
  16. {{- with .Values.podAnnotations }}
  17. annotations:
  18. {{- toYaml . | nindent 8 }}
  19. {{- end }}
  20. labels:
  21. {{- include "mastodon.selectorLabels" . | nindent 8 }}
  22. spec:
  23. {{- with .Values.imagePullSecrets }}
  24. imagePullSecrets:
  25. {{- toYaml . | nindent 8 }}
  26. {{- end }}
  27. serviceAccountName: {{ include "mastodon.serviceAccountName" . }}
  28. securityContext:
  29. {{- toYaml .Values.podSecurityContext | nindent 8 }}
  30. containers:
  31. - name: {{ .Chart.Name }}
  32. securityContext:
  33. {{- toYaml .Values.securityContext | nindent 12 }}
  34. image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
  35. imagePullPolicy: {{ .Values.image.pullPolicy }}
  36. command:
  37. - node
  38. - ./streaming
  39. envFrom:
  40. - configMapRef:
  41. name: {{ include "mastodon.fullname" . }}-env
  42. env:
  43. - name: "DB_PASS"
  44. valueFrom:
  45. secretKeyRef:
  46. name: {{ .Release.Name }}-postgresql
  47. key: postgresql-password
  48. - name: "REDIS_PASSWORD"
  49. valueFrom:
  50. secretKeyRef:
  51. name: {{ .Release.Name }}-redis
  52. key: redis-password
  53. - name: "PORT"
  54. value: {{ .Values.application.streaming.port | quote }}
  55. ports:
  56. - name: streaming
  57. containerPort: {{ .Values.application.streaming.port }}
  58. protocol: TCP
  59. livenessProbe:
  60. httpGet:
  61. path: /api/v1/streaming/health
  62. port: streaming
  63. readinessProbe:
  64. httpGet:
  65. path: /api/v1/streaming/health
  66. port: streaming
  67. resources:
  68. {{- toYaml .Values.resources | nindent 12 }}
  69. {{- with .Values.nodeSelector }}
  70. nodeSelector:
  71. {{- toYaml . | nindent 8 }}
  72. {{- end }}
  73. {{- with .Values.affinity }}
  74. affinity:
  75. {{- toYaml . | nindent 8 }}
  76. {{- end }}
  77. {{- with .Values.tolerations }}
  78. tolerations:
  79. {{- toYaml . | nindent 8 }}
  80. {{- end }}