Skip to content

Commit

Permalink
Adds a suffix to the default podman site name (#1297)
Browse files Browse the repository at this point in the history
Fixes #1284
  • Loading branch information
fgiorgetti authored and nluaces committed Dec 6, 2023
1 parent 4cc0f7c commit 3ea978f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/skupper/skupper_podman_site.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"strings"

"github.com/google/uuid"
"github.com/skupperproject/skupper/api/types"
"github.com/skupperproject/skupper/client/container"
"github.com/skupperproject/skupper/pkg/domain"
Expand Down Expand Up @@ -152,7 +153,8 @@ Recommendation:

func getUserDefaultPodmanName() (string, error) {
hostname, _ := os.Hostname()
return hostname + "-" + strings.ToLower(podman.Username), nil
defaultName := fmt.Sprintf("%s-%s-%s", hostname, strings.ToLower(podman.Username), uuid.NewString()[:5])
return defaultName, nil
}

func (s *SkupperPodmanSite) CreateFlags(cmd *cobra.Command) {
Expand Down

0 comments on commit 3ea978f

Please sign in to comment.