Skip to content

Commit

Permalink
Merge pull request #123041 from dims/use-metadata-file-when-values-ha…
Browse files Browse the repository at this point in the history
…ve-special-characters

[gce_runner] use metadata file when values have special characters
  • Loading branch information
k8s-ci-robot authored Jan 31, 2024
2 parents 46c9bd1 + 717a000 commit a9e4f5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/e2e_node/remote/gce/gce_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,8 @@ func (g *GCERunner) createGCEInstance(imageConfig *internalGCEImage) (string, er
var itemFileArgs []string
for _, item := range imageConfig.metadata.Items {
if strings.HasPrefix(item.Key, "user-") || strings.HasPrefix(item.Key, "startup-") ||
strings.HasPrefix(item.Key, "containerd-") || strings.HasPrefix(item.Key, "cni-") {
strings.HasPrefix(item.Key, "containerd-") || strings.HasPrefix(item.Key, "cni-") ||
strings.ContainsAny(item.Value, ",:") {
dataFile, err := os.CreateTemp("", "metadata")
if err != nil {
return "", fmt.Errorf("unable to create temp file %v", err)
Expand Down

0 comments on commit a9e4f5b

Please sign in to comment.