diff --git a/charts/temporal/templates/server-deployment.yaml b/charts/temporal/templates/server-deployment.yaml index 1f34e375..3e1f8cbc 100644 --- a/charts/temporal/templates/server-deployment.yaml +++ b/charts/temporal/templates/server-deployment.yaml @@ -105,6 +105,10 @@ spec: tcpSocket: port: rpc {{- end }} + {{- with default $.Values.server.readinessProbe $serviceValues.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} volumeMounts: - name: config mountPath: /etc/temporal/config/config_template.yaml diff --git a/charts/temporal/templates/web-deployment.yaml b/charts/temporal/templates/web-deployment.yaml index 15df42cc..b1027cba 100644 --- a/charts/temporal/templates/web-deployment.yaml +++ b/charts/temporal/templates/web-deployment.yaml @@ -49,6 +49,10 @@ spec: initialDelaySeconds: 10 tcpSocket: port: http + {{- with .Values.web.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} ports: - name: http containerPort: 8080 diff --git a/charts/temporal/tests/server_deployment_test.yaml b/charts/temporal/tests/server_deployment_test.yaml index 608489b2..ae7531ad 100644 --- a/charts/temporal/tests/server_deployment_test.yaml +++ b/charts/temporal/tests/server_deployment_test.yaml @@ -211,3 +211,52 @@ tests: - equal: path: spec.strategy.rollingUpdate.maxUnavailable value: 0 + - it: readinessProbe defaults to empty + template: templates/server-deployment.yaml + documentSelector: + path: '$[?(@.metadata.name == "RELEASE-NAME-temporal-worker")].kind' + value: Deployment + matchMany: true + asserts: + - notExists: + path: spec.template.spec.containers[0].readinessProbe + - it: readinessProbe is set for frontend service + template: templates/server-deployment.yaml + documentSelector: + path: '$[?(@.metadata.name == "RELEASE-NAME-temporal-frontend")].kind' + value: Deployment + matchMany: true + set: + server: + frontend: + readinessProbe: + grpc: + port: 9999 + service: temporal.api.workflowservice.v1.WorkflowService + asserts: + - equal: + path: spec.template.spec.containers[0].readinessProbe.grpc.port + value: 9999 + - equal: + path: spec.template.spec.containers[0].readinessProbe.grpc.service + value: temporal.api.workflowservice.v1.WorkflowService + - it: readinessProbe is set for history service + template: templates/server-deployment.yaml + documentSelector: + path: '$[?(@.metadata.name == "RELEASE-NAME-temporal-history")].kind' + value: Deployment + matchMany: true + set: + server: + history: + readinessProbe: + initialDelaySeconds: 300 + tcpSocket: + port: rpc + asserts: + - equal: + path: spec.template.spec.containers[0].readinessProbe.initialDelaySeconds + value: 300 + - equal: + path: spec.template.spec.containers[0].readinessProbe.tcpSocket.port + value: rpc diff --git a/charts/temporal/values.yaml b/charts/temporal/values.yaml index 3aed2d55..6cff93e3 100644 --- a/charts/temporal/values.yaml +++ b/charts/temporal/values.yaml @@ -24,6 +24,7 @@ server: pullPolicy: IfNotPresent # Global default settings (can be overridden per service) replicaCount: 1 + readinessProbe: {} metrics: # Annotate pods and services directly with the following Prometheus annotations. # prometheus.io/job @@ -229,6 +230,10 @@ server: membershipAppProtocol: tcp httpPort: 7243 httpAppProtocol: http + readinessProbe: + grpc: + port: 7233 + service: temporal.api.workflowservice.v1.WorkflowService ingress: enabled: false # className: @@ -277,6 +282,10 @@ server: membershipAppProtocol: tcp httpPort: 7246 httpAppProtocol: http + readinessProbe: + grpc: + port: 7236 + service: temporal.api.workflowservice.v1.WorkflowService metrics: annotations: enabled: true @@ -304,6 +313,7 @@ server: appProtocol: tcp membershipPort: 6934 membershipAppProtocol: tcp + readinessProbe: {} metrics: annotations: enabled: true @@ -332,6 +342,7 @@ server: appProtocol: tcp membershipPort: 6935 membershipAppProtocol: tcp + readinessProbe: {} metrics: annotations: enabled: false @@ -359,6 +370,7 @@ server: appProtocol: tcp membershipPort: 6939 membershipAppProtocol: tcp + readinessProbe: {} metrics: annotations: enabled: true @@ -427,6 +439,11 @@ web: appProtocol: http annotations: {} # loadBalancerIP: + readinessProbe: + initialDelaySeconds: 10 + httpGet: + path: /healthz + port: http ingress: enabled: false # className: