Skip to content

Commit 4923e8b

Browse files
authored
Fixed duplicate data in metrics. (#52)
The port infomration in the network policy is modified.
1 parent 5cc4a72 commit 4923e8b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

charts/eric-oss-hello-world-python-app/templates/deployment/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
{{- if not (semverCompare ">=1.30.0" .Capabilities.KubeVersion.GitVersion) }}
4040
container.apparmor.security.beta.kubernetes.io/eric-oss-hello-world-python-app: {{ include "eric-oss-hello-world-python-app.appArmorProfileAnnotation" . | default "runtime/default" }}
4141
{{- end }}
42-
prometheus.io/port: "{{ .Values.service.port }}"
42+
prometheus.io/port: '{{ index .Values.service "http-port" }}'
4343
prometheus.io/scrape: "{{ .Values.prometheus.scrape }}"
4444
prometheus.io/path: "{{ .Values.prometheus.path }}"
4545
{{- include "eric-oss-hello-world-python-app.product-info" . | indent 8 }}

charts/eric-oss-hello-world-python-app/templates/network-policy/network-policy.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@ spec:
2525
matchLabels:
2626
app: eric-pm-server
2727
ports:
28-
- port: {{ .Values.service.port }}
28+
- protocol: TCP
29+
port: {{ index .Values.service "http-port" }}
30+
- protocol: TCP
31+
port: {{ index .Values.service "https-port" }}
2932

0 commit comments

Comments
 (0)