Skip to content

Commit

Permalink
adding new stuff for mongo
Browse files Browse the repository at this point in the history
  • Loading branch information
mfreeman451 committed Feb 13, 2025
1 parent 1ad4e52 commit 952e92d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
8 changes: 8 additions & 0 deletions k8s/mongodb/base/sysctl-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mongodb-sysctl
data:
99-mongodb.conf: |
vm.max_map_count=262144
vm.swappiness=0
31 changes: 31 additions & 0 deletions k8s/mongodb/base/sysctl-daemonset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: mongodb-sysctl-daemonset
spec:
selector:
matchLabels:
app: mongodb-sysctl
template:
metadata:
labels:
app: mongodb-sysctl
spec:
hostPID: true # Required for sysctl changes
containers:
- name: sysctl-setter
image: busybox:latest # A small utility image
command: ["/bin/sh", "-c"]
args:
- |
sysctl -w vm.max_map_count=262144
sysctl -w vm.swappiness=0
securityContext:
privileged: true # Required to change sysctl settings
volumeMounts:
- name: sysctl-config
mountPath: /etc/sysctl.d
volumes:
- name: sysctl-config
configMap:
name: mongodb-sysctl

0 comments on commit 952e92d

Please sign in to comment.