Skip to content

Commit

Permalink
merge(#1304,Cadence): added service annotations
Browse files Browse the repository at this point in the history
[Cadence] Allow specifying annotations on services
#1304
  • Loading branch information
pregnor committed Nov 4, 2021
2 parents 0db8a0b + 736ecce commit 71eeb39
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
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

0 comments on commit 71eeb39

Please sign in to comment.