Unverified Commit 808545a8 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #60602 from bendrucker/docker-registry-email-optional

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. remove docker-email from required args for "create secret docker-registry" Completes https://github.com/kubernetes/kubernetes/pull/42191 While that removed `docker-email` as required from the generator, the CLI still asserts the presence of the argument resulting in "error: flag docker-email is required" when `--docker-email` is omitted from a `kubectl create secret docker-registry` call. Comments on the original issue (https://github.com/kubernetes/kubernetes/issues/41727) note that this change is still needed to accomplish the original intent.
parents 3b04de4b aa139f16
......@@ -182,7 +182,7 @@ func CreateSecretDockerRegistry(f cmdutil.Factory, cmdOut io.Writer, cmd *cobra.
if err != nil {
return err
}
requiredFlags := []string{"docker-username", "docker-password", "docker-email", "docker-server"}
requiredFlags := []string{"docker-username", "docker-password", "docker-server"}
for _, requiredFlag := range requiredFlags {
if value := cmdutil.GetFlagString(cmd, requiredFlag); len(value) == 0 {
return cmdutil.UsageErrorf(cmd, "flag %s is required", requiredFlag)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment