Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions charts/cron-job/templates/cronJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ spec:
{{- end }}
imagePullPolicy: IfNotPresent
ports:
- name: metrics-port
containerPort: {{ .Values.metricsPort }}
{{- if and .Values.metricsPort (ne (int .Values.metricsPort) 0) }}
- name: metrics-port
containerPort: {{ .Values.metricsPort }}
{{- end }}
envFrom:
{{- range $i, $name := .Values.envFrom.configmaps }}
- configMapRef:
Expand Down
4 changes: 3 additions & 1 deletion charts/cron-job/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ spec:
- name: http-port
port: 80
targetPort: {{ .Values.httpPort}}
{{- if and .Values.metricsPort (ne (int .Values.metricsPort) 0) }}
- name: metrics-port
port: 2121
targetPort: {{ .Values.metricsPort}}
targetPort: {{ .Values.metricsPort }}
{{- end }}
selector:
app: {{ .Values.name }}
type: NodePort
Expand Down
4 changes: 3 additions & 1 deletion charts/cron-job/templates/serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ spec:
matchLabels:
app: {{.Values.name}}
endpoints:
{{- if .Values.metricsPort}}
- port: metrics-port
interval: {{.Values.metricsScrapeInterval }}
interval: {{ .Values.metricsScrapeInterval }}
path: /metrics
{{- end }}
---
2 changes: 2 additions & 0 deletions charts/service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ spec:
ports:
- name: http-port
containerPort: {{ .Values.httpPort }}
{{- if and .Values.metricsPort (ne ( int .Values.metricsPort ) 0) }}
- name: metrics-port
containerPort: {{ .Values.metricsPort }}
{{- end }}
{{- range $k, $v := .Values.ports}}
- name: {{ $k }}
containerPort: {{ $v }}
Expand Down
4 changes: 3 additions & 1 deletion charts/service/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ spec:
- name: http-port
port: 80
targetPort: {{ .Values.httpPort}}
{{- if and .Values.metricsPort (ne (int .Values.metricsPort) 0) }}
- name: metrics-port
port: 2121
targetPort: {{ .Values.metricsPort}}
targetPort: {{ .Values.metricsPort }}
{{- end}}
{{- range $k, $v := .Values.ports}}
- name: {{ $k}}
port: {{ $v }}
Expand Down
8 changes: 5 additions & 3 deletions charts/service/templates/serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ spec:
matchLabels:
app: {{.Values.name}}
endpoints:
- port: metrics-port
interval: {{.Values.metricsScrapeInterval }}
path: /metrics
{{- if .Values.metricsPort}}
- port: metrics-port
interval: {{ .Values.metricsScrapeInterval }}
path: /metrics
{{- end }}
---