mirror of
https://github.com/kerberos-io/helm-charts.git
synced 2026-08-23 15:18:33 +00:00
132 lines
5.1 KiB
YAML
132 lines
5.1 KiB
YAML
{{- if and (or (eq .Values.mode "all") (eq .Values.mode "pipeline")) .Values.kerberoshub.workflows.enabled -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: hub-workflows
|
|
namespace: {{ .Release.Namespace }}
|
|
spec:
|
|
replicas: {{ .Values.kerberoshub.services.workflows.replicas }}
|
|
selector:
|
|
matchLabels:
|
|
app: hub-workflows
|
|
minReadySeconds: 10
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxUnavailable: 1
|
|
maxSurge: 1
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
checksum/config: {{ include (print $.Template.BasePath "/configmap-mongodb.yaml") . | sha256sum }}
|
|
labels:
|
|
app: hub-workflows
|
|
spec:
|
|
{{- if .Values.kerberoshub.serviceAccount.create }}
|
|
serviceAccountName: {{ default (printf "%s-%s-sa" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-") .Values.kerberoshub.serviceAccount.name }}
|
|
{{- end }}
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- $mongodbTLS := .Values.mongodb.tls }}
|
|
{{- if or .Values.kerberoshub.services.workflows.volumes (and $mongodbTLS.enabled $mongodbTLS.existingSecret) }}
|
|
volumes:
|
|
{{- with .Values.kerberoshub.services.workflows.volumes }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if and $mongodbTLS.enabled $mongodbTLS.existingSecret }}
|
|
{{- include "hub.mongodb.tlsVolume" . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- with .Values.kerberoshub.services.workflows.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: hub-workflows
|
|
image: "{{ .Values.global.imageRegistry }}{{ .Values.kerberoshub.services.workflows.repository }}:{{ .Values.kerberoshub.services.workflows.tag }}"
|
|
imagePullPolicy: {{ .Values.kerberoshub.services.workflows.pullPolicy }}
|
|
{{- with .Values.kerberoshub.services.workflows.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- if or .Values.kerberoshub.services.workflows.volumeMounts (and $mongodbTLS.enabled $mongodbTLS.existingSecret) }}
|
|
volumeMounts:
|
|
{{- with .Values.kerberoshub.services.workflows.volumeMounts }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- if and $mongodbTLS.enabled $mongodbTLS.existingSecret }}
|
|
{{- include "hub.mongodb.tlsVolumeMount" . | nindent 12 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
envFrom:
|
|
- configMapRef:
|
|
name: mongodb-config
|
|
env:
|
|
- name: LOG_LEVEL
|
|
value: "{{ .Values.kerberoshub.services.workflows.logLevel }}"
|
|
- name: QUEUE_SYSTEM
|
|
value: "{{ .Values.queueProvider }}"
|
|
|
|
# Queue this service consumes from (WORKFLOWS_QUEUE) and the set of
|
|
# named workflows it runs (WORKFLOW_DEFINITIONS): each with its own
|
|
# trigger and executable stages, assembled from the enabled definitions
|
|
# under kerberoshub.workflows.definitions (see _workflows-helpers.tpl).
|
|
# Definitions are the engine's boot-loaded config source and deployment
|
|
# stage catalog. Organisation-scoped database workflows are read per
|
|
# recording; an in-cluster engine still requires at least one config
|
|
# definition so an empty catalog cannot silently drop traffic.
|
|
- name: WORKFLOWS_QUEUE
|
|
value: "{{ .Values.kerberoshub.services.workflows.queue }}"
|
|
- name: WORKFLOW_DEFINITIONS
|
|
value: {{ include "kerberoshub.workflows.workflowDefinitions" . | quote }}
|
|
|
|
# RabbitMQ settings
|
|
- name: RABBITMQ_HOST
|
|
value: "{{ .Values.rabbitmq.host }}"
|
|
- name: RABBITMQ_EXCHANGE
|
|
value: "{{ .Values.rabbitmq.exchange }}"
|
|
- name: RABBITMQ_USERNAME
|
|
value: "{{ .Values.rabbitmq.username }}"
|
|
- name: RABBITMQ_PASSWORD
|
|
value: "{{ .Values.rabbitmq.password }}"
|
|
|
|
# Kerberos Vault — global storage credentials a dispatched stage worker
|
|
# uses to fetch the media. Per-recording vault overrides (site/account)
|
|
# are resolved at dispatch time from the database.
|
|
- name: KERBEROS_STORAGE_URI
|
|
value: "{{ .Values.kerberosvault.uri }}"
|
|
- name: KERBEROS_STORAGE_ACCESS_KEY
|
|
value: "{{ .Values.kerberosvault.accesskey }}"
|
|
- name: KERBEROS_STORAGE_SECRET
|
|
value: "{{ .Values.kerberosvault.secretkey }}"
|
|
|
|
{{- if .Values.opentelemetry.enabled }}
|
|
# Open Telemetry tracing
|
|
- name: OTEL_EXPORTED_OTLP_ENABLED
|
|
value: "{{ .Values.opentelemetry.enabled }}"
|
|
- name: OTEL_EXPORTED_OTLP_ROUTING_ENABLED
|
|
value: "{{ .Values.opentelemetry.routingEnabled }}"
|
|
- name: OTEL_EXPORTER_OTLP_ENDPOINT
|
|
value: "{{ .Values.opentelemetry.collector.endpoint }}"
|
|
{{- end }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: hub-workflows
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
app: hub-workflows
|
|
service: pipe
|
|
spec:
|
|
ports:
|
|
- name: hub-metrics
|
|
port: 8080
|
|
targetPort: 8080
|
|
protocol: TCP
|
|
selector:
|
|
app: hub-workflows
|
|
{{- end }}
|