Skip to content
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
2 changes: 1 addition & 1 deletion addons/porter-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ version: 0.50.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "3.4.3"
appVersion: "3.4.4"
dependencies:
- name: "loki"
repository: "https://chart-addons.getporter.dev"
Expand Down
2 changes: 1 addition & 1 deletion addons/porter-agent/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
agent:
image: "ghcr.io/porter-dev/releases/porter-agent:3.4.3"
image: "ghcr.io/porter-dev/releases/porter-agent:3.4.4"
cfAccessToken: ""
porterHost: "dashboard.porter.run"
porterPort: "80"
Expand Down
6 changes: 6 additions & 0 deletions applications/web/templates/deployment-blue-green-legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ spec:
- name: http
containerPort: {{ $.Values.container.port }}
protocol: TCP
{{- if and .Values.metricsScraping.enabled (ne .Values.metricsScraping.port .Values.container.port) }}
# if metrics scraping is enabled and the port is not the same as the container port, add a metrics port
- name: metrics
containerPort: {{ .Values.metricsScraping.port }}
protocol: TCP
{{- end }}
{{- range $.Values.container.extraPorts }}
- name: {{ .name }}
containerPort: {{ .containerPort }}
Expand Down
6 changes: 6 additions & 0 deletions applications/web/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ spec:
- name: http
containerPort: {{ .Values.container.port }}
protocol: TCP
{{- if and .Values.metricsScraping.enabled (ne .Values.metricsScraping.port .Values.container.port) }}
# if metrics scraping is enabled and the port is not the same as the container port, add a metrics port
- name: metrics
containerPort: {{ .Values.metricsScraping.port }}
protocol: TCP
{{- end }}
{{- range .Values.container.extraPorts }}
- name: {{ .name }}
containerPort: {{ .containerPort }}
Expand Down
19 changes: 16 additions & 3 deletions applications/web/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ metadata:
{{- if .Values.labels }}
{{- toYaml .Values.labels | nindent 4 }}
{{- end }}
{{- if .Values.service.annotations }}
{{- if gt (len .Values.service.annotations) 0}}
{{- if or .Values.metricsScraping.enabled (and .Values.service.annotations (gt (len .Values.service.annotations) 0)) }}
annotations:
{{- if .Values.metricsScraping.enabled }}
porter.prometheus/scrape: "true"
porter.prometheus/port: {{ .Values.metricsScraping.port | quote }}
porter.prometheus/path: {{ .Values.metricsScraping.path | quote }}
porter.prometheus/scheme: "http"
{{- end }}
{{- if and .Values.service.annotations (gt (len .Values.service.annotations) 0) }}
{{- range $k, $v := .Values.service.annotations }}
{{ $k }}: {{ $v | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
spec:
{{ if or .Values.ingress.enabled .Values.albIngress.enabled .Values.customNodePort.enabled }}
Expand All @@ -32,6 +38,13 @@ spec:
{{- else if .Values.customNodePort.enabled }}
nodePort: {{ .Values.customNodePort.port }}
{{- end }}
{{- if and .Values.metricsScraping.enabled (ne .Values.metricsScraping.port .Values.service.port) }}
# add metrics scraping port if metrics scraping is enabled and the port is not the same as the service port
- port: {{ .Values.metricsScraping.port }}
targetPort: metrics
protocol: TCP
name: metrics
{{- end }}
{{- range .Values.service.extraPorts }}
- port: {{ .port }}
targetPort: {{ .targetPort }}
Expand Down
6 changes: 6 additions & 0 deletions applications/web/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,9 @@ fileSecretMounts:
mounts: []

nodeGroups: []


metricsScraping:
enabled: false
port: 80
path: "/metrics"
Loading