-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: add metrics for jobset #614
Conversation
✅ Deploy Preview for kubernetes-sigs-jobset ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
The yaml file used is as follows: apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus
namespace: jobset-system
spec:
serviceAccountName: prometheus1
# ServiceMonitor
serviceMonitorSelector:
# label
matchLabels:
control-plane: controller-manager
resources:
requests:
memory: 400Mi
enableAdminAPI: false
---
apiVersion: v1
kind: Service
metadata:
name: prometheus
namespace: jobset-system
spec:
type: NodePort
# kubectl port-forward services/prometheus 39090:9090 --address 0.0.0.0
ports:
- name: web
nodePort: 30900
port: 9090
protocol: TCP
targetPort: web
selector:
prometheus: prometheus
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus1
namespace: jobset-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus1
rules:
- apiGroups: [""]
resources:
- nodes
- nodes/metrics
- services
- endpoints
- pods
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources:
- configmaps
verbs: ["get"]
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs: ["get", "list", "watch"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus1
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus1
subjects:
- kind: ServiceAccount
name: prometheus1
namespace: jobset-system |
@danielvegamyhre /PTAL thanks! |
In addition, I found that the docs does not have very clear steps for combining with prometheus operator. I will submit a PR to supplement it. |
This would be great, thanks! |
@googs1025 in your example/test above, I see your query is for |
done |
ping @danielvegamyhre :) |
Looks good to me. @kannon92 want to do a pass on this as well? |
/lgtm |
/approve Thanks for the great work @googs1025! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danielvegamyhre, googs1025 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fix: #613 (comment)
only add FailedTotal CompletedTotal, two metrics, If more metrics are needed, I will add them