Skip to content

Commit

Permalink
diff setup
Browse files Browse the repository at this point in the history
Signed-off-by: graysonwu <wgrayson@vmware.com>
  • Loading branch information
GraysonWu committed May 25, 2023
1 parent 4344cb7 commit b868de5
Show file tree
Hide file tree
Showing 15 changed files with 72 additions and 11 deletions.
5 changes: 3 additions & 2 deletions batch_mcnp_pt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
START=$1
END=$2
STEP=$3
POD_SHARE_ID=$4

for ((i=$START;i<=$END;i+=$STEP))
do
bash mcnp_performance_test.sh 1 $i
sleep 60
sleep 30
bash mcnp_performance_test.sh 1 $i $POD_SHARE_ID
done
10 changes: 10 additions & 0 deletions build/charts/antrea/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ agent:
resources:
requests:
cpu: "100m"
limits:
cpu: "100m"
antreaAgent:
# -- Extra environment variables to be injected into antrea-agent.
extraEnv: {}
Expand All @@ -233,6 +235,8 @@ agent:
resources:
requests:
cpu: "200m"
limits:
cpu: "200m"
antreaOVS:
# -- Max size in MBs of any single log file.
logFileMaxSize: 100
Expand All @@ -244,12 +248,16 @@ agent:
resources:
requests:
cpu: "200m"
limits:
cpu: "200m"
antreaIPsec:
# -- Resource requests and limits for the antrea-ipsec container (when IPsec
# is enabled).
resources:
requests:
cpu: "50m"
limits:
cpu: "50m"

controller:
# -- Port for the antrea-controller APIServer to serve on.
Expand Down Expand Up @@ -297,6 +305,8 @@ controller:
resources:
requests:
cpu: "200m"
limits:
cpu: "200m"

flowCollector:
# -- IPFIX collector address as a string with format <HOST>:[<PORT>][:<PROTO>].
Expand Down
8 changes: 8 additions & 0 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4388,6 +4388,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 100m
requests:
cpu: 100m
command: ["install_cni_chaining"]
Expand Down Expand Up @@ -4445,6 +4447,8 @@ spec:
fieldRef:
fieldPath: spec.nodeName
resources:
limits:
cpu: 200m
requests:
cpu: 200m
ports:
Expand Down Expand Up @@ -4514,6 +4518,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
requests:
cpu: 200m
command: ["start_ovs"]
Expand Down Expand Up @@ -4627,6 +4633,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
requests:
cpu: 200m
command: ["antrea-controller"]
Expand Down
8 changes: 8 additions & 0 deletions build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4387,6 +4387,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 100m
requests:
cpu: 100m
command: ["install_cni_chaining"]
Expand Down Expand Up @@ -4446,6 +4448,8 @@ spec:
- name: "ANTREA_CLOUD_EKS"
value: "true"
resources:
limits:
cpu: 200m
requests:
cpu: 200m
ports:
Expand Down Expand Up @@ -4515,6 +4519,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
requests:
cpu: 200m
command: ["start_ovs"]
Expand Down Expand Up @@ -4628,6 +4634,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
requests:
cpu: 200m
command: ["antrea-controller"]
Expand Down
8 changes: 8 additions & 0 deletions build/yamls/antrea-gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4386,6 +4386,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 100m
requests:
cpu: 100m
command: ["install_cni"]
Expand Down Expand Up @@ -4443,6 +4445,8 @@ spec:
fieldRef:
fieldPath: spec.nodeName
resources:
limits:
cpu: 200m
requests:
cpu: 200m
ports:
Expand Down Expand Up @@ -4512,6 +4516,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
requests:
cpu: 200m
command: ["start_ovs"]
Expand Down Expand Up @@ -4625,6 +4631,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
requests:
cpu: 200m
command: ["antrea-controller"]
Expand Down
10 changes: 10 additions & 0 deletions build/yamls/antrea-ipsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4400,6 +4400,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 100m
requests:
cpu: 100m
command: ["install_cni"]
Expand Down Expand Up @@ -4463,6 +4465,8 @@ spec:
name: antrea-ipsec
key: psk
resources:
limits:
cpu: 200m
requests:
cpu: 200m
ports:
Expand Down Expand Up @@ -4535,6 +4539,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
requests:
cpu: 200m
command: ["start_ovs"]
Expand Down Expand Up @@ -4572,6 +4578,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 50m
requests:
cpu: 50m
command: ["start_ovs_ipsec"]
Expand Down Expand Up @@ -4684,6 +4692,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
requests:
cpu: 200m
command: ["antrea-controller"]
Expand Down
8 changes: 8 additions & 0 deletions build/yamls/antrea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4386,6 +4386,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 100m
requests:
cpu: 100m
command: ["install_cni"]
Expand Down Expand Up @@ -4443,6 +4445,8 @@ spec:
fieldRef:
fieldPath: spec.nodeName
resources:
limits:
cpu: 200m
requests:
cpu: 200m
ports:
Expand Down Expand Up @@ -4512,6 +4516,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
requests:
cpu: 200m
command: ["start_ovs"]
Expand Down Expand Up @@ -4625,6 +4631,8 @@ spec:
image: "antrea/antrea-ubuntu:latest"
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
requests:
cpu: 200m
command: ["antrea-controller"]
Expand Down
6 changes: 4 additions & 2 deletions mcnp_performance_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ SERVER_CLUSTER="kind-east"

NS_NUM=$1
CLIENT_POD_NUM=$2
POD_SHARE_ID=$3
TOTAL_CLIENT_POD_NUM=$((NS_NUM*CLIENT_POD_NUM))


client_agent_names=()
server_agent_names=()
label_id_tracker=()
Expand Down Expand Up @@ -50,7 +52,7 @@ metadata:
name: ${POD_NAME_PREFIX}${j}
namespace: ${NS_NAME_PREFIX}${i}
labels:
${POD_LABEL_KEY}: ${ORI_LABEL_PREFIX}${i}-${j}
${POD_LABEL_KEY}: ${ORI_LABEL_PREFIX}${i}-$(((j-1)/POD_SHARE_ID))
spec:
containers:
- name: agc
Expand Down Expand Up @@ -170,7 +172,7 @@ function get_policy_update_timestamps {
do
for agent_name in "${server_agent_names[@]}"
do
target_log=$(kubectl logs -n kube-system -c antrea-agent "${agent_name}" --context "${SERVER_CLUSTER}" --timestamps --since_time "${time_since}" | grep "Num of LabelIdentity: ${TOTAL_CLIENT_POD_NUM} ." | tail -1)
target_log=$(kubectl logs -n kube-system -c antrea-agent "${agent_name}" --context "${SERVER_CLUSTER}" --timestamps --since_time "${time_since}" | grep "Num of LabelIdentity: $((TOTAL_CLIENT_POD_NUM/POD_SHARE_ID)) ." | tail -1)
if [[ "${target_log}" != "" ]]; then
end_timestamps=$(get_timestamps_from_log "$target_log")
break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ spec:
resources:
requests:
cpu: 200m
limits:
cpu: 200m
securityContext:
allowPrivilegeEscalation: false
volumeMounts:
Expand Down
2 changes: 2 additions & 0 deletions multicluster/build/yamls/antrea-multicluster-member.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,8 @@ spec:
resources:
requests:
cpu: 200m
limits:
cpu: 200m
securityContext:
allowPrivilegeEscalation: false
volumeMounts:
Expand Down
2 changes: 2 additions & 0 deletions multicluster/cmd/multicluster-controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ func setupManagerAndCertController(isLeader bool, o *Options) (manager.Manager,

// build up cert controller to manage certificate for MC Controller
k8sConfig := ctrl.GetConfigOrDie()
k8sConfig.QPS = 200
k8sConfig.Burst = 400
client, aggregatorClient, apiExtensionClient, err := createClients(k8sConfig)
if err != nil {
return nil, fmt.Errorf("error creating K8s clients: %v", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ func GetRemoteConfigAndClient(secretObj *v1.Secret, url string, clusterID common
}
config.BearerToken = string(token)
config.CAData = crtData

config.QPS = 200
config.Burst = 400
remoteCommonAreaMgr, err := ctrl.NewManager(config, ctrl.Options{
Scheme: scheme,
MetricsBindAddress: "0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (r *LabelIdentityExportReconciler) SetupWithManager(mgr ctrl.Manager) error
For(&mcsv1alpha1.ResourceExport{}).
WithEventFilter(instance).
WithOptions(controller.Options{
MaxConcurrentReconciles: common.DefaultWorkerCount,
MaxConcurrentReconciles: 50,
}).
Complete(r)
}
Expand Down Expand Up @@ -175,7 +175,7 @@ func (r *LabelIdentityExportReconciler) onLabelExportAdd(clusterID, labelHash, l
func (r *LabelIdentityExportReconciler) Run(stopCh <-chan struct{}) {
defer r.labelQueue.ShutDown()

for i := 0; i < common.DefaultWorkerCount; i++ {
for i := 0; i < 50; i++ {
go wait.Until(r.labelQueueWorker, time.Second, stopCh)
}
<-stopCh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (r *LabelIdentityReconciler) SetupWithManager(mgr ctrl.Manager) error {
handler.EnqueueRequestsFromMapFunc(r.namespaceMapFunc),
builder.WithPredicates(predicate.LabelChangedPredicate{})).
WithOptions(controller.Options{
MaxConcurrentReconciles: common.DefaultWorkerCount,
MaxConcurrentReconciles: 50,
}).
Complete(r)
}
Expand Down Expand Up @@ -213,7 +213,7 @@ func (r *LabelIdentityReconciler) onPodCreateOrUpdate(podNamespacedName, current
func (r *LabelIdentityReconciler) Run(stopCh <-chan struct{}) {
defer r.labelQueue.ShutDown()

for i := 0; i < common.DefaultWorkerCount; i++ {
for i := 0; i < 50; i++ {
go wait.Until(r.labelQueueWorker, time.Second, stopCh)
}
<-stopCh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (

"antrea.io/antrea/multicluster/apis/multicluster/constants"
multiclusterv1alpha1 "antrea.io/antrea/multicluster/apis/multicluster/v1alpha1"
"antrea.io/antrea/multicluster/controllers/multicluster/common"
"antrea.io/antrea/multicluster/controllers/multicluster/commonarea"
)

Expand Down Expand Up @@ -148,7 +147,7 @@ func (r *LabelIdentityResourceImportReconciler) SetupWithManager(mgr ctrl.Manage
For(&multiclusterv1alpha1.ResourceImport{}).
WithEventFilter(instance).
WithOptions(controller.Options{
MaxConcurrentReconciles: common.DefaultWorkerCount,
MaxConcurrentReconciles: 50,
}).
Complete(r)

Expand Down

0 comments on commit b868de5

Please sign in to comment.