Skip to content

Commit

Permalink
Enable metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben Vargas <[email protected]>
  • Loading branch information
rubenvp8510 committed Feb 10, 2022
1 parent 06f6880 commit e70ac84
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ bundle-build: ## Build the bundle image.

.PHONY: bundle-push
bundle-push: ## Push the bundle image.
$(MAKE) docker-push IMG=$(BUNDLE_IMG)
docker push $(BUNDLE_IMG)

.PHONY: opm
OPM = ./bin/opm
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
name: jaeger-operator
name: jaeger-operator-metrics-monitor
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
interval: 30s
path: /metrics
scheme: https
scrapeTimeout: 10s
targetPort: 8443
tlsConfig:
insecureSkipVerify: true
selector:
matchLabels:
app.kubernetes.io/component: metrics
name: jaeger-operator
2 changes: 1 addition & 1 deletion bundle/manifests/jaeger-operator-metrics_v1_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Service
metadata:
creationTimestamp: null
labels:
control-plane: jaeger-operator
app.kubernetes.io/component: metrics
name: jaeger-operator
name: jaeger-operator-metrics
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ bases:
- ../webhook
- ../certmanager
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
#- ../prometheus
- ../prometheus

patchesStrategicMerge:
# Protect the /metrics endpoint by putting it behind auth.
Expand Down
3 changes: 2 additions & 1 deletion config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
control-plane: controller-manager
name: jaeger-operator
name: jaeger-operator-metrics-monitor
spec:
endpoints:
Expand All @@ -19,3 +19,4 @@ spec:
selector:
matchLabels:
name: jaeger-operator
app.kubernetes.io/component: metrics
3 changes: 2 additions & 1 deletion config/rbac/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ apiVersion: v1
kind: Service
metadata:
labels:
control-plane: jaeger-operator
name: jaeger-operator
app.kubernetes.io/component: metrics
name: jaeger-operator-metrics
spec:
ports:
Expand Down
1 change: 1 addition & 0 deletions tests/templates/kuttl-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ artifactsDir: ../../_build/artifacts/
commands:
- script: cd ../../.. && make cert-manager
- script: kubectl create namespace observability 2>&1 | grep -v "already exists" || true
- command: make deploy-prometheus-operator
- command: kubectl apply -f ../../_build/manifests/01-jaeger-operator.yaml -n observability
- command: kubectl wait --timeout=5m --for=condition=available deployment jaeger-operator -n observability
- command: kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.1/deploy/static/provider/kind/deploy.yaml
Expand Down

0 comments on commit e70ac84

Please sign in to comment.