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

OCPBUGS-7555: UPSTREAM: <carry>: add default kubelet sysctls within rpm #1475

Merged
merged 1 commit into from
Feb 16, 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
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