diff --git a/manifests/loki/deployment.yaml b/manifests/loki/deployment.yaml index 9cfcb74..f78b04e 100644 --- a/manifests/loki/deployment.yaml +++ b/manifests/loki/deployment.yaml @@ -22,6 +22,7 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 3100 + name: http volumeMounts: - name: loki-pv mountPath: /loki diff --git a/manifests/loki/kustomization.yaml b/manifests/loki/kustomization.yaml index 4ff51b4..b741fd1 100644 --- a/manifests/loki/kustomization.yaml +++ b/manifests/loki/kustomization.yaml @@ -5,4 +5,5 @@ resources: - pvc.yaml - configmap.yaml - service.yaml + - servicemonitor.yaml - deployment.yaml diff --git a/manifests/loki/service.yaml b/manifests/loki/service.yaml index 6ca5c92..c35d5cd 100644 --- a/manifests/loki/service.yaml +++ b/manifests/loki/service.yaml @@ -3,6 +3,8 @@ kind: Service metadata: name: loki-svc namespace: monitoring + labels: + app.kubernetes.io/name: loki spec: ports: - name: http diff --git a/manifests/loki/servicemonitor.yaml b/manifests/loki/servicemonitor.yaml new file mode 100644 index 0000000..1cf89b2 --- /dev/null +++ b/manifests/loki/servicemonitor.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: loki + namespace: monitoring + labels: + team: core +spec: + selector: + matchLabels: + app.kubernetes.io/name: loki + endpoints: + - port: http + path: /metrics