forked from kubernetes/perf-tests
-
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.
Framework for running Probes in ClusterLoader2
Probes definition can be found in kubernetes#474 The feature is guarded by the enable-probes flag, will be enabling it gradually. Ref. kubernetes/kubernetes#76012
- Loading branch information
Showing
13 changed files
with
523 additions
and
0 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
30 changes: 30 additions & 0 deletions
30
clusterloader2/pkg/measurement/common/probes/manifests/ping-client-deployment.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,30 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ping-client | ||
labels: | ||
probe: ping-client | ||
spec: | ||
selector: | ||
matchLabels: | ||
probe: ping-client | ||
replicas: {{.Replicas}} | ||
template: | ||
metadata: | ||
labels: | ||
probe: ping-client | ||
spec: | ||
containers: | ||
- name: ping-client | ||
image: gcr.io/k8s-testimages/probes:v0.0.1 | ||
args: | ||
- --metric-bind-address=0.0.0.0:8080 | ||
- --mode=ping-client | ||
- --ping-server-address=ping-server:8081 | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 100Mi | ||
ports: | ||
- containerPort: 8080 | ||
name: metrics |
12 changes: 12 additions & 0 deletions
12
clusterloader2/pkg/measurement/common/probes/manifests/ping-client-service.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,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: ping-client | ||
labels: | ||
probe: ping-client | ||
spec: | ||
ports: | ||
- name: metrics | ||
port: 8080 | ||
selector: | ||
probe: ping-client |
15 changes: 15 additions & 0 deletions
15
clusterloader2/pkg/measurement/common/probes/manifests/ping-client-serviceMonitor.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,15 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: ping-client | ||
namespace: probes | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: metrics | ||
namespaceSelector: | ||
matchNames: | ||
- probes | ||
selector: | ||
matchLabels: | ||
probe: ping-client |
32 changes: 32 additions & 0 deletions
32
clusterloader2/pkg/measurement/common/probes/manifests/ping-server-deployment.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,32 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ping-server | ||
labels: | ||
probe: ping-server | ||
spec: | ||
selector: | ||
matchLabels: | ||
probe: ping-server | ||
replicas: {{.Replicas}} | ||
template: | ||
metadata: | ||
labels: | ||
probe: ping-server | ||
spec: | ||
containers: | ||
- name: ping-server | ||
image: gcr.io/k8s-testimages/probes:v0.0.1 | ||
args: | ||
- --metric-bind-address=0.0.0.0:8080 | ||
- --mode=ping-server | ||
- --ping-server-bind-address=0.0.0.0:8081 | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 100Mi | ||
ports: | ||
- containerPort: 8080 | ||
name: metrics | ||
- containerPort: 8081 | ||
name: http |
15 changes: 15 additions & 0 deletions
15
clusterloader2/pkg/measurement/common/probes/manifests/ping-server-service.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,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: ping-server | ||
labels: | ||
probe: ping-server | ||
spec: | ||
|
||
ports: | ||
- name: metrics | ||
port: 8080 | ||
- name: http | ||
port: 8081 | ||
selector: | ||
probe: ping-server |
15 changes: 15 additions & 0 deletions
15
clusterloader2/pkg/measurement/common/probes/manifests/ping-server-serviceMonitor.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,15 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: ping-server | ||
namespace: probes | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: metrics | ||
namespaceSelector: | ||
matchNames: | ||
- probes | ||
selector: | ||
matchLabels: | ||
probe: ping-server |
16 changes: 16 additions & 0 deletions
16
clusterloader2/pkg/measurement/common/probes/manifests/prometheus-role.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,16 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: prometheus-k8s | ||
namespace: probes | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- services | ||
- endpoints | ||
- pods | ||
verbs: | ||
- get | ||
- list | ||
- watch |
13 changes: 13 additions & 0 deletions
13
clusterloader2/pkg/measurement/common/probes/manifests/prometheus-roleBinding.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,13 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: prometheus-k8s | ||
namespace: probes | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: prometheus-k8s | ||
subjects: | ||
- kind: ServiceAccount | ||
name: prometheus-k8s | ||
namespace: monitoring |
Oops, something went wrong.