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

fix: update default resources for rust ipfs #177

Merged
merged 1 commit into from
May 16, 2024
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
85 changes: 71 additions & 14 deletions operator/src/network/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2317,6 +2317,25 @@ mod tests {
"name": "ipfs",
"ports": [
{
@@ -278,14 +240,14 @@
],
"resources": {
"limits": {
- "cpu": "1",
+ "cpu": "250m",
"ephemeral-storage": "1Gi",
- "memory": "1Gi"
+ "memory": "512Mi"
},
"requests": {
- "cpu": "1",
+ "cpu": "250m",
"ephemeral-storage": "1Gi",
- "memory": "1Gi"
+ "memory": "512Mi"
}
},
"volumeMounts": [
@@ -292,6 +254,11 @@
{
"mountPath": "/data/ipfs",
Expand Down Expand Up @@ -2450,17 +2469,17 @@ mod tests {
],
"resources": {
"limits": {
- "cpu": "250m",
- "cpu": "1",
- "ephemeral-storage": "1Gi",
- "memory": "512Mi"
- "memory": "1Gi"
+ "cpu": "4",
+ "ephemeral-storage": "4Gi",
+ "memory": "4Gi"
},
"requests": {
- "cpu": "250m",
- "cpu": "1",
- "ephemeral-storage": "1Gi",
- "memory": "512Mi"
- "memory": "1Gi"
+ "cpu": "4",
+ "ephemeral-storage": "4Gi",
+ "memory": "4Gi"
Expand Down Expand Up @@ -2594,6 +2613,25 @@ mod tests {
"name": "ipfs",
"ports": [
{
@@ -278,14 +240,14 @@
],
"resources": {
"limits": {
- "cpu": "1",
+ "cpu": "250m",
"ephemeral-storage": "1Gi",
- "memory": "1Gi"
+ "memory": "512Mi"
},
"requests": {
- "cpu": "1",
+ "cpu": "250m",
"ephemeral-storage": "1Gi",
- "memory": "1Gi"
+ "memory": "512Mi"
}
},
"volumeMounts": [
@@ -292,6 +254,16 @@
{
"mountPath": "/data/ipfs",
Expand Down Expand Up @@ -2718,17 +2756,17 @@ mod tests {
],
"resources": {
"limits": {
- "cpu": "250m",
- "cpu": "1",
- "ephemeral-storage": "1Gi",
- "memory": "512Mi"
- "memory": "1Gi"
+ "cpu": "4",
+ "ephemeral-storage": "4Gi",
+ "memory": "4Gi"
},
"requests": {
- "cpu": "250m",
- "cpu": "1",
- "ephemeral-storage": "1Gi",
- "memory": "512Mi"
- "memory": "1Gi"
+ "cpu": "4",
+ "ephemeral-storage": "4Gi",
+ "memory": "4Gi"
Expand Down Expand Up @@ -2930,17 +2968,17 @@ mod tests {
],
"resources": {
"limits": {
- "cpu": "250m",
- "cpu": "1",
- "ephemeral-storage": "1Gi",
- "memory": "512Mi"
- "memory": "1Gi"
+ "cpu": "2",
+ "ephemeral-storage": "2Gi",
+ "memory": "2Gi"
},
"requests": {
- "cpu": "250m",
- "cpu": "1",
- "ephemeral-storage": "1Gi",
- "memory": "512Mi"
- "memory": "1Gi"
+ "cpu": "2",
+ "ephemeral-storage": "2Gi",
+ "memory": "2Gi"
Expand Down Expand Up @@ -4086,6 +4124,25 @@ mod tests {
"name": "ipfs",
"ports": [
{
@@ -278,14 +240,14 @@
],
"resources": {
"limits": {
- "cpu": "1",
+ "cpu": "250m",
"ephemeral-storage": "1Gi",
- "memory": "1Gi"
+ "memory": "512Mi"
},
"requests": {
- "cpu": "1",
+ "cpu": "250m",
"ephemeral-storage": "1Gi",
- "memory": "1Gi"
+ "memory": "512Mi"
}
},
"volumeMounts": [
@@ -292,6 +254,11 @@
{
"mountPath": "/data/ipfs",
Expand Down Expand Up @@ -4410,7 +4467,7 @@ mod tests {
],
"resources": {
@@ -288,6 +313,13 @@
"memory": "512Mi"
"memory": "1Gi"
}
},
+ "securityContext": {
Expand Down Expand Up @@ -4462,7 +4519,7 @@ mod tests {
],
"resources": {
@@ -105,6 +114,13 @@
"memory": "512Mi"
"memory": "1Gi"
}
},
+ "securityContext": {
Expand Down
4 changes: 2 additions & 2 deletions operator/src/network/ipfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ impl Default for RustIpfsConfig {
image: "public.ecr.aws/r5b3e0r5/3box/ceramic-one:latest".to_owned(),
image_pull_policy: "Always".to_owned(),
resource_limits: ResourceLimitsConfig {
cpu: Some(Quantity("250m".to_owned())),
memory: Some(Quantity("512Mi".to_owned())),
cpu: Some(Quantity("1".to_owned())),
memory: Some(Quantity("1Gi".to_owned())),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the only real, change. The rest are test updates.

storage: Quantity("1Gi".to_owned()),
},
storage_class: None,
Expand Down
8 changes: 4 additions & 4 deletions operator/src/network/testdata/ceramic_ss_1
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ Request {
],
"resources": {
"limits": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
},
"requests": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
}
},
"volumeMounts": [
Expand Down
8 changes: 4 additions & 4 deletions operator/src/network/testdata/ceramic_ss_weighted_0
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ Request {
],
"resources": {
"limits": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
},
"requests": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
}
},
"volumeMounts": [
Expand Down
8 changes: 4 additions & 4 deletions operator/src/network/testdata/ceramic_ss_weighted_1
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ Request {
],
"resources": {
"limits": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
},
"requests": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
}
},
"volumeMounts": [
Expand Down
8 changes: 4 additions & 4 deletions operator/src/network/testdata/ceramic_ss_weighted_2
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ Request {
],
"resources": {
"limits": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
},
"requests": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
}
},
"volumeMounts": [
Expand Down
8 changes: 4 additions & 4 deletions operator/src/network/testdata/ceramic_ss_weighted_3
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ Request {
],
"resources": {
"limits": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
},
"requests": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
}
},
"volumeMounts": [
Expand Down
8 changes: 4 additions & 4 deletions operator/src/network/testdata/ceramic_ss_weighted_4
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ Request {
],
"resources": {
"limits": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
},
"requests": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
}
},
"volumeMounts": [
Expand Down
8 changes: 4 additions & 4 deletions operator/src/network/testdata/ceramic_ss_weighted_5
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ Request {
],
"resources": {
"limits": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
},
"requests": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
}
},
"volumeMounts": [
Expand Down
8 changes: 4 additions & 4 deletions operator/src/network/testdata/ceramic_ss_weighted_6
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ Request {
],
"resources": {
"limits": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
},
"requests": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
}
},
"volumeMounts": [
Expand Down
8 changes: 4 additions & 4 deletions operator/src/network/testdata/ceramic_ss_weighted_7
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ Request {
],
"resources": {
"limits": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
},
"requests": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
}
},
"volumeMounts": [
Expand Down
8 changes: 4 additions & 4 deletions operator/src/network/testdata/ceramic_ss_weighted_8
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ Request {
],
"resources": {
"limits": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
},
"requests": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
}
},
"volumeMounts": [
Expand Down
8 changes: 4 additions & 4 deletions operator/src/network/testdata/ceramic_ss_weighted_9
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ Request {
],
"resources": {
"limits": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
},
"requests": {
"cpu": "250m",
"cpu": "1",
"ephemeral-storage": "1Gi",
"memory": "512Mi"
"memory": "1Gi"
}
},
"volumeMounts": [
Expand Down
Loading
Loading