Closed XBaith closed 1 week ago
In this PR, can we simply handle the problem and only adapt helm charts for promethues?
metricReporters:
promethues-exporter:
enabled: true
port: 7001
properties: ~
and in deployment.yaml
ports:
- name: rest
containerPort: {{ .Values.server.rest.port }}
- name: table
containerPort: {{ .Values.server.table.port }}
- name: optimizing
containerPort: {{ .Values.server.optimizing.port }}
{{- include "amoro.pod.container.ports" . | nindent 8 }}
and we can manager port in _pod.tpl
{{- define "amoro.pod.container.ports" -}}
- name: rest
containerPort: {{ .Values.server.rest.port }}
- name: table
containerPort: {{ .Values.server.table.port }}
- name: optimizing
containerPort: {{ .Values.server.optimizing.port }}
{{- if .Values.metricRepoerters.promethuesExporter.enabled -}}
- name: promethues
containerPort: {{ .Values.metricRepoerters.promethuesExporter.port }}
{{- end -}}
{{- end -}}
@baiyangtx PTAL
Thanks for the work. @XBaith Thanks for the review. @baiyangtx
Why are the changes needed?
Close #2932 .
Brief change log
How was this patch tested?
[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
[ ] Add screenshots for manual tests if appropriate
[x] Run test locally before making a pull request
Documentation