Skip to content

Commit

Permalink
Remove prometheus dependency (#534)
Browse files Browse the repository at this point in the history
* Remove prometheus from dependencies and examples
  • Loading branch information
BrianKopp authored Oct 4, 2024
1 parent f6e1903 commit ba57bec
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 59 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Temporal is a distributed, scalable, durable, and highly available orchestration

This repo contains a V3 [Helm](https://helm.sh) chart that deploys Temporal to a Kubernetes cluster. The dependencies that are bundled with this solution by default offer a baseline configuration to experiment with Temporal software. This Helm chart can also be used to install just the Temporal server, configured to connect to dependencies (such as a Cassandra, MySQL, or PostgreSQL database) that you may already have available in your environment.

The only portions of the helm chart that are considered production ready are the parts that configure and manage Temporal itself. Cassandra, Elasticsearch, Prometheus, and Grafana are all using minimal development configurations, and should be reconfigured in a production deployment.
The only portions of the helm chart that are considered production ready are the parts that configure and manage Temporal itself. Cassandra, Elasticsearch, and Grafana are all using minimal development configurations, and should be reconfigured in a production deployment.

This Helm Chart code is tested by a dedicated test pipeline. It is also used extensively by other Temporal pipelines for testing various aspects of Temporal systems. Our test pipeline currently uses Helm 3.1.1.

Expand Down Expand Up @@ -43,22 +43,20 @@ Temporal can be configured to run with various dependencies. The default "Batter

* Cassandra
* Elasticsearch
* Prometheus
* Grafana

The sections that follow describe various deployment configurations, from a minimal one-replica installation using included dependencies, to a replicated deployment on existing infrastructure.

### Minimal installation with required dependencies only

To install Temporal in a limited but working and self-contained configuration (one replica of Cassandra, Elasticsearch and each of Temporal's services, no metrics), you can run:
To install Temporal in a limited but working and self-contained configuration (one replica of Cassandra, Elasticsearch and each of Temporal's services), you can run:

```bash
helm install \
--repo https://go.temporal.io/helm-charts \
--set server.replicaCount=1 \
--set cassandra.config.cluster_size=1 \
--set elasticsearch.replicas=1 \
--set prometheus.enabled=false \
--set grafana.enabled=false \
temporaltest temporal \
--timeout 15m
Expand Down Expand Up @@ -87,7 +85,7 @@ temporaltest-worker-7c9d68f4cf-8tzfw 1/1 Running 2 11m

This method requires a three node kubernetes cluster to successfully bring up all the dependencies.

When installed without manully setting dependency replicas to 1, this Temporal Helm Chart configures Temporal to run with a three node Cassandra cluster (for persistence) and Elasticsearch (for "visibility" features), Prometheus, and Grafana. By default, Temporal Helm Chart installs all dependencies, out of the box.
When installed without manully setting dependency replicas to 1, this Temporal Helm Chart configures Temporal to run with a three node Cassandra cluster (for persistence) and Elasticsearch (for "visibility" features), and Grafana. By default, Temporal Helm Chart installs all dependencies, out of the box.

To install Temporal with all of its dependencies run this command:

Expand All @@ -97,12 +95,11 @@ helm install --repo https://go.temporal.io/helm-charts temporaltest temporal --t

To use your own instance of Elasticsearch, MySQL, PostgreSQL, or Cassandra, please read the "Bring Your Own" sections below.

Other components (Prometheus, Grafana) can be omitted from the installation by setting their corresponding `enable` flag to `false`:
Other components (Grafana) can be omitted from the installation by setting their corresponding `enable` flag to `false`:

```bash
helm install \
--repo https://go.temporal.io/helm-charts \
--set prometheus.enabled=false \
--set grafana.enabled=false \
temporaltest temporal \
--timeout 900s
Expand Down Expand Up @@ -275,7 +272,6 @@ helm install \
-f values/values.archival.filestore.yaml \
--set server.replicaCount=1 \
--set cassandra.config.cluster_size=1 \
--set prometheus.enabled=false \
--set grafana.enabled=false \
--set elasticsearch.enabled=false \
temporaltest temporal \
Expand All @@ -302,7 +298,6 @@ helm install \
-f values/values.elasticsearch.yaml \
--set elasticsearch.enabled=true \
--set grafana.enabled=false \
--set prometheus.enabled=false \
--set server.replicaCount=5 \
--set server.config.persistence.default.cassandra.hosts=cassandra.data.host.example \
--set server.config.persistence.default.cassandra.user=cassandra_user \
Expand Down
4 changes: 0 additions & 4 deletions charts/temporal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ dependencies:
version: "0.14.3"
repository: https://charts.helm.sh/incubator
condition: cassandra.enabled
- name: prometheus
repository: https://prometheus-community.github.io/helm-charts
version: 25.22.0
condition: prometheus.enabled
- name: elasticsearch
repository: https://helm.elastic.co
version: 7.17.3
Expand Down
1 change: 1 addition & 0 deletions charts/temporal/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spec:
{{- if (default $.Values.server.metrics.annotations.enabled $serviceValues.metrics.annotations.enabled) }}
prometheus.io/job: {{ $.Chart.Name }}-{{ $service }}
prometheus.io/scrape: 'true'
prometheus.io/scheme: http
prometheus.io/port: '9090'
{{- end }}
{{- with (default $.Values.server.podAnnotations $serviceValues.podAnnotations) }}
Expand Down
2 changes: 2 additions & 0 deletions charts/temporal/templates/server-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ metadata:
labels:
{{- include "temporal.resourceLabels" (list $ $service "") | nindent 4 }}
app.kubernetes.io/headless: 'true'
{{- if (default $.Values.server.metrics.annotations.enabled $serviceValues.metrics.annotations.enabled) }}
prometheus.io/job: {{ $.Chart.Name }}-{{ $service }}
prometheus.io/scrape: 'true'
prometheus.io/scheme: http
prometheus.io/port: "9090"
{{- end }}

annotations:
# Use this annotation in addition to the actual field below because the
Expand Down
11 changes: 5 additions & 6 deletions charts/temporal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ server:
# Global default settings (can be overridden per service)
replicaCount: 1
metrics:
# Annotate pods directly with Prometheus annotations.
# Use this if you installed Prometheus from a Helm chart.
# Annotate pods and services directly with the following Prometheus annotations.
# prometheus.io/job
# prometheus.io/port
# prometheus.io/scheme
# prometheus.io/scrape
annotations:
enabled: true
# Additional tags to be added to Prometheus metrics
Expand Down Expand Up @@ -405,10 +408,6 @@ elasticsearch:
username: ""
password: ""
visibilityIndex: "temporal_visibility_v1_dev"
prometheus:
enabled: true
nodeExporter:
enabled: false
grafana:
enabled: true
replicas: 1
Expand Down
9 changes: 0 additions & 9 deletions charts/temporal/values/values.antiaffinity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ cassandra:
values:
- elasticsearch-master
topologyKey: kubernetes.io/hostname
- weight: 5
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- prometheus
topologyKey: kubernetes.io/hostname
- weight: 1
podAffinityTerm:
labelSelector:
Expand Down
3 changes: 0 additions & 3 deletions charts/temporal/values/values.postgresql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ mysql:
postgresql:
enabled: true

prometheus:
enabled: true

grafana:
enabled: true

Expand Down
28 changes: 0 additions & 28 deletions charts/temporal/values/values.prometheus.external.yaml

This file was deleted.

0 comments on commit ba57bec

Please sign in to comment.