Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flagger exposed metrics not visible on Prometheus #1482

Closed
tyagian opened this issue Aug 17, 2023 · 3 comments
Closed

Flagger exposed metrics not visible on Prometheus #1482

tyagian opened this issue Aug 17, 2023 · 3 comments

Comments

@tyagian
Copy link
Contributor

tyagian commented Aug 17, 2023

I can see Flagger exposed metrics on flagger-pod:8080/metrics but I don't see those on Prometheus. Prometheus is running in a different namespace. But I have mentioned correct labels in servicemonitor. I also enabled podmonitor in Flagger. What should be namespace for podmonitor?
I can't find what I am missing.

`
image:
repository: ghcr.io/fluxcd/flagger
tag: 1.32.0
pullPolicy: IfNotPresent
pullSecret:

logLevel: info

podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
appmesh.k8s.aws/sidecarInjectorWebhook: disabled
linkerd.io/inject: disabled

podPriorityClassName: ""

metricsServer: "http://prometheus.url.com"

serviceMonitor:
enabled: true
namespace: prometheus-operator
labels:
prometheus: default

meshProvider: "nginx"

namespace: ""

selectorLabels: ""

configTracking:
enabled: true

ingressAnnotationsPrefix: ""

ingressClass: "ingress"

securityContext:
enabled: true
context:
readOnlyRootFilesystem: true
runAsUser: 10001

clusterName: ""

podMonitor:
enabled: true
namespace:
interval: 15s
additionalLabels: {}

env: []

leaderElection:
enabled: false
replicaCount: 1

serviceAccount:
create: true
name: "flagger"
annotations: {}

rbac:
create: true
pspEnabled: false

crd:
create: false

linkerdAuthPolicy:
create: false
namespace: linkerd-viz

nameOverride: ""
fullnameOverride: ""

resources:
limits:
memory: "512Mi"
cpu: "1000m"
requests:
memory: "32Mi"
cpu: "10m"

nodeSelector: {}

tolerations: []

affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/name: '{{ template "flagger.name" . }}'
app.kubernetes.io/instance: '{{ .Release.Name }}'
topologyKey: kubernetes.io/hostname

prometheus:
install: false
image: docker.io/prom/prometheus:v2.41.0
pullSecret:
retention: 2h
securityContext:
enabled: false
context:
readOnlyRootFilesystem: true
runAsUser: 10001

kubeconfigQPS: ""
kubeconfigBurst: ""

controlplane:
kubeconfig:
secretName: ""
key: "kubeconfig"

podDisruptionBudget:
enabled: false
minAvailable: 1

podLabels: {}

noCrossNamespaceRefs: false

additionalVolumes: {}

@tyagian
Copy link
Contributor Author

tyagian commented Aug 17, 2023

I have mentioned our prometheus external url as metricsServer name. What should be the namespace in podMonitor?
My service, servicemonitor annotation labels and selector labels are also same (by default).

I don't see Flagger in Prometheus service discovery .

@tyagian
Copy link
Contributor Author

tyagian commented Aug 17, 2023

I disabled rbac also but no change.

@tyagian
Copy link
Contributor Author

tyagian commented Aug 27, 2023

I found a fix during debugging this and created a PR: #1483

Hence, closing this issue.

@tyagian tyagian closed this as completed Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant