Skip to content
Closed
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
182 changes: 182 additions & 0 deletions test/performance/broker-latency/continuous/broker-latency-setup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
# Copyright 2019 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: eventing.knative.dev/v1alpha1
kind: Broker
metadata:
name: in-memory
namespace: default
spec:
channelTemplateSpec:
apiVersion: messaging.knative.dev/v1alpha1
kind: InMemoryChannel

---

apiVersion: eventing.knative.dev/v1alpha1
kind: Trigger
metadata:
name: broker-latency
namespace: default
spec:
broker: in-memory
subscriber:
ref:
apiVersion: v1
kind: Service
name: broker-latency-in-memory-receiver

---

apiVersion: v1
kind: ServiceAccount
metadata:
name: eventing-broker-ingress
namespace: default

---

apiVersion: v1
kind: ServiceAccount
metadata:
name: eventing-broker-filter
namespace: default

---

apiVersion: v1
kind: ServiceAccount
metadata:
name: perf-eventing
namespace: default

---

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: perf-eventing
rules:
- apiGroups: [""]
resources: ["nodes", "pods"]
verbs: ["list"]

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: perf-eventing
subjects:
- kind: ServiceAccount
name: perf-eventing
namespace: default
roleRef:
kind: ClusterRole
name: perf-eventing
apiGroup: rbac.authorization.k8s.io

---

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: eventing-broker-ingress
namespace: default
subjects:
- kind: ServiceAccount
name: eventing-broker-ingress
namespace: default
roleRef:
kind: ClusterRole
name: eventing-broker-ingress
apiGroup: rbac.authorization.k8s.io

---

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: eventing-broker-filter
namespace: default
subjects:
- kind: ServiceAccount
name: eventing-broker-filter
namespace: default
roleRef:
kind: ClusterRole
name: eventing-broker-filter
apiGroup: rbac.authorization.k8s.io

---

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: eventing-config-reader-default-eventing-broker-ingress
namespace: knative-eventing
subjects:
- kind: ServiceAccount
name: eventing-broker-ingress
namespace: default
roleRef:
kind: ClusterRole
name: eventing-config-reader
apiGroup: rbac.authorization.k8s.io

---

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: eventing-config-reader-default-eventing-broker-filter
namespace: knative-eventing
subjects:
- kind: ServiceAccount
name: eventing-broker-filter
namespace: default
roleRef:
kind: ClusterRole
name: eventing-config-reader
apiGroup: rbac.authorization.k8s.io

---

apiVersion: v1
kind: Service
metadata:
name: broker-latency-in-memory-receiver
spec:
selector:
role: broker-latency-in-memory-receiver
ports:
- name: http
port: 80
targetPort: cloudevents
protocol: TCP

---

apiVersion: v1
kind: Service
metadata:
name: broker-latency-in-memory-aggregator
spec:
selector:
role: broker-latency-in-memory-aggregator
ports:
- name: grpc
port: 10000
targetPort: grpc
protocol: TCP
122 changes: 122 additions & 0 deletions test/performance/broker-latency/continuous/broker-latency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Copyright 2019 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: broker-latency-in-memory-receiver
namespace: default
labels:
role: broker-latency-in-memory-receiver
spec:
schedule: "0,30 * * * *"
jobTemplate:
spec:
completions: 1
parallelism: 1
backoffLimit: 0
template:
metadata:
labels:
role: broker-latency-in-memory-receiver
spec:
serviceAccountName: perf-eventing
restartPolicy: Never
containers:
- name: sender-receiver
image: knative.dev/eventing/test/test_images/latencymako
args:
- "--role=sender-receiver"
- "--sink=http://in-memory-broker"
- "--aggregator=broker-latency-in-memory-aggregator:10000"
- "--pace=100:10,200:20,400:60"
- "--verbose"
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
resources:
requests:
cpu: 1000m
memory: 2Gi
ports:
- name: cloudevents
containerPort: 8080

---

apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: broker-latency-in-memory-aggregator
namespace: default
labels:
role: broker-latency-in-memory-aggregator
spec:
schedule: "0,30 * * * *"
jobTemplate:
spec:
completions: 1
parallelism: 1
backoffLimit: 0
template:
metadata:
labels:
role: broker-latency-in-memory-aggregator
spec:
serviceAccountName: perf-eventing
restartPolicy: Never
containers:
- name: aggregator
image: knative.dev/eventing/test/test_images/latencymako
args:
- "--role=aggregator"
# set to the number of sender-receiver
- "--expect-records=1"
- "--verbose"
ports:
- name: grpc
containerPort: 10000
resources:
requests:
cpu: 1000m
memory: 2Gi
volumeMounts:
- name: config-mako
mountPath: /etc/config-mako
terminationMessagePolicy: FallbackToLogsOnError
- name: mako
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am guessing only this job needs mako creds?

image: gcr.io/knative-performance/mako-microservice:latest
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secret/robot.json
volumeMounts:
- name: service-account
mountPath: /var/secret
ports:
- name: quickstore
containerPort: 9813
terminationMessagePolicy: FallbackToLogsOnError
volumes:
- name: config-mako
configMap:
name: config-mako
- name: service-account
secret:
secretName: service-account
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add trailing newline:

Suggested change
secretName: service-account
secretName: service-account

Loading