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

Setup initContainer for recommended sysctls #1303

Open
MalteJoe opened this issue Apr 28, 2023 · 5 comments
Open

Setup initContainer for recommended sysctls #1303

MalteJoe opened this issue Apr 28, 2023 · 5 comments

Comments

@MalteJoe
Copy link

When running Single instances via the operator, they produce a warning to modify the virtual memory property:

[1] WARNING [118b0] {memory} maximum number of memory mappings per process is 65530, which seems too low. it is recommended to set it to at least 1024000
[1] WARNING [49528] {memory} execute 'sudo sysctl -w "vm.max_map_count=1024000"'

It would be nice to configure the securityContext.sysctls properties in the deployment CR to let the pod have more memory handles as suggested by the warning or is there another way?

@MalteJoe
Copy link
Author

It seems like the vm.* settings are considered unsafe sysctls which is why they might not be available depending on the kubernetes setup. However, other Helm Charts like ElasticSearch seem to use an Init Container to set this value properly.

@ajanikow
Copy link
Collaborator

Hello!

We allow you to inject any init container you need, so you can already do it via initContainers in the group spec.

I do not see any need to allow more than this, as the above will solve all issues.

We will prepare a container definition to set all sysctl settings for ArangoDB, which you will be able to copy-paste into your ArangoDeployment.

Best,
Adam.

@MalteJoe
Copy link
Author

Hi Adam,

thanks for the info. I couldn't find documentation of the custom initContainers anywhere, so I assume I just need to add them to the group spec and they will be executed before (or after?) the other initContainers (in case of single)?

@ajanikow
Copy link
Collaborator

ajanikow commented May 1, 2023

Hello!

Link to the API: https://github.com/arangodb/kube-arangodb/blob/master/pkg/apis/deployment/v2alpha1/server_group_spec.go#L143

They gonna be executed after ArangoDB initContainers, but before DB will start.

@MalteJoe
Copy link
Author

MalteJoe commented May 3, 2023

Hi!

Sorry, I didn't consider some go files in the sources as part of the API, shouldn't it be part of the documentation at https://www.arangodb.com/docs/stable/deployment-kubernetes-deployment-resource.html ?

As we're not talking about securityContext.sysctls anymore, I would rewrite this issue to include an initContainer by the operator itself to set the sysctls like you have written in #1303 (comment) .

I will create another issue for the missing documentation of custom initContainers if that's fine with you.

@MalteJoe MalteJoe changed the title Add securityContext.sysctls to arango deployment Setup initContainer for recommended sysctls May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants