You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.7 KiB

  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. {{- if .Values.postgresql.enabled }}
  47. name: {{ .Release.Name }}-postgresql
  48. {{- else }}
  49. name: {{ template "mastodon.fullname" . }}
  50. {{- end }}
  51. key: postgresql-password
  52. - name: "REDIS_PASSWORD"
  53. valueFrom:
  54. secretKeyRef:
  55. name: {{ .Release.Name }}-redis
  56. key: redis-password
  57. - name: "PORT"
  58. value: {{ .Values.mastodon.streaming.port | quote }}
  59. ports:
  60. - name: streaming
  61. containerPort: {{ .Values.mastodon.streaming.port }}
  62. protocol: TCP
  63. livenessProbe:
  64. httpGet:
  65. path: /api/v1/streaming/health
  66. port: streaming
  67. readinessProbe:
  68. httpGet:
  69. path: /api/v1/streaming/health
  70. port: streaming
  71. resources:
  72. {{- toYaml .Values.resources | nindent 12 }}
  73. {{- with .Values.nodeSelector }}
  74. nodeSelector:
  75. {{- toYaml . | nindent 8 }}
  76. {{- end }}
  77. {{- with .Values.affinity }}
  78. affinity:
  79. {{- toYaml . | nindent 8 }}
  80. {{- end }}
  81. {{- with .Values.tolerations }}
  82. tolerations:
  83. {{- toYaml . | nindent 8 }}
  84. {{- end }}