Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cadence] Allow specifying annotations on services #1304

Merged
merged 2 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cadence/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cadence
version: 0.21.2
version: 0.21.3
appVersion: 0.21.3
description: Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
icon: https://raw.githubusercontent.com/uber/cadence-web/master/client/assets/logo.svg
Expand Down
1 change: 1 addition & 0 deletions cadence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ Global options overridable per service are marked with an asterisk.
| `server.config.persistence.[store].sql` | SQL connection details (see `values.yaml`) | `{}` |
| `server.[service].service.type` | `[service]` service type | `ClusterIP` |
| `server.[service].service.port` | `[service]` service port | `7933/7934/7935/7939` |
| `server.[service].service.annotations` | `[service]` service annotations | `{}` |
| `server.[service].metrics.annotations.enabled` | Annotate `[service]` pods with Prometheus annotations | `` |
| `server.[service].metrics.serviceMonitor.enabled` | Enable Prometheus ServiceMonitor for `[service]` | `` |
| `server.[service].metrics.prometheus.timerType` | `[service]` Prometheus timer type | `` |
Expand Down
8 changes: 8 additions & 0 deletions cadence/templates/server-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "cadence.componentname" (list . "frontend") }}
{{- with .Values.server.frontend.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ include "cadence.name" . }}
helm.sh/chart: {{ include "cadence.chart" . }}
Expand Down Expand Up @@ -32,6 +36,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "cadence.componentname" (list $ (printf "%s-headless" $service)) }}

labels:
app.kubernetes.io/name: {{ include "cadence.name" $ }}
helm.sh/chart: {{ include "cadence.chart" $ }}
Expand All @@ -47,6 +52,9 @@ metadata:
# some versions of Kubernetes:
# https://github.com/kubernetes/kubernetes/issues/58662
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
{{- with $serviceValues.service.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
clusterIP: None
Expand Down
4 changes: 4 additions & 0 deletions cadence/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ server:
type: ClusterIP
grpcPort: 7833
port: 7933
annotations: {}
metrics:
annotations: {}
# enabled: false
Expand All @@ -236,6 +237,7 @@ server:
# type: ClusterIP
grpcPort: 7834
port: 7934
annotations: {}
metrics:
annotations: {}
# enabled: false
Expand All @@ -259,6 +261,7 @@ server:
# type: ClusterIP
grpcPort: 7835
port: 7935
annotations: {}
metrics:
annotations: {}
# enabled: false
Expand All @@ -281,6 +284,7 @@ server:
service:
# type: ClusterIP
port: 7939
annotations: {}
metrics:
annotations: {}
# enabled: false
Expand Down