code: func MakeDockerKeyring(passedSecrets []api.Secret, defaultKeyring DockerKeyring) (DockerKeyring, error) {
  	passedCredentials := []DockerConfig{}
  	for _, passedSecret := range passedSecrets {
  		if dockerConfigJsonBytes, dockerConfigJsonExists := passedSecret.Data[api.DockerConfigJsonKey]; (passedSecret.Type == api.SecretTypeDockerConfigJson) && dockerConfigJsonExists && (len(dockerConfigJsonBytes) > 0) {
  			dockerConfigJson := DockerConfigJson{}
  			if err := json.Unmarshal(dockerConfigJsonBytes, &dockerConfigJson); err != nil {
  				return nil, err
  			}
  
  			passedCredentials = append(passedCredentials, dockerConfigJson.Auths)
  		} else if dockercfgBytes, dockercfgExists := passedSecret.Data[api.DockerConfigKey]; (passedSecret.Type == api.SecretTypeDockercfg) && dockercfgExists && (len(dockercfgBytes) > 0) {
  			dockercfg := DockerConfig{}
  			if err := json.Unmarshal(dockercfgBytes, &dockercfg); err != nil {
  				return nil, err
  			}
  
  			passedCredentials = append(passedCredentials, dockercfg)
  		}
  	}
  
  	if len(passedCredentials) > 0 {
  		basicKeyring := &BasicDockerKeyring{}
  		for _, currCredentials := range passedCredentials {
  			basicKeyring.Add(currCredentials)
  		}
  		return &unionDockerKeyring{[]DockerKeyring{basicKeyring, defaultKeyring}}, nil
  	}
  
  	return defaultKeyring, nil
  }
docs: // MakeDockerKeyring inspects the passedSecrets to see if they contain any DockerConfig secrets.  If they do,
  // then a DockerKeyring is built based on every hit and unioned with the defaultKeyring.
  // If they do not, then the default keyring is returned