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

update loki manifests to use cluster default SC #263

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/lokistack-1x-exsmall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ spec:
name: s3-secret
type: s3
size: 1x.extra-small
storageClassName: gp2
storageClassName: ${DEFAULT_SC}
2 changes: 1 addition & 1 deletion scripts/lokistack-1x-medium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ spec:
name: s3-secret
type: s3
size: 1x.medium
storageClassName: gp2
storageClassName: ${DEFAULT_SC}
2 changes: 1 addition & 1 deletion scripts/lokistack-1x-small.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ spec:
name: s3-secret
type: s3
size: 1x.small
storageClassName: gp2
storageClassName: ${DEFAULT_SC}
5 changes: 4 additions & 1 deletion scripts/netobserv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ deploy_lokistack() {
# create s3 secret for loki
$WORKSPACE/ocp-qe-perfscale-ci/scripts/deploy-loki-aws-secret.sh
oc wait --timeout=180s --for=condition=ready pod -l app.kubernetes.io/name=loki-operator -n openshift-operators-redhat
export DEFAULT_SC=$(oc get storageclass -o=jsonpath='{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io/is-default-class=="true")].metadata.name}')
if [[ "${LOKISTACK_SIZE}" == "1x.extra-small" ]]; then
LokiStack_CONFIG=$WORKSPACE/ocp-qe-perfscale-ci/scripts/lokistack-1x-exsmall.yaml
elif [[ "${LOKISTACK_SIZE}" == "1x.small" ]]; then
Expand All @@ -90,7 +91,9 @@ deploy_lokistack() {
else
LokiStack_CONFIG=$WORKSPACE/ocp-qe-perfscale-ci/scripts/lokistack-1x-exsmall.yaml
fi
oc apply -f $LokiStack_CONFIG
TMP_LOKICONFIG=/tmp/lokiconfig.yaml
envsubst <$LokiStack_CONFIG >$TMP_LOKICONFIG
oc apply -f $TMP_LOKICONFIG
sleep 30
oc wait --timeout=300s --for=condition=ready pod -l app.kubernetes.io/name=lokistack -n openshift-operators-redhat
}
Expand Down
6 changes: 3 additions & 3 deletions scripts/netobserv_queries_ebpf.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

# 1. network-observability pods CPU usage
- query: pod:container_cpu_usage:sum{namespace="network-observability"} * on (pod) group_left(node) kube_pod_info{namespace="network-observability"}
- query: pod:container_cpu_usage:sum{namespace="network-observability"} * on (pod) group_left(node) kube_pod_info{namespace="network-observability", pod_ip!=""}
metricName: cpuUsage

# 2. eBPF pods CPU usage
- query: pod:container_cpu_usage:sum{namespace="network-observability-privileged"} * on (pod) group_left(node) kube_pod_info{namespace="network-observability-privileged"}
- query: pod:container_cpu_usage:sum{namespace="network-observability-privileged"} * on (pod) group_left(node) kube_pod_info{namespace="network-observability-privileged", pod_ip!=""}
metricName: ebpfCpuUsage

# 3. network-observability pods memory usage (Working Set)
Expand All @@ -28,7 +28,7 @@
metricName: lokiStorageUsage

# 8. Number of flows processed by ingester per minute aggregated by FLP pods.
- query: sum(rate(ingest_collector_flow_logs_processed[1m])*60) by (pod) * on (pod) group_left(node) kube_pod_info{namespace="network-observability"}
- query: sum(rate(ingest_collector_flow_logs_processed[1m])*60) by (pod) * on (pod) group_left(node) kube_pod_info{namespace="network-observability", pod_ip!=""}
metricName: nFlowsProcessedPerMinute

# 9. Number of bytes processed per minute.
Expand Down
4 changes: 2 additions & 2 deletions scripts/netobserv_queries_ipfix.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# 1. network-observability pods CPU usage
- query: pod:container_cpu_usage:sum{namespace="network-observability"} * on (pod) group_left(node) kube_pod_info{namespace="network-observability"}
- query: pod:container_cpu_usage:sum{namespace="network-observability"} * on (pod) group_left(node) kube_pod_info{namespace="network-observability", pod_ip!=""}
metricName: cpuUsage

# 2. network-observability pods memory usage
Expand All @@ -16,7 +16,7 @@
metricName: memoryUsageRSS

# 5. Number of flows processed by ingester per minute aggregated by FLP pods.
- query: sum(rate(ingest_collector_flow_logs_processed[1m])*60) by (pod) * on (pod) group_left(node) kube_pod_info{namespace="network-observability"}
- query: sum(rate(ingest_collector_flow_logs_processed[1m])*60) by (pod) * on (pod) group_left(node) kube_pod_info{namespace="network-observability", pod_ip!=""}
metricName: nFlowsProcessedPerMinute

# 6. loki-store PVC usage averaging over 5 mins period
Expand Down