// Convert_core_Sysctl_To_v1_Sysctl is an autogenerated conversion function.
518050
func Convert_core_Sysctl_To_v1_Sysctl(in *core.Sysctl, out *v1.Sysctl, s conversion.Scope) error {
	return autoConvert_core_Sysctl_To_v1_Sysctl(in, out, s)
}
876139
func (g *Generator) AddLinuxSysctl(key, value string) {
	g.initConfigLinuxSysctl()
	g.Config.Linux.Sysctl[key] = value
}
290861
func Convert_core_VolumeSource_To_v1_VolumeSource(in *core.VolumeSource, out *v1.VolumeSource, s conversion.Scope) error {
	return autoConvert_core_VolumeSource_To_v1_VolumeSource(in, out, s)
}
1063822
func Convert_core_NFSVolumeSource_To_v1_NFSVolumeSource(in *core.NFSVolumeSource, out *v1.NFSVolumeSource, s conversion.Scope) error {
	return autoConvert_core_NFSVolumeSource_To_v1_NFSVolumeSource(in, out, s)
}
1233030
func Convert_v1_NodeList_To_core_NodeList(in *v1.NodeList, out *core.NodeList, s conversion.Scope) error {
	return autoConvert_v1_NodeList_To_core_NodeList(in, out, s)
}
24011
func (v *ConfigValidator) sysctl(config *configs.Config) error {
	validSysctlMap := map[string]bool{
		"kernel.msgmax":          true,
		"kernel.msgmnb":          true,
		"kernel.msgmni":          true,
		"kernel.sem":             true,
		"kernel.shmall":          true,
		"kernel.shmmax":          true,
		"kernel.shmmni":          true,
		"kernel.shm_rmid_forced": true,
	}

	for s := range config.Sysctl {
		if validSysctlMap[s] || strings.HasPrefix(s, "fs.mqueue.") {
			if config.Namespaces.Contains(configs.NEWIPC) {
				continue
			} else {
				return fmt.Errorf("sysctl %q is not allowed in the hosts ipc namespace", s)
			}
		}
		if strings.HasPrefix(s, "net.") {
			if config.Namespaces.Contains(configs.NEWNET) {
				if path := config.Namespaces.PathOf(configs.NEWNET); path != "" {
					if err := checkHostNs(s, path); err != nil {
						return err
					}
				}
				continue
			} else {
				return fmt.Errorf("sysctl %q is not allowed in the hosts network namespace", s)
			}
		}
		if config.Namespaces.Contains(configs.NEWUTS) {
			switch s {
			case "kernel.domainname":
				// This is namespaced and there's no explicit OCI field for it.
				continue
			case "kernel.hostname":
				// This is namespaced but there's a conflicting (dedicated) OCI field for it.
				return fmt.Errorf("sysctl %q is not allowed as it conflicts with the OCI %q field", s, "hostname")
			}
		}
		return fmt.Errorf("sysctl %q is not in a separate kernel namespace", s)
	}

	return nil
}
712476
func Convert_core_TCPSocketAction_To_v1_TCPSocketAction(in *core.TCPSocketAction, out *v1.TCPSocketAction, s conversion.Scope) error {
	return autoConvert_core_TCPSocketAction_To_v1_TCPSocketAction(in, out, s)
}
317296
func Convert_core_NodeList_To_v1_NodeList(in *core.NodeList, out *v1.NodeList, s conversion.Scope) error {
	return autoConvert_core_NodeList_To_v1_NodeList(in, out, s)
}
276404
func Convert_core_Endpoints_To_v1_Endpoints(in *core.Endpoints, out *v1.Endpoints, s conversion.Scope) error {
	return autoConvert_core_Endpoints_To_v1_Endpoints(in, out, s)
}
556847
func Convert_core_ServicePort_To_v1_ServicePort(in *core.ServicePort, out *v1.ServicePort, s conversion.Scope) error {
	return autoConvert_core_ServicePort_To_v1_ServicePort(in, out, s)
}
542872
func Convert_core_Lifecycle_To_v1_Lifecycle(in *core.Lifecycle, out *v1.Lifecycle, s conversion.Scope) error {
	return autoConvert_core_Lifecycle_To_v1_Lifecycle(in, out, s)
}
478691
func Convert_v1_Binding_To_core_Binding(in *v1.Binding, out *core.Binding, s conversion.Scope) error {
	return autoConvert_v1_Binding_To_core_Binding(in, out, s)
}
25854
func Convert_core_Secret_To_v1_Secret(in *core.Secret, out *v1.Secret, s conversion.Scope) error {
	return autoConvert_core_Secret_To_v1_Secret(in, out, s)
}
955065
func Convert_config_LDAPSyncConfig_To_v1_LDAPSyncConfig(in *config.LDAPSyncConfig, out *v1.LDAPSyncConfig, s conversion.Scope) error {
	return autoConvert_config_LDAPSyncConfig_To_v1_LDAPSyncConfig(in, out, s)
}
829377
func Convert_core_Container_To_v1_Container(in *core.Container, out *v1.Container, s conversion.Scope) error {
	return autoConvert_core_Container_To_v1_Container(in, out, s)
}
85140
func Convert_v1_ResourceQuotaSpec_To_core_ResourceQuotaSpec(in *v1.ResourceQuotaSpec, out *core.ResourceQuotaSpec, s conversion.Scope) error {
	return autoConvert_v1_ResourceQuotaSpec_To_core_ResourceQuotaSpec(in, out, s)
}
629081
func (g *Generator) ClearLinuxSysctl() {
	if g.Config == nil || g.Config.Linux == nil {
		return
	}
	g.Config.Linux.Sysctl = make(map[string]string)
}