Skip to content

Commit 4f78ea2

Browse files
authored
Merge pull request #1169 from GeertJohan/bugfix/comma-in-label-value
Change SkaffoldOption Labeller to not include a comma in the label value
2 parents aad90b0 + 3388987 commit 4f78ea2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/skaffold/config/options.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (opts *SkaffoldOptions) Labels() map[string]string {
5353
labels["namespace"] = opts.Namespace
5454
}
5555
if len(opts.Profiles) > 0 {
56-
labels["profiles"] = strings.Join(opts.Profiles, ",")
56+
labels["profiles"] = strings.Join(opts.Profiles, "__")
5757
}
5858
for _, cl := range opts.CustomLabels {
5959
l := strings.SplitN(cl, "=", 2)

pkg/skaffold/config/options_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestLabels(t *testing.T) {
5050
{
5151
description: "profiles",
5252
options: SkaffoldOptions{Profiles: []string{"profile1", "profile2"}},
53-
expectedLabels: map[string]string{"profiles": "profile1,profile2"},
53+
expectedLabels: map[string]string{"profiles": "profile1__profile2"},
5454
},
5555
{
5656
description: "all labels",
@@ -62,7 +62,7 @@ func TestLabels(t *testing.T) {
6262
expectedLabels: map[string]string{
6363
"cleanup": "true",
6464
"namespace": "namespace",
65-
"profiles": "p1,p2",
65+
"profiles": "p1__p2",
6666
},
6767
},
6868
{

0 commit comments

Comments
 (0)