diff --git a/app-server/subprojects/deploying_apps/scc_server/src/main/resources/application.yaml b/app-server/subprojects/deploying_apps/scc_server/src/main/resources/application.yaml index 6ec20f590..de9b69941 100644 --- a/app-server/subprojects/deploying_apps/scc_server/src/main/resources/application.yaml +++ b/app-server/subprojects/deploying_apps/scc_server/src/main/resources/application.yaml @@ -35,6 +35,11 @@ management: exposure: include: info,health,prometheus metrics: + distribution: + percentiles-histogram: + http: + server: + requests: true # for latency percentile observability web: server: auto-time-requests: true @@ -42,6 +47,7 @@ management: server: port: 18080 + scc: environment: local diff --git a/infra/helm/monitoring/Chart.lock b/infra/helm/monitoring/Chart.lock index 8407ffd43..c51a078b1 100644 --- a/infra/helm/monitoring/Chart.lock +++ b/infra/helm/monitoring/Chart.lock @@ -1,3 +1,6 @@ -dependencies: [] -digest: sha256:643d5437104296e21d906ecb15b2c96ad278f20cfc4af53b12bb6069bd853726 -generated: "2024-11-22T22:57:18.411962+09:00" +dependencies: +- name: kube-prometheus-stack + repository: https://prometheus-community.github.io/helm-charts + version: 66.2.2 +digest: sha256:7855ecc0807d0beaeeebd461445c9240083915f5aa0941890f3b1139b6c42603 +generated: "2024-11-24T13:38:41.182278+09:00" diff --git a/infra/helm/monitoring/Chart.yaml b/infra/helm/monitoring/Chart.yaml index f105d5b6c..fcf6502c8 100644 --- a/infra/helm/monitoring/Chart.yaml +++ b/infra/helm/monitoring/Chart.yaml @@ -22,4 +22,7 @@ version: 0.1.0 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. appVersion: "1.16.0" -dependencies: [] +dependencies: + - name: kube-prometheus-stack + version: 66.2.2 + repository: https://prometheus-community.github.io/helm-charts diff --git a/infra/helm/monitoring/values.yaml b/infra/helm/monitoring/values.yaml new file mode 100644 index 000000000..d322d55de --- /dev/null +++ b/infra/helm/monitoring/values.yaml @@ -0,0 +1,15 @@ +kube-prometheus-stack: + grafana: + ingress: + enabled: true + + hosts: + - grafana.staircrusher.club + + # https://github.com/prometheus-operator/kube-prometheus/issues/1392#issuecomment-1411719953 + prometheus: + prometheusSpec: + ruleSelectorNilUsesHelmValues: false + serviceMonitorSelectorNilUsesHelmValues: false + podMonitorSelectorNilUsesHelmValues: false + probeSelectorNilUsesHelmValues: false diff --git a/infra/helm/scc-server/templates/service-monitor.yaml b/infra/helm/scc-server/templates/service-monitor.yaml index 73c919940..c32040ff2 100644 --- a/infra/helm/scc-server/templates/service-monitor.yaml +++ b/infra/helm/scc-server/templates/service-monitor.yaml @@ -10,3 +10,4 @@ spec: app.kubernetes.io/name: {{ include "scc-server.name" . }} endpoints: - port: metrics + path: /actuator/prometheus diff --git a/infra/terraform/k3s/lightsail_lb.tf b/infra/terraform/k3s/lightsail_lb.tf index 6dbf0ef0e..149dacb6a 100644 --- a/infra/terraform/k3s/lightsail_lb.tf +++ b/infra/terraform/k3s/lightsail_lb.tf @@ -21,6 +21,7 @@ import { id = "scc_lb,star.staircrusher.club" } +// NOTE: 실제 DNS record는 AWS lightsail console에서 직접 수정해야 한다. resource "aws_lightsail_lb_certificate" "scc_lb_cert" { name = "star.staircrusher.club" lb_name = aws_lightsail_lb.scc_lb.id