Skip to content

Commit

Permalink
Update pkg/minikube/cruntime/crio.go
Browse files Browse the repository at this point in the history
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
  • Loading branch information
prezha and spowelljr committed Mar 18, 2024
1 parent 6a5098b commit e8407c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/minikube/cruntime/crio.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func generateCRIOConfig(cr CommandRunner, imageRepository string, kv semver.Vers

// add 'net.ipv4.ip_unprivileged_port_start=0' sysctl so that containers that run with non-root user can bind to otherwise privilege ports (like coredns v1.11.0+)
// note: 'net.ipv4.ip_unprivileged_port_start' sysctl was marked as safe since kubernetes v1.22 (Aug 4, 2021) (ref: https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.22.md#feature-9)
// note: cri-o supports 'efault_sysctls' option since v1.12.0 (Oct 19, 2018) (ref: https://github.com/cri-o/cri-o/releases/tag/v1.12.0; https://github.com/cri-o/cri-o/pull/1721)
// note: cri-o supports 'default_sysctls' option since v1.12.0 (Oct 19, 2018) (ref: https://github.com/cri-o/cri-o/releases/tag/v1.12.0; https://github.com/cri-o/cri-o/pull/1721)
if kv.GTE(semver.Version{Major: 1, Minor: 22}) {
// remove any existing 'net.ipv4.ip_unprivileged_port_start' settings
if _, err := cr.RunCmd(exec.Command("sh", "-c", fmt.Sprintf(`sudo sed -i '/^ *"net.ipv4.ip_unprivileged_port_start=.*"/d' %s`, crioConfigFile))); err != nil {
Expand Down

0 comments on commit e8407c9

Please sign in to comment.