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

Add default resource requirements for init-containers #1457

Merged
merged 1 commit into from
Dec 29, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ spec:
requests:
cpu: "0.2"
memory: 200M
initContainers:
- name: mongodb-agent-readinessprobe
resources:
limits:
cpu: "2"
memory: 200M
requests:
cpu: "1"
memory: 100M
# the user credentials will be generated from this secret
# once the credentials are generated, this secret is no longer required
---
Expand Down
2 changes: 2 additions & 0 deletions controllers/construct/mongodbstatefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ func versionUpgradeHookInit(volumeMount []corev1.VolumeMount) container.Modifica
container.WithName(versionUpgradeHookName),
container.WithCommand([]string{"cp", "version-upgrade-hook", "/hooks/version-upgrade"}),
container.WithImage(os.Getenv(VersionUpgradeHookImageEnv)),
container.WithResourceRequirements(resourcerequirements.Defaults()),
container.WithImagePullPolicy(corev1.PullAlways),
container.WithVolumeMounts(volumeMount),
containerSecurityContext,
Expand Down Expand Up @@ -324,6 +325,7 @@ func readinessProbeInit(volumeMount []corev1.VolumeMount) container.Modification
container.WithImage(os.Getenv(ReadinessProbeImageEnv)),
container.WithImagePullPolicy(corev1.PullAlways),
container.WithVolumeMounts(volumeMount),
container.WithResourceRequirements(resourcerequirements.Defaults()),
containerSecurityContext,
)
}
Expand Down
Loading