Skip to content

Commit

Permalink
Remove CPUThrottlingHigh as it was previously removed in #43
Browse files Browse the repository at this point in the history
  • Loading branch information
nandajavarma committed Aug 26, 2021
1 parent 18fc553 commit 04f2676
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 18 deletions.
2 changes: 1 addition & 1 deletion katalog/metrics-server/rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ rules:
resources:
- pods
- nodes
- nodes/stats
- nodes/metrics
- namespaces
- configmaps
verbs:
Expand Down
13 changes: 0 additions & 13 deletions katalog/prometheus-operated/kubernetes-monitoring-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -337,19 +337,6 @@ spec:
for: 15m
labels:
severity: warning
- alert: CPUThrottlingHigh
annotations:
description: '{{ $value | humanizePercentage }} throttling of CPU in namespace {{ $labels.namespace }} for container {{ $labels.container }} in pod {{ $labels.pod }}.'
runbook_url: https://runbooks.prometheus-operator.dev/runbooks/kubernetes/cputhrottlinghigh
summary: Processes experience elevated CPU throttling.
expr: |
sum(increase(container_cpu_cfs_throttled_periods_total{container!="", }[5m])) by (container, pod, namespace)
/
sum(increase(container_cpu_cfs_periods_total{}[5m])) by (container, pod, namespace)
> ( 25 / 100 )
for: 15m
labels:
severity: info
- name: kubernetes-storage
rules:
- alert: KubePersistentVolumeFillingUp
Expand Down
37 changes: 33 additions & 4 deletions katalog/tests/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,44 @@

load ./helper

@test "Applying prometheus-operator, cert-manager CRDs and cert-manager" {
@test "Applying ServiceMonitor CRDs" {
info
setup() {
kubectl apply -f katalog/prometheus-operator/crd-servicemonitor.yml
kubectl apply -f https://raw.githubusercontent.com/sighupio/fury-kubernetes-ingress/v1.11.0-rc/katalog/cert-manager/cert-manager-controller/crd.yml
apply "github.com/sighupio/fury-kubernetes-ingress.git//katalog/cert-manager/?ref=v1.11.0-rc"
}
loop_it setup 60 10
status=${loop_it_result:?}
[ "$status" -eq 0 ]
}

@test "Applying cert-manager CRDs" {
info
setup() {
kubectl apply -f https://raw.githubusercontent.com/sighupio/fury-kubernetes-ingress/v1.11.0-rc2/katalog/cert-manager/cert-manager-controller/crd.yml
}
loop_it setup 60 10
status=${loop_it_result:?}
[ "$status" -eq 0 ]
}

@test "Applying cert-manager" {
info
setup() {
apply "github.com/sighupio/fury-kubernetes-ingress/katalog/cert-manager?ref=v1.11.0-rc2"
}
loop_it setup 60 10
status=${loop_it_result:?}
[ "$status" -eq 0 ]
}

@test "cert-manager is Running" {
info
test() {
kubectl get pods -l app=cert-manager -o json -n cert-manager | jq '.items[].status.containerStatuses[].ready' | uniq | grep -q true
}
loop_it test 60 10
status=${loop_it_result:?}
[ "$status" -eq 0 ]
}

@test "Deploy prometheus-operator" {
Expand Down Expand Up @@ -145,7 +174,7 @@ load ./helper
deploy() {
apply katalog/metrics-server
}
run deploy
loop_it deploy 60 10
[ "$status" -eq 0 ]
}

Expand Down

0 comments on commit 04f2676

Please sign in to comment.