temporal: Add HA setup
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
temporal:
|
temporal:
|
||||||
enabled: true
|
enabled: true
|
||||||
autosync: false
|
autosync: true
|
||||||
ingress: true
|
ingress: true
|
||||||
grpcIngress: true
|
grpcIngress: true
|
||||||
workerController: true
|
workerController: true
|
||||||
|
|||||||
@@ -60,4 +60,19 @@ spec:
|
|||||||
protocol: UDP
|
protocol: UDP
|
||||||
- port: "53"
|
- port: "53"
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
---
|
||||||
|
apiVersion: cilium.io/v2
|
||||||
|
kind: CiliumNetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: allow-web-oidc-login
|
||||||
|
namespace: temporal
|
||||||
|
spec:
|
||||||
|
description: Allow Temporal Web UI OIDC login to Entra ID
|
||||||
|
endpointSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
egress:
|
||||||
|
- toFQDNs:
|
||||||
|
- matchName: login.microsoftonline.com
|
||||||
|
- matchPattern: '*.microsoftonline.com'
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -12,9 +12,20 @@ spec:
|
|||||||
initdb:
|
initdb:
|
||||||
database: temporal
|
database: temporal
|
||||||
owner: temporal
|
owner: temporal
|
||||||
|
# headroom for ~240 server connections (30/pod x 8 pods) plus CNPG's own
|
||||||
|
postgresql:
|
||||||
|
parameters:
|
||||||
|
max_connections: "300"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 1Gi
|
||||||
|
limits:
|
||||||
|
cpu: "2"
|
||||||
|
memory: 2Gi
|
||||||
storage:
|
storage:
|
||||||
resizeInUseVolumes: true
|
resizeInUseVolumes: true
|
||||||
size: 10Gi
|
size: 20Gi
|
||||||
---
|
---
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
kind: Database
|
kind: Database
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
server:
|
server:
|
||||||
|
# 2 replicas per role for HA; per-role blocks inherit this.
|
||||||
|
replicaCount: 2
|
||||||
config:
|
config:
|
||||||
|
logLevel: "info"
|
||||||
persistence:
|
persistence:
|
||||||
defaultStore: default
|
defaultStore: default
|
||||||
visibilityStore: visibility
|
visibilityStore: visibility
|
||||||
|
# immutable after first deploy
|
||||||
numHistoryShards: 512
|
numHistoryShards: 512
|
||||||
datastores:
|
datastores:
|
||||||
default:
|
default:
|
||||||
@@ -20,7 +24,7 @@ server:
|
|||||||
maxConns: 20
|
maxConns: 20
|
||||||
maxIdleConns: 20
|
maxIdleConns: 20
|
||||||
maxConnLifetime: "1h"
|
maxConnLifetime: "1h"
|
||||||
# TODO: migrate visibility to Elasticsearch for advanced visibility search.
|
# Postgres 12+ gives advanced visibility; no Elasticsearch needed.
|
||||||
visibility:
|
visibility:
|
||||||
sql:
|
sql:
|
||||||
createDatabase: false
|
createDatabase: false
|
||||||
@@ -41,8 +45,127 @@ server:
|
|||||||
timerType: histogram
|
timerType: histogram
|
||||||
listenAddress: "0.0.0.0:9090"
|
listenAddress: "0.0.0.0:9090"
|
||||||
|
|
||||||
|
# this cluster's Prometheus scrapes via ServiceMonitor, not pod annotations
|
||||||
|
metrics:
|
||||||
|
serviceMonitor:
|
||||||
|
enabled: true
|
||||||
|
interval: 30s
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 512Mi
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
memory: 1Gi
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
podDisruptionBudget:
|
||||||
|
maxUnavailable: 1
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- maxSkew: 1
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
whenUnsatisfiable: ScheduleAnyway
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: temporal
|
||||||
|
app.kubernetes.io/instance: temporal
|
||||||
|
app.kubernetes.io/component: frontend
|
||||||
|
|
||||||
|
history:
|
||||||
|
# memory-heavy (shard/mutable-state cache)
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 768Mi
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
memory: 1536Mi
|
||||||
|
podDisruptionBudget:
|
||||||
|
maxUnavailable: 1
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- maxSkew: 1
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
whenUnsatisfiable: ScheduleAnyway
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: temporal
|
||||||
|
app.kubernetes.io/instance: temporal
|
||||||
|
app.kubernetes.io/component: history
|
||||||
|
|
||||||
|
matching:
|
||||||
|
podDisruptionBudget:
|
||||||
|
maxUnavailable: 1
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- maxSkew: 1
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
whenUnsatisfiable: ScheduleAnyway
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: temporal
|
||||||
|
app.kubernetes.io/instance: temporal
|
||||||
|
app.kubernetes.io/component: matching
|
||||||
|
|
||||||
|
worker:
|
||||||
|
podDisruptionBudget:
|
||||||
|
maxUnavailable: 1
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- maxSkew: 1
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
whenUnsatisfiable: ScheduleAnyway
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: temporal
|
||||||
|
app.kubernetes.io/instance: temporal
|
||||||
|
app.kubernetes.io/component: worker
|
||||||
|
|
||||||
|
# no persistent debug pod; use temporalio/admin-tools on demand
|
||||||
|
admintools:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
web:
|
web:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
replicaCount: 2
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 256Mi
|
||||||
|
podDisruptionBudget:
|
||||||
|
maxUnavailable: 1
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- maxSkew: 1
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
whenUnsatisfiable: ScheduleAnyway
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: temporal
|
||||||
|
app.kubernetes.io/instance: temporal
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
# native OIDC SSO via Entra ID (same oceanbox-oidc secret as Grafana); gates UI login only
|
||||||
|
additionalEnv:
|
||||||
|
- name: TEMPORAL_AUTH_ENABLED
|
||||||
|
value: "true"
|
||||||
|
- name: TEMPORAL_AUTH_TYPE
|
||||||
|
value: "oidc"
|
||||||
|
- name: TEMPORAL_AUTH_PROVIDER_URL
|
||||||
|
value: "https://login.microsoftonline.com/3f737008-e9a0-4485-9d27-40329d288089/v2.0"
|
||||||
|
- name: TEMPORAL_AUTH_CLIENT_ID
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: oceanbox-oidc
|
||||||
|
key: client_id
|
||||||
|
- name: TEMPORAL_AUTH_CLIENT_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: oceanbox-oidc
|
||||||
|
key: client_secret
|
||||||
|
- name: TEMPORAL_AUTH_CALLBACK_URL
|
||||||
|
value: "https://temporal.ekman.oceanbox.io/auth/sso/callback"
|
||||||
|
- name: TEMPORAL_AUTH_SCOPES
|
||||||
|
value: "openid,profile,email"
|
||||||
|
|
||||||
schema:
|
schema:
|
||||||
useHelmHooks: false
|
useHelmHooks: false
|
||||||
|
|||||||
Reference in New Issue
Block a user