Skip to content

Commit

Permalink
Stress test for 0.5.9-rc3
Browse files Browse the repository at this point in the history
  • Loading branch information
renjiezh committed Sep 25, 2024
1 parent 89ce490 commit f1c961b
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 36 deletions.
38 changes: 24 additions & 14 deletions src/main/k8s/dev/duchy_eks.cue
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ _duchyCertName: "duchies/\(_duchyName)/certificates/\(_certificateId)"
#StorageServiceAccount: "storage"
#InternalServerResourceRequirements: #ResourceRequirements & {
requests: {
cpu: "75m"
cpu: "500m"
}
}
#HeraldResourceRequirements: ResourceRequirements=#ResourceRequirements & {
requests: {
cpu: "25m"
cpu: "200m"
memory: "512Mi"
}
limits: {
Expand Down Expand Up @@ -68,26 +68,27 @@ _duchyCertName: "duchies/\(_duchyName)/certificates/\(_certificateId)"
}
#HmssMillMaxHeapSize: "5G"
#HmssMillMaxConcurrency: 5
#ApiServerReplicas: 4
#FulfillmentResourceRequirements: ResourceRequirements=#ResourceRequirements & {
requests: {
cpu: "200m"
memory: "576Mi"
cpu: "500m"
memory: "2000Mi"
}
limits: {
memory: ResourceRequirements.requests.memory
}
}
#FulfillmentMaxHeapSize: "320M"
#FulfillmentMaxHeapSize: "1500M"
#ControlServiceResourceRequirements: ResourceRequirements=#ResourceRequirements & {
requests: {
cpu: "200m"
memory: "512Mi"
cpu: "500m"
memory: "3000Mi"
}
limits: {
memory: ResourceRequirements.requests.memory
}
}
#ControlServiceMaxHeapSize: "320M"
#ControlServiceMaxHeapSize: "2500M"

objectSets: [defaultNetworkPolicies] + [ for objectSet in duchy {objectSet}]

Expand Down Expand Up @@ -144,25 +145,34 @@ duchy: #PostgresDuchy & {
_javaOptions: maxHeapSize: #ControlServiceMaxHeapSize
resources: #ControlServiceResourceRequirements
}
spec: template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #StorageServiceAccount
spec: {
replicas: #ApiServerReplicas
template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #StorageServiceAccount
}
}
}
"requisition-fulfillment-server-deployment": {
_container: {
_javaOptions: maxHeapSize: #FulfillmentMaxHeapSize
resources: #FulfillmentResourceRequirements
}
spec: template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #StorageServiceAccount
spec: {
replicas: #ApiServerReplicas
template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #StorageServiceAccount
}
}
}
"internal-api-server-deployment": {
_container: {
resources: #InternalServerResourceRequirements
}
spec: template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #InternalServerServiceAccount
spec: {
replicas: #ApiServerReplicas
template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #InternalServerServiceAccount
}
}
}
}
Expand Down
38 changes: 24 additions & 14 deletions src/main/k8s/dev/duchy_gke.cue
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ _duchy_cert_name: "duchies/\(_duchy_name)/certificates/\(_certificateId)"
#StorageServiceAccount: "storage"
#InternalServerResourceRequirements: #ResourceRequirements & {
requests: {
cpu: "75m"
cpu: "500m"
}
}
#HeraldResourceRequirements: ResourceRequirements=#ResourceRequirements & {
requests: {
cpu: "25m"
cpu: "200m"
memory: "512Mi"
}
limits: {
Expand Down Expand Up @@ -69,26 +69,27 @@ _duchy_cert_name: "duchies/\(_duchy_name)/certificates/\(_certificateId)"
}
#HmssMillMaxHeapSize: "5G"
#HmssMillMaxConcurrency: 5
#ApiServerReplicas: 4
#FulfillmentResourceRequirements: ResourceRequirements=#ResourceRequirements & {
requests: {
cpu: "200m"
memory: "576Mi"
cpu: "500m"
memory: "2000Mi"
}
limits: {
memory: ResourceRequirements.requests.memory
}
}
#FulfillmentMaxHeapSize: "320M"
#FulfillmentMaxHeapSize: "1500M"
#ControlServiceResourceRequirements: ResourceRequirements=#ResourceRequirements & {
requests: {
cpu: "200m"
memory: "512Mi"
cpu: "500m"
memory: "3000Mi"
}
limits: {
memory: ResourceRequirements.requests.memory
}
}
#ControlServiceMaxHeapSize: "320M"
#ControlServiceMaxHeapSize: "2500M"

objectSets: [defaultNetworkPolicies] + [ for objectSet in duchy {objectSet}]

Expand Down Expand Up @@ -134,8 +135,11 @@ duchy: #SpannerDuchy & {
_container: {
resources: #InternalServerResourceRequirements
}
spec: template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #InternalServerServiceAccount
spec: {
replicas: #ApiServerReplicas
template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #InternalServerServiceAccount
}
}
}
"herald-daemon-deployment": {
Expand All @@ -155,17 +159,23 @@ duchy: #SpannerDuchy & {
_javaOptions: maxHeapSize: #ControlServiceMaxHeapSize
resources: #ControlServiceResourceRequirements
}
spec: template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #StorageServiceAccount
spec: {
replicas: #ApiServerReplicas
template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #StorageServiceAccount
}
}
}
"requisition-fulfillment-server-deployment": {
_container: {
_javaOptions: maxHeapSize: #FulfillmentMaxHeapSize
resources: #FulfillmentResourceRequirements
}
spec: template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #StorageServiceAccount
spec: {
replicas: #ApiServerReplicas
template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #StorageServiceAccount
}
}
}
}
Expand Down
34 changes: 29 additions & 5 deletions src/main/k8s/dev/kingdom_gke.cue
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,23 @@ _systemApiAddressName: string @tag("system_api_address_name")
// a thread, so this should be greater than the number of Heralds.
#SystemServerGrpcThreads: 5

#ApiServerReplicas: 2

#InternalServerResourceRequirements: ResourceRequirements=#ResourceRequirements & {
requests: {
cpu: "500m"
memory: "352Mi"
memory: "1024Mi"
}
limits: {
memory: ResourceRequirements.requests.memory
}
}


#PublicServerResourceRequirements: ResourceRequirements=#ResourceRequirements & {
requests: {
cpu: "500m"
memory: "1024Mi"
}
limits: {
memory: ResourceRequirements.requests.memory
Expand All @@ -45,8 +58,8 @@ _systemApiAddressName: string @tag("system_api_address_name")

#OperationalMetricsJobResourceRequirements: ResourceRequirements=#ResourceRequirements & {
requests: {
cpu: "10m"
memory: "256Mi"
cpu: "500m"
memory: "1024Mi"
}
limits: {
memory: ResourceRequirements.requests.memory
Expand Down Expand Up @@ -95,15 +108,26 @@ kingdom: #Kingdom & {
_grpcThreadPoolSize: #InternalServerGrpcThreads
resources: #InternalServerResourceRequirements
}
spec: template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #InternalServerServiceAccount
spec: {
replicas: #ApiServerReplicas
template: spec: #ServiceAccountPodSpec & {
serviceAccountName: #InternalServerServiceAccount
_javaOptions: maxHeapSize: "800M"
}
}
}
"system-api-server": {
_container: {
_grpcThreadPoolSize: #SystemServerGrpcThreads
}
}
"v2alpha-public-api-server": {
spec: replicas: #ApiServerReplicas
_container: {
resources: #PublicServerResourceRequirements
_javaOptions: maxHeapSize: "800M"
}
}
}

cronJobs: {
Expand Down
2 changes: 1 addition & 1 deletion src/main/terraform/aws/cmms/duchies.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module "clusters" {
subnet_ids = module.vpc.private_subnets
vpc_id = module.vpc.vpc_id
default_instance_types = ["m5.large"]
default_max_node_count = 2
default_max_node_count = 5
high_perf_instance_types = ["c5.xlarge"]
high_perf_max_node_count = 20
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/terraform/gcloud/cmms/duchies.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module "default_node_pools" {
name = "default"
service_account = module.common.cluster_service_account
machine_type = "e2-standard-2"
max_node_count = 2
max_node_count = 10
}

module "highmem_node_pools" {
Expand Down
2 changes: 1 addition & 1 deletion src/main/terraform/gcloud/cmms/kingdom.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module "kingdom_default_node_pool" {
cluster = module.kingdom_cluster.cluster
service_account = module.common.cluster_service_account
machine_type = "e2-custom-2-4096"
max_node_count = 3
max_node_count = 5
}

module "kingdom" {
Expand Down

0 comments on commit f1c961b

Please sign in to comment.