Skip to content

Commit

Permalink
UPSTREAM: <carry>: add default sysctls for kubelet in rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
rphillips committed Feb 15, 2023
1 parent c729678 commit 3716009
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions openshift-hack/sysctls/50-kubelet.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kernel.keys.root_maxbytes=25000000
kernel.keys.root_maxkeys=1000000
kernel.panic=10
kernel.panic_on_oops=1
vm.overcommit_memory=1
vm.panic_on_oom=0
6 changes: 6 additions & 0 deletions openshift.spec
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ KUBE_BUILD_PLATFORMS="${BUILD_PLATFORM}" %{os_git_vars} make all WHAT='cmd/kube-

PLATFORM="$(go env GOHOSTOS)/$(go env GOHOSTARCH)"
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_sysctldir}

# Install linux components
for bin in kube-apiserver kube-controller-manager kube-scheduler kubelet
Expand All @@ -117,6 +118,10 @@ done

install -p -m 755 openshift-hack/images/hyperkube/hyperkube %{buildroot}%{_bindir}/hyperkube
install -p -m 755 openshift-hack/images/hyperkube/kubensenter %{buildroot}%{_bindir}/kubensenter
install -p -m 755 openshift-hack/sysctls/50-kubelet.conf %{buildroot}%{_sysctldir}/50-kubelet.conf

%post
%sysctl_apply 50-kubelet.conf

%files hyperkube
%license LICENSE
Expand All @@ -126,6 +131,7 @@ install -p -m 755 openshift-hack/images/hyperkube/kubensenter %{buildroot}%{_bin
%{_bindir}/kube-scheduler
%{_bindir}/kubelet
%{_bindir}/kubensenter
%{_sysctldir}/50-kubelet.conf
%defattr(-,root,root,0700)

%changelog

0 comments on commit 3716009

Please sign in to comment.