(plugins []string, pluginEnvs PluginEnvVars, kubeconfig Kubeconfig, e2eRegistryConfig, k8sVersion string, client image.Client)
| 402 | } |
| 403 | |
| 404 | func deleteImages(plugins []string, pluginEnvs PluginEnvVars, kubeconfig Kubeconfig, e2eRegistryConfig, k8sVersion string, client image.Client) []error { |
| 405 | images, err := collectPluginsImages(plugins, pluginEnvs, k8sVersion, client) |
| 406 | if err != nil { |
| 407 | return []error{err, errors.Errorf("unable to collect images of plugins")} |
| 408 | } |
| 409 | if e2eRegistryConfig != "" { |
| 410 | imagePairs, err := convertImagesToPairs(images, "", e2eRegistryConfig, k8sVersion) |
| 411 | if err != nil { |
| 412 | return []error{err} |
| 413 | } |
| 414 | images = []string{} |
| 415 | for _, imagePair := range imagePairs { |
| 416 | images = append(images, imagePair.Dst) |
| 417 | } |
| 418 | } |
| 419 | return client.DeleteImages(images, numDockerRetries) |
| 420 | } |
| 421 | |
| 422 | func contains(set []string, val string) bool { |
| 423 | for _, v := range set { |
no test coverage detected