forked from kubesphere/ks-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: johnniang <[email protected]> Remove unused default variable Signed-off-by: johnniang <[email protected]> Add kubesphere-devops-worker namespace into init-namespaces.yaml Signed-off-by: johnniang <[email protected]> Change namespace with worker for jenkins casc config Signed-off-by: johnniang <[email protected]> Add resourceLimitCpu config for jnlp container Signed-off-by: johnniang <[email protected]> Decrease concurrent limit of jenkins agent Signed-off-by: johnniang <[email protected]> Change namespace for configmap of jenkins-agent-config Signed-off-by: johnniang <[email protected]> Apply resource quota for kubesphere-devops-worker project Signed-off-by: johnniang <[email protected]> Recalculate devops worker resource quota Signed-off-by: johnniang <[email protected]> Add alert rules for devops Signed-off-by: johnniang <[email protected]> Add newline at end of file Signed-off-by: johnniang <[email protected]> Re-check JenkinsUpgradeGuide.md Signed-off-by: johnniang <[email protected]> Re-adjust quota config of worker namespace Signed-off-by: johnniang <[email protected]> Add kubesphere-devops-worker into deletion candidate Signed-off-by: johnniang <[email protected]> Correct resource name by following k8s naming rule Signed-off-by: johnniang <[email protected]> Format block block in main.yaml Signed-off-by: johnniang <[email protected]> Add migration documentation about ks-devops-config configmap Signed-off-by: johnniang <[email protected]> Add some tip for upgrade guide Signed-off-by: johnniang <[email protected]> Make jenkins-too-many-failure-jobs alert more clear Signed-off-by: johnniang <[email protected]> Refine upgrade cover declaration Signed-off-by: johnniang <[email protected]> Refine jenkins alert rules Signed-off-by: johnniang <[email protected]>
- Loading branch information
Showing
9 changed files
with
177 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
roles/ks-devops/jenkins/templates/worker-resourcequota.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
kind: ResourceQuota | ||
metadata: | ||
name: kubesphere-devops-worker | ||
namespace: kubesphere-devops-worker | ||
spec: | ||
hard: | ||
limits.cpu: "9" | ||
limits.memory: 19Gi |
50 changes: 50 additions & 0 deletions
50
roles/ks-monitor/files/prometheus/devops/prometheus-jenkinsAlertRules.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
labels: | ||
custom-alerting-rule-level: cluster | ||
role: thanos-alerting-rules | ||
thanosruler: thanos-ruler | ||
name: prometheus-devops-rules | ||
namespace: kubesphere-monitoring-system | ||
spec: | ||
groups: | ||
- name: devops.jenkins.rules | ||
rules: | ||
- alert: jenkins-cpu-overcommit | ||
annotations: | ||
summary: >- | ||
Jenkins({{ $labels.instance }}) process has overcommitted CPU resource requests. | ||
expr: > | ||
sum(rate(process_cpu_seconds_total{container="ks-jenkins", namespace="kubesphere-devops-system"}[5m])) by (container, instance) | ||
> 0.8 | ||
for: 5m | ||
labels: | ||
alerttype: metric | ||
severity: warning | ||
- alert: jenkins-down | ||
annotations: | ||
message: Jenkins has disppeared from Prometheus target discovery. | ||
expr: absent(default_jenkins_up) | ||
for: 5m | ||
labels: | ||
alerttype: metric | ||
severity: critical | ||
- alert: jenkins-too-many-stuck-jobs | ||
annotations: | ||
summary: Jenkins has too many stuck jobs. | ||
message: Jenkins has more than 10 stuck jobs({{ $value | humanize }}) in the past 5 minutes. Please have an inspection about jenkins. | ||
expr: avg_over_time(jenkins_queue_size_value[5m]) > 10 | ||
for: 5m | ||
labels: | ||
alerttype: metric | ||
severity: warning | ||
- alert: jenkins-too-many-failure-jobs | ||
annotations: | ||
summary: Jenkins has too many failed jobs. | ||
message: Jenkins has more than 5 failed jobs({{ $value | humanize }}) in the past 5 minutes. | ||
expr: increase(jenkins_runs_failure_total{namespace='kubesphere-devops-system', container='ks-jenkins', job='ks-jenkins'}[5m]) > 5 | ||
for: 5m | ||
labels: | ||
alerttype: metric | ||
severity: warning |
21 changes: 21 additions & 0 deletions
21
roles/ks-monitor/files/prometheus/devops/prometheus-serviceMonitorJenkins.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
labels: | ||
k8s-app: ks-jenkins | ||
app.kubernetes.io/vendor: kubesphere | ||
name: ks-jenkins | ||
namespace: kubesphere-monitoring-system | ||
spec: | ||
endpoints: | ||
- honorLabels: true | ||
interval: 1m | ||
port: http | ||
path: /prometheus/ | ||
jobLabel: k8s-app | ||
namespaceSelector: | ||
matchNames: | ||
- kubesphere-devops-system | ||
selector: | ||
matchLabels: | ||
app: ks-jenkins |
Oops, something went wrong.