Skip to content

Instantly share code, notes, and snippets.

@Thakurvaibhav
Last active August 6, 2018 08:02
Show Gist options
  • Save Thakurvaibhav/e4932c559e57b87b26491019bcf9cf1c to your computer and use it in GitHub Desktop.
Save Thakurvaibhav/e4932c559e57b87b26491019bcf9cf1c to your computer and use it in GitHub Desktop.
mongodb-k8s-hostvm-configure
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
name: hostvm-configurer
labels:
app: startup-script
spec:
template:
metadata:
labels:
app: startup-script
spec:
hostPID: true
containers:
- name: hostvm-configurer-container
image: gcr.io/google-containers/startup-script:v1
securityContext:
privileged: true
env:
- name: STARTUP_SCRIPT
value: |
#! /bin/bash
set -o errexit
set -o pipefail
set -o nounset
# Disable hugepages
echo 'never' > /sys/kernel/mm/transparent_hugepage/enabled
echo 'never' > /sys/kernel/mm/transparent_hugepage/defrag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment