Skip to content

Commit

Permalink
feat: update helm structure and resolve issues with unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Jul 29, 2024
1 parent d371152 commit c75a59c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions charts/nats-blackbox-exporter/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ data:
level: {{ .Values.logLevel | quote}}
nats:
streams: {{ .Values.nats.streams | toYaml | nindent 8 }}
url: nats://{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local:4222
url: {{ tpl (.Values.nats.url | toString) $ }}
publish_interval: {{ .Values.nats.publish_interval | quote }}
request_timeout: {{ .Values.nats.request_timeout | quote }}
max_pub_acks_inflight: {{ .Values.nats.rmax_pub_acks_inflight | quote }}
Expand All @@ -17,5 +17,5 @@ data:
new_stream_allow: {{ .Values.nats.new_stream_allow }}
metric:
server:
address: ":8080"
enabled: true
address: ":{{ .Values.metrics.port | default 8080 }}"
enabled: true
4 changes: 3 additions & 1 deletion charts/nats-blackbox-exporter/templates/pod-monitor.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.podMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
Expand All @@ -9,4 +10,5 @@ spec:
matchLabels:
{{- include "blackbox-exporter.selectorLabels" . | nindent 6 }}
podMetricsEndpoints:
- port: metrics
- port: metrics
{{ end }}
10 changes: 7 additions & 3 deletions charts/nats-blackbox-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ resources:
cpu: 100m
memory: 128Mi

metrics:
port: 8080
livenessProbe:
httpGet:
path: /metrics
Expand All @@ -47,14 +45,20 @@ readinessProbe:

logLevel: debug

podMonitor:
enabled: true

nats:
streams:
- name: "stream"
subject: "test"
url: "localhost:4222"
url: nats://{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local:4222
publish_interval: 2s
request_timeout: 50ms
max_pub_acks_inflight: 1000
queue_subscription_group: "group"
flush_timeout: 2s
new_stream_allow: false

metrics:
port: 8080

0 comments on commit c75a59c

Please sign in to comment.