Skip to content

Commit

Permalink
✨ Expose Hub metrics (#240) (#241)
Browse files Browse the repository at this point in the history
This exposes the Hub's prometheus metrics via an additional port on the
existing Hub service. This is necessary to properly implement
https://issues.redhat.com/projects/MTA/issues/MTA-402.

Related to konveyor/tackle2-hub#335

Signed-off-by: Sam Lucidi <[email protected]>
  • Loading branch information
mansam committed Jun 5, 2023
1 parent 03afa6c commit f71f3e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/tackle/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ hub_port: "{{ '8443' if hub_tls_enabled | bool else '8080' }}"
hub_proto: "{{ 'https' if hub_tls_enabled | bool else 'http' }}"
hub_url: "{{ hub_proto }}://{{ hub_service_name }}.{{ app_namespace }}.svc:{{ hub_port }}"
hub_log_level: 3
hub_metrics_enabled: true
hub_metrics_port: "2112"

pathfinder_database_image_fqin: "{{ lookup('env', 'RELATED_IMAGE_PATHFINDER_DATABASE') }}"
pathfinder_database_name: "pathfinder"
Expand Down
4 changes: 4 additions & 0 deletions roles/tackle/templates/deployment-hub.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ spec:
secretKeyRef:
name: "{{ hub_secret_name }}"
key: addon_token
- name: METRICS_ENABLED
value: "{{ hub_metrics_enabled }}"
- name: METRICS_PORT
value: "{{ hub_metrics_port }}"
{% if feature_auth_required|bool and feature_auth_type == "keycloak" %}
- name: AUTH_REQUIRED
value: "true"
Expand Down
4 changes: 4 additions & 0 deletions roles/tackle/templates/service-hub.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ spec:
port: {{ hub_port }}
targetPort: {{ hub_port }}
protocol: TCP
- name: metrics
port: {{ hub_metrics_port }}
targetPort: {{ hub_metrics_port }}
protocol: TCP
selector:
app.kubernetes.io/name: {{ hub_service_name }}
app.kubernetes.io/component: {{ hub_component_name }}
Expand Down

0 comments on commit f71f3e6

Please sign in to comment.