// setupInputConfigMaps mounts the configMaps referenced by the ConfigMapBuildSource
// into a builder container.
514302
func setupInputConfigMaps(pod *corev1.Pod, container *corev1.Container, configs []buildv1.ConfigMapBuildSource) {
	for _, c := range configs {
		mountConfigMapVolume(pod, container, c.ConfigMap.Name, filepath.Join(ConfigMapBuildSourceBaseMountPath, c.ConfigMap.Name), "build")
		klog.V(3).Infof("%s will be used as a build config in %s", c.ConfigMap.Name, ConfigMapBuildSourceBaseMountPath)
	}
}
897532
func (s *StartTopicsDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartTopicsDetectionJobInput {
	s.InputDataConfig = v
	return s
}
496106
func newConfigMaps(c *CoreV1Client, namespace string) *configMaps {
	return &configMaps{
		client: c.RESTClient(),
		ns:     namespace,
	}
}
1245250
func (s *StepExecution) SetInputs(v map[string]*string) *StepExecution {
	s.Inputs = v
	return s
}
57870
func filesetConfigMap(configMapName string, files *caas.FileSet) *core.ConfigMap {
	result := &core.ConfigMap{
		ObjectMeta: v1.ObjectMeta{
			Name: configMapName,
		},
		Data: map[string]string{},
	}
	for name, data := range files.Files {
		result.Data[name] = data
	}
	return result
}
932592
func (s *DeleteChannelOutput) SetInputAttachments(v []*InputAttachment) *DeleteChannelOutput {
	s.InputAttachments = v
	return s
}
1131441
func (s *Target) SetInput(v string) *Target {
	s.Input = &v
	return s
}
494901
func (s *CreateTrainingJobInput) SetInputDataConfig(v []*Channel) *CreateTrainingJobInput {
	s.InputDataConfig = v
	return s
}
834499
func (s *Factory) ConfigMaps() corev1.ConfigMapInterface {
	return s.coreClientSet.ConfigMaps(s.namespace)
}
313831
func (s *StartChannelOutput) SetInputAttachments(v []*InputAttachment) *StartChannelOutput {
	s.InputAttachments = v
	return s
}
398292
func (s *StartDocumentClassificationJobInput) SetInputDataConfig(v *InputDataConfig) *StartDocumentClassificationJobInput {
	s.InputDataConfig = v
	return s
}
412837
func (s *SqlApplicationConfiguration) SetInputs(v []*Input) *SqlApplicationConfiguration {
	s.Inputs = v
	return s
}
11559
func CreateConfigMap(cfg *kubeletconfig.KubeletConfiguration, k8sVersionStr string, client clientset.Interface) error {

	k8sVersion, err := version.ParseSemantic(k8sVersionStr)
	if err != nil {
		return err
	}

	configMapName := kubeadmconstants.GetKubeletConfigMapName(k8sVersion)
	fmt.Printf("[kubelet] Creating a ConfigMap %q in namespace %s with the configuration for the kubelets in the cluster\n", configMapName, metav1.NamespaceSystem)

	kubeletBytes, err := getConfigBytes(cfg)
	if err != nil {
		return err
	}

	if err := apiclient.CreateOrUpdateConfigMap(client, &v1.ConfigMap{
		ObjectMeta: metav1.ObjectMeta{
			Name:      configMapName,
			Namespace: metav1.NamespaceSystem,
		},
		Data: map[string]string{
			kubeadmconstants.KubeletBaseConfigurationConfigMapKey: string(kubeletBytes),
		},
	}); err != nil {
		return err
	}

	if err := createConfigMapRBACRules(client, k8sVersion); err != nil {
		return errors.Wrap(err, "error creating kubelet configuration configmap RBAC rules")
	}
	return nil
}
1083633
func createConfigMap(client *k8s.Client, name string, values map[string]string) error {
	cm := &v1.ConfigMap{
		Metadata: &metav1.ObjectMeta{
			Name:      &name,
			Namespace: &client.Namespace,
		},
		Data: values,
	}

	err := client.Create(context.Background(), cm)

	// If an HTTP error was returned by the API server, it will be of type
	// *k8s.APIError. This can be used to inspect the status code.
	if apiErr, ok := err.(*k8s.APIError); ok {
		// Resource already exists. Carry on.
		if apiErr.Code == http.StatusConflict {
			return nil
		}
	}
	return fmt.Errorf("create configmap: %v", err)
}
499343
func (s *InputSecurityGroup) SetInputs(v []*string) *InputSecurityGroup {
	s.Inputs = v
	return s
}
218119
func ProxyConfigMap(proxySettings proxy.Settings) map[string]interface{} {
	settings := make(map[string]interface{})
	addIfNotEmpty(settings, HTTPProxyKey, proxySettings.Http)
	addIfNotEmpty(settings, HTTPSProxyKey, proxySettings.Https)
	addIfNotEmpty(settings, FTPProxyKey, proxySettings.Ftp)
	addIfNotEmpty(settings, NoProxyKey, proxySettings.NoProxy)
	return settings
}
916757
func (s *EntityRecognizerProperties) SetInputDataConfig(v *EntityRecognizerInputDataConfig) *EntityRecognizerProperties {
	s.InputDataConfig = v
	return s
}