Change:
<!-- Thanks for filing an issue! Before hitting the button, please answer these questions.--Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see ): What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): Is this a BUG REPORT or FEATURE REQUEST? (choose one): <!-- If this is a BUG REPORT, please: Fill in as much of the template below as you can. If you leave out information, we can't help you as well. If this is a FEATURE REQUEST, please: Describe in detail the feature/behavior/change you'd like to see. In both cases, be ready for followup questions, and please respond in a timely manner. If we can't reproduce a bug or think a feature already exists, we might close your issue. If we're wrong, PLEASE feel free to reopen it and explain why. --Kubernetes version (use ): Environment: Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others: What happened: When I create a docker registry secret, the is also a MUST, I think we should make this parameter as optional as there is no need always put when creating a docker registry secret. What you expected to happen: How to reproduce it (as minimally and precisely as possible): Anything else we need to know:
Agree it should not be required
Did this change get reverted? I do not see as optional on stable.
I feel that this code should be changed because "--docker-email flag" is no longer required.
error: flag docker-email is required. On kubenetes 1.10.3, the above error message still exists
The field is still required. This is very frustrating as does not require an email but Kubernetes does? Is there a good reason for this?
Why is this closed? As far as I can see it is still required?

Discussion:
$ docker login DOCKER_REGISTRY_SERVER --username=DOCKER_USER --password=DOCKER_PASSWORD --email=DOCKER_EMAIL'. That produces a ~/.dockercfg file that is used by subsequent 'docker push' and 'docker pull' commands to <del> authenticate to the registry. </del> <ins> authenticate to the registry. The email address is optional. </ins> When creating applications, you may have a Docker registry that requires authentication.  In order for the nodes to pull images on your behalf, they have to have the credentials.  You can provide this information

cmd.Flags().String("docker-password", "", i18n.T("Password for Docker registry authentication")) cmd.MarkFlagRequired("docker-password") cmd.Flags().String("docker-email", "", i18n.T("Email for Docker registry")) <del> cmd.MarkFlagRequired("docker-email") </del> cmd.Flags().String("docker-server", "https://index.docker.io/v1/", i18n.T("Server location for Docker registry")) cmdutil.AddInclude3rdPartyFlags(cmd) return cmd

Name string // Username for registry (required) Username string <del> // Email for registry (required) </del> <ins> // Email for registry (optional) </ins> Email string // Password for registry (required) Password string

return []GeneratorParam{ {"name", true}, {"docker-username", true}, <del> {"docker-email", true}, </del> <ins> {"docker-email", false}, </ins> {"docker-password", true}, {"docker-server", true}, }

if len(s.Username) == 0 { return fmt.Errorf("username must be specified") } <del> if len(s.Email) == 0 { return fmt.Errorf("email must be specified") } </del> if len(s.Password) == 0 { return fmt.Errorf("password must be specified") }

if err != nil { t.Errorf("unexpected error: %v", err) } <ins> secretDataNoEmail, err := handleDockercfgContent(username, password, "", server) if err != nil { t.Errorf("unexpected error: %v", err) } </ins> tests := map[string]struct { params    map[string]interface{}

}, expectErr: false, }, <ins> "test-valid-use-no-email": { params: map[string]interface{}{ "name":            "foo", "docker-server":   server, "docker-username": username, "docker-password": password, }, expected: &api.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ api.DockerConfigKey: secretDataNoEmail, }, Type: api.SecretTypeDockercfg, }, expectErr: false, }, </ins> "test-missing-required-param": { params: map[string]interface{}{ "name":            "foo",