Skip to content

Commit

Permalink
[charts/sn-platform] Add prometheus pod name to sts env (#1087)
Browse files Browse the repository at this point in the history
* fix repeat ca tag

When specify certs.internalal_issuer.typ = secret, the output of issuer
spec:
  ca:ca:
      secretName: root-ca-secret

* Update tls-cert-internal-issuer.yaml

fix syntax

* add external labels

* fix the var naming

* pod_name is required for prometheus ha detector

* missed curly quotes

* remove test

---------

Co-authored-by: Eric Shen <[email protected]>
(cherry picked from commit bfe9657)
  • Loading branch information
yuweisung authored and ericsyh committed Oct 31, 2023
1 parent 7dfd370 commit f55a2c3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ data:
prometheus.yml: |
global:
scrape_interval: {{ .Values.prometheus.scrapeInterval }}
{{- if .Values.prometheus.externalLabels }}
external_labels:
{{ toYaml .Values.prometheus.externalLabels | indent 8 }}
{{- end }}
{{- if .Values.monitoring.alert_manager }}
rule_files:
- 'rules.yml'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ spec:
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}"
image: "{{ .Values.images.prometheus.repository }}:{{ .Values.images.prometheus.tag }}"
imagePullPolicy: {{ .Values.images.prometheus.pullPolicy }}
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
{{- if .Values.prometheus.resources }}
resources:
{{ toYaml .Values.prometheus.resources | indent 10 }}
Expand Down
1 change: 1 addition & 0 deletions charts/sn-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,7 @@ prometheus:
# https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects
- --storage.tsdb.wal-compression
scrapeInterval: 15s
externalLabels: {}
securityContext:
runAsUser: 65534
runAsNonRoot: true
Expand Down

0 comments on commit f55a2c3

Please sign in to comment.