Skip to content

Commit

Permalink
Changes to the monitoring variables
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvolkmann committed Dec 2, 2024
1 parent e0423a1 commit 73099b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion control-plane/roles/monitoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The following variables can be set to configure the role:
| prometheus_chart_version | yes | version of the prometheus stack chart |
| prometheus_stack_repo | yes | chart of the prometheus stack |
| monitoring_namespace | | Name of the monitoring namespace |
| monitoring_ingress_grafana_tls | | If enabled, exposes Grafana through HTTPS on the ingress |
| monitoring_grafana_ingress_tls | | If enabled, exposes Grafana through HTTPS on the ingress |
| monitoring_grafana_ingress_dns | | The dns name used for exposing Grafana via ingress |
| monitoring_prometheus_ingress_dns | | If enabled, exposes Prometheus through HTTPS on the ingress |
| monitoring_prometheus_image_tag | | Prometheus container image tag, defaults to chart's default |
Expand Down
8 changes: 6 additions & 2 deletions control-plane/roles/monitoring/defaults/main/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ monitoring_grafana_additional_datasources:
jsonData:
maxLines: 1000
monitoring_grafana_ingress_dns: "grafana.{{ metal_control_plane_ingress_dns }}"
monitoring_grafana_ingress_tls: true
monitoring_grafana_github_oauth:
monitoring_grafana_extra_secret_mounts:

monitoring_prometheus_ingress_dns: prometheus.{{ metal_control_plane_ingress_dns }}
monitoring_ingress_grafana_tls: yes
monitoring_prometheus_ingress_enabled: false

monitoring_additional_ingress_annotations: {}

monitoring_thanos_receive_ingress_dns: "monitoring.{{ metal_control_plane_ingress_dns }}"
Expand All @@ -27,7 +31,7 @@ monitoring_prometheus_operator_enabled: true

monitoring_alertmanager_ingress_enabled: true
monitoring_alertmanager_ingress_dns: "alert.{{ metal_control_plane_ingress_dns }}"
monitoring_alertmanager_ingress_tls: yes
monitoring_alertmanager_ingress_tls: true
monitoring_alertmanager_ingress_basic_auth_user: alertmanager
monitoring_alertmanager_ingress_basic_auth_password:
monitoring_alertmanager_ingress_basic_auth_password_salt: "{{ monitoring_alertmanager_ingress_basic_auth_password | hash('sha1') | truncate(22, True, '') }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ grafana:
additionalDataSources: {{ monitoring_grafana_additional_datasources | to_json }}
grafana.ini:
server:
{% if monitoring_ingress_grafana_tls %}
{% if monitoring_grafana_ingress_tls %}
root_url: https://{{ monitoring_grafana_ingress_dns }}
{% else %}
root_url: http://{{ monitoring_grafana_ingress_dns }}
{% endif %}
{% if monitoring_grafana_github_oauth is defined %}
{% if monitoring_grafana_github_oauth %}
auth.github: {{ monitoring_grafana_github_oauth | to_json }}
{% endif %}
{% if monitoring_grafana_extra_secret_mounts %}
Expand All @@ -62,16 +62,16 @@ grafana:
ingressClassName: nginx
hosts:
- {{ monitoring_grafana_ingress_dns }}
{% if monitoring_ingress_grafana_tls %}
{% if monitoring_grafana_ingress_tls %}
tls:
- secretName: monitoring-ingress-tls
hosts:
- {{ monitoring_grafana_ingress_dns }}
{% endif %}
{% if monitoring_ingress_grafana_tls or monitoring_additional_ingress_annotations %}
{% if monitoring_grafana_ingress_tls or monitoring_additional_ingress_annotations %}
annotations:
{% endif %}
{% if monitoring_ingress_grafana_tls %}
{% if monitoring_grafana_ingress_tls %}
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
{% endif %}
Expand Down

0 comments on commit 73099b2

Please sign in to comment.