Skip to content

Commit

Permalink
feat: allow configuring replica count for jaeger operator (#552)
Browse files Browse the repository at this point in the history
Enable leader election if the given number is greater than 1

Signed-off-by: Alex Szakaly <[email protected]>
  • Loading branch information
alex1989hu authored Apr 9, 2024
1 parent d4e163e commit 047a76c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/jaeger-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: jaeger-operator Helm chart for Kubernetes
name: jaeger-operator
version: 2.50.1
version: 2.51.0
appVersion: 1.52.0
home: https://www.jaegertracing.io/
icon: https://www.jaegertracing.io/img/jaeger-icon-reverse-color.svg
Expand Down
1 change: 1 addition & 0 deletions charts/jaeger-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ The following table lists the configurable parameters of the jaeger-operator cha
| `rbac.clusterRole` | ClusterRole will be used by operator ServiceAccount | `false` |
| `serviceAccount.name` | Service account name to use. If not set and create is true, a name is generated using the fullname template | `nil` |
| `extraEnv` | Additional environment variables passed to the operator. For example: name: LOG-LEVEL value: debug | `[]` |
| `replicaCount` | Desired number of operator pods | `1` |
| `resources` | K8s pod resources | `None` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Toleration labels for pod assignment | `[]` |
Expand Down
6 changes: 5 additions & 1 deletion charts/jaeger-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
{{ . | toYaml | indent 4 }}
{{- end }}
spec:
replicas: 1
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{ include "jaeger-operator.labels" . | indent 6 }}
Expand Down Expand Up @@ -59,6 +59,10 @@ spec:
- start
- {{ printf "--metrics-port=%v" .Values.metricsPort }}
- {{ printf "--webhook-bind-port=%v" .Values.webhooks.port }}
{{- $replicaCount := int .Values.replicaCount }}
{{- if gt $replicaCount 1 }}
- --leader-elect
{{- end }}
env:
- name: WATCH_NAMESPACE
{{- if .Values.rbac.clusterRole }}
Expand Down
3 changes: 3 additions & 0 deletions charts/jaeger-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ extraLabels: {}
# Specifies extra labels for the operator deployment:
# foo: bar

# Specifies desired number of operator pods
replicaCount: 1

resources: {}
# limits:
# cpu: 100m
Expand Down

0 comments on commit 047a76c

Please sign in to comment.