charmed-lma / charm-k8s-prometheus

Kubernetes Operator for Prometheus
Apache License 2.0
4 stars 2 forks source link

Prometheus is ignoring advertised-port config option #8

Closed exceptorr closed 4 years ago

exceptorr commented 4 years ago
$ juju config prom advertised-port

9111
NAME                           READY   STATUS             RESTARTS   AGE
pod/grafana-7d6497b77b-kn72t   1/1     Running            0          9m44s
pod/grafana-operator-0         1/1     Running            0          11m
pod/prom-0                     1/1     Running            0          12m
pod/prom-1                     1/1     Running            0          12m
pod/prom-2                     0/1     CrashLoopBackOff   5          6m45s
pod/prom-operator-0            1/1     Running            0          13m

NAME                       TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)     AGE
service/grafana            ClusterIP   10.152.183.131   <none>        3000/TCP    11m
service/grafana-operator   ClusterIP   10.152.183.121   <none>        30666/TCP   11m
service/prom               ClusterIP   10.152.183.120   <none>        9111/TCP    12m
service/prom-endpoints     ClusterIP   None             <none>        <none>      12m
service/prom-operator      ClusterIP   10.152.183.190   <none>        30666/TCP   13m

from the kubectl describe pod:

Warning  Unhealthy  54s (x4 over 114s)   kubelet, node10    Liveness probe failed: Get "http://10.1.28.216:9111/-/healthy": dial tcp 10.1.28.216:9111: connect: connection refused

Warning  Unhealthy  46s (x9 over 2m16s)  kubelet, node10    Readiness probe failed: Get "http://10.1.28.216:9111/-/ready": dial tcp 10.1.28.216:9111: connect: connection refused

Testing:

$ kubectl exec -it pod/prom-2 -n lma -- /bin/sh
/prometheus $ 
/prometheus $ telnet 127.0.0.1 9111
telnet: can't connect to remote host (127.0.0.1): Connection refused
/prometheus $ telnet 127.0.0.1 9090
Connected to 127.0.0.1
^]^C
exceptorr commented 4 years ago

Closing, as the port is not configurable anymore.