Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kompose for openSUSE:Factory checked in at 2026-11-25 16:13:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kompose (Old) and /work/SRC/openSUSE:Factory/.kompose.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kompose" Wed Nov 25 16:13:14 2026 rev:15 rq:1400473 version:1.39.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kompose/kompose.changes 2026-01-17 14:54:21.650200404 +0100 +++ /work/SRC/openSUSE:Factory/.kompose.new.1340718/kompose.changes 2026-11-25 16:15:00.541613059 +0100 @@ -1,0 +2,15 @@ +Wed Nov 25 05:47:50 UTC 2026 - Johannes Kastl <[email protected]> + +- Update to version 1.39.0: + * transformer: keep raw bytes in ConfigMap binaryData (#2143) + * go.mod: require openshift/api by commit so go install works + (#2129) + * transformer: don't panic on volume name plus access mode + (#2128) + * add integration tests + * fix of bug #1897 + * fix: recurse checkIsEmptyDir with correct path and nested + result (#2102) + * fix: do not emit duplicate PVC artifacts for StatefulSets + +------------------------------------------------------------------- Old: ---- kompose-1.38.0.obscpio New: ---- kompose-1.39.0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kompose.spec ++++++ --- /var/tmp/diff_new_pack.03sIFX/_old 2026-11-25 16:15:06.937884843 +0100 +++ /var/tmp/diff_new_pack.03sIFX/_new 2026-11-25 16:15:06.940884970 +0100 @@ -17,7 +17,7 @@ Name: kompose -Version: 1.38.0 +Version: 1.39.0 Release: 0 Summary: Go from Docker Compose to Kubernetes License: Apache-2.0 @@ -29,7 +29,7 @@ BuildRequires: fish BuildRequires: python3-PyYAML BuildRequires: zsh -BuildRequires: golang(API) >= 1.22 +BuildRequires: golang(API) >= 1.24 %description kompose is a tool to help users who are familiar with docker-compose move to ++++++ _service ++++++ --- /var/tmp/diff_new_pack.03sIFX/_old 2026-11-25 16:15:07.002887599 +0100 +++ /var/tmp/diff_new_pack.03sIFX/_new 2026-11-25 16:15:07.006887768 +0100 @@ -3,7 +3,7 @@ <param name="url">https://github.com/kubernetes/kompose.git</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v1.38.0</param> + <param name="revision">v1.39.0</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.03sIFX/_old 2026-11-25 16:15:07.046889465 +0100 +++ /var/tmp/diff_new_pack.03sIFX/_new 2026-11-25 16:15:07.051889676 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/kubernetes/kompose.git</param> - <param name="changesrevision">a8f5d1cbdcfe3b47cb5c936fb1d57966390064a8</param></service></servicedata> + <param name="changesrevision">f90c0f540a858977af465b2ddea5d0126eb875c4</param></service></servicedata> (No newline at EOF) ++++++ kompose-1.38.0.obscpio -> kompose-1.39.0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/README.md new/kompose-1.39.0/README.md --- old/kompose-1.38.0/README.md 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/README.md 2026-11-24 19:56:52.000000000 +0100 @@ -49,10 +49,10 @@ ```sh # Linux -curl -L https://github.com/kubernetes/kompose/releases/download/v1.38.0/kompose-linux-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.39.0/kompose-linux-amd64 -o kompose # macOS -curl -L https://github.com/kubernetes/kompose/releases/download/v1.38.0/kompose-darwin-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.39.0/kompose-darwin-amd64 -o kompose chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose @@ -60,7 +60,7 @@ **Windows:** -Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v1.38.0/kompose-windows-amd64.exe) and add the binary to your PATH. +Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v1.39.0/kompose-windows-amd64.exe) and add the binary to your PATH. ## Shell autocompletion diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/build/VERSION new/kompose-1.39.0/build/VERSION --- old/kompose-1.38.0/build/VERSION 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/build/VERSION 2026-11-24 19:56:52.000000000 +0100 @@ -1 +1 @@ -1.38.0 +1.39.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/docs/installation.md new/kompose-1.39.0/docs/installation.md --- old/kompose-1.38.0/docs/installation.md 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/docs/installation.md 2026-11-24 19:56:52.000000000 +0100 @@ -24,16 +24,16 @@ ```sh # Linux -curl -L https://github.com/kubernetes/kompose/releases/download/v1.38.0/kompose-linux-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.39.0/kompose-linux-amd64 -o kompose # Linux ARM64 -curl -L https://github.com/kubernetes/kompose/releases/download/v1.38.0/kompose-linux-arm64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.39.0/kompose-linux-arm64 -o kompose # macOS -curl -L https://github.com/kubernetes/kompose/releases/download/v1.38.0/kompose-darwin-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.39.0/kompose-darwin-amd64 -o kompose # macOS ARM64 -curl -L https://github.com/kubernetes/kompose/releases/download/v1.38.0/kompose-darwin-arm64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.39.0/kompose-darwin-arm64 -o kompose chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose @@ -41,7 +41,7 @@ **Windows:** -Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v1.38.0/kompose-windows-amd64.exe) and add the binary to your PATH. +Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v1.39.0/kompose-windows-amd64.exe) and add the binary to your PATH. ## Go diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/go.mod new/kompose-1.39.0/go.mod --- old/kompose-1.38.0/go.mod 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/go.mod 2026-11-24 19:56:52.000000000 +0100 @@ -2,8 +2,6 @@ go 1.24.0 -replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20230704153349-abb98ff04d03 - require ( github.com/compose-spec/compose-go/v2 v2.10.0 github.com/deckarep/golang-set v1.8.0 @@ -14,7 +12,7 @@ github.com/joho/godotenv v1.5.1 github.com/mattn/go-shellwords v1.0.12 github.com/novln/docker-parser v1.0.0 - github.com/openshift/api v3.9.0+incompatible + github.com/openshift/api v0.0.0-20230704153349-abb98ff04d03 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.4 github.com/spf13/cast v1.10.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/pkg/loader/compose/compose.go new/kompose-1.39.0/pkg/loader/compose/compose.go --- old/kompose-1.38.0/pkg/loader/compose/compose.go 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/pkg/loader/compose/compose.go 2026-11-24 19:56:52.000000000 +0100 @@ -469,7 +469,7 @@ // No need to modify before importation name := parseResourceName(composeServiceConfig.Name, composeServiceConfig.Labels) serviceConfig := kobject.ServiceConfig{} - serviceConfig.Name = name + serviceConfig.Name = normalizeServiceNames(name) serviceConfig.Image = composeServiceConfig.Image serviceConfig.WorkingDir = composeServiceConfig.WorkingDir serviceConfig.Annotations = composeServiceConfig.Labels diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/pkg/loader/compose/compose_test.go new/kompose-1.39.0/pkg/loader/compose/compose_test.go --- old/kompose-1.38.0/pkg/loader/compose/compose_test.go 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/pkg/loader/compose/compose_test.go 2026-11-24 19:56:52.000000000 +0100 @@ -562,18 +562,62 @@ }{ {"foo_bar", "foo-bar"}, {"foo", "foo"}, - {"foo.bar", "foo.bar"}, + {"foo.bar", "foo-bar"}, //{"", ""}, } for _, testCase := range testCases { returnValue := normalizeServiceNames(testCase.composeServiceName) if returnValue != testCase.normalizedServiceName { - t.Logf("Expected %q, got %q", testCase.normalizedServiceName, returnValue) + t.Errorf("Expected %q, got %q", testCase.normalizedServiceName, returnValue) } } } +func TestLoadComposeServiceNameWithUnderscore(t *testing.T) { + composeFile, err := os.CreateTemp(t.TempDir(), "compose-*.yaml") + if err != nil { + t.Fatal(err) + } + defer os.Remove(composeFile.Name()) + + content := ` +services: + foo_bar: + image: nginx + ports: + - "8080:80" +` + if _, err := composeFile.WriteString(content); err != nil { + t.Fatal(err) + } + if err := composeFile.Close(); err != nil { + t.Fatal(err) + } + + c := Compose{} + komposeObject, err := c.LoadFile([]string{composeFile.Name()}, nil, true) + if err != nil { + t.Fatalf("LoadFile failed: %v", err) + } + + svc, ok := komposeObject.ServiceConfigs["foo-bar"] + if !ok { + t.Fatalf("Expected normalized service key %q, got keys: %v", "foo-bar", getKeys(komposeObject.ServiceConfigs)) + } + if svc.Name != "foo-bar" { + t.Errorf("Expected service name %q, got %q", "foo-bar", svc.Name) + } +} + +func getKeys(m map[string]kobject.ServiceConfig) []string { + keys := make([]string, 0, len(m)) + for k := range m { + keys = append(keys, k) + } + return keys +} + func TestNormalizeNetworkNames(t *testing.T) { testCases := []struct { composeNetworkName string diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/pkg/transformer/kubernetes/configmap_binary_test.go new/kompose-1.39.0/pkg/transformer/kubernetes/configmap_binary_test.go --- old/kompose-1.38.0/pkg/transformer/kubernetes/configmap_binary_test.go 1970-01-01 01:00:00.000000000 +0100 +++ new/kompose-1.39.0/pkg/transformer/kubernetes/configmap_binary_test.go 2026-11-24 19:56:52.000000000 +0100 @@ -0,0 +1,60 @@ +/* +Copyright 2017 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubernetes + +import ( + "encoding/base64" + "encoding/json" + "testing" + + api "k8s.io/api/core/v1" +) + +func TestInitConfigMapDataBinaryIsNotPreEncoded(t *testing.T) { + raw := []byte{0x00, 0x01, 0xff, 0xfe, 'x'} + cm := &api.ConfigMap{} + initConfigMapData(cm, map[string]string{ + "blob.bin": string(raw), + "note.txt": "hello\r\n", + }) + + if got := cm.BinaryData["blob.bin"]; string(got) != string(raw) { + t.Fatalf("BinaryData = %v, want raw file bytes", got) + } + if _, ok := cm.Data["blob.bin"]; ok { + t.Fatal("binary file was stored in Data") + } + if cm.Data["note.txt"] != "hello\n" { + t.Fatalf("text Data = %q, want CRLF normalized", cm.Data["note.txt"]) + } + + encoded, err := json.Marshal(cm.BinaryData) + if err != nil { + t.Fatal(err) + } + var asStrings map[string]string + if err := json.Unmarshal(encoded, &asStrings); err != nil { + t.Fatal(err) + } + got, err := base64.StdEncoding.DecodeString(asStrings["blob.bin"]) + if err != nil { + t.Fatal(err) + } + if string(got) != string(raw) { + t.Fatalf("marshaled binaryData decodes to %v, want %v", got, raw) + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/pkg/transformer/kubernetes/k8sutils.go new/kompose-1.39.0/pkg/transformer/kubernetes/k8sutils.go --- old/kompose-1.38.0/pkg/transformer/kubernetes/k8sutils.go 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/pkg/transformer/kubernetes/k8sutils.go 2026-11-24 19:56:52.000000000 +0100 @@ -565,7 +565,21 @@ volumesMount = append(volumesMount, TmpVolumesMount...) } - if pvc != nil && opt.Controller != StatefulStateController { + // A StatefulSet owns its claims through volumeClaimTemplates, filled in from + // the same pvc slice below, so it must not also get standalone PVC objects or + // pod template volumes bound to them. Read that from the objects generated + // rather than the requested controller type: restart "no" or "on-failure" + // without a controller flag yields a bare Pod or a CronJob even when the + // kompose.controller.type label asks for a StatefulSet. + isStatefulSet := false + for _, obj := range *objects { + if _, ok := obj.(*appsv1.StatefulSet); ok { + isStatefulSet = true + break + } + } + + if pvc != nil && !isStatefulSet { // Looping on the slice pvc instead of `*objects = append(*objects, pvc...)` // because the type of objects and pvc is different, but when doing append // one element at a time it gets converted to runtime.Object for objects slice @@ -597,8 +611,17 @@ template.Spec.Containers[0].VolumeMounts = append(template.Spec.Containers[0].VolumeMounts, volumesMount...) template.Spec.Containers[0].Stdin = service.Stdin template.Spec.Containers[0].TTY = service.Tty - if opt.Controller != StatefulStateController || opt.Volumes == "configMap" { + + if !isStatefulSet || opt.Volumes == "configMap" { template.Spec.Volumes = append(template.Spec.Volumes, volumes...) + } else { + // Claim-backed volumes arrive through volumeClaimTemplates; the rest + // still belong to the pod template. + for _, vol := range volumes { + if vol.PersistentVolumeClaim == nil { + template.Spec.Volumes = append(template.Spec.Volumes, vol) + } + } } template.Spec.Affinity = ConfigAffinity(service) template.Spec.TopologySpreadConstraints = ConfigTopologySpreadConstraints(service) @@ -1278,10 +1301,13 @@ if !file.IsDir() { return false, nil } - _, err := checkIsEmptyDir(file.Name()) + isEmpty, err := checkIsEmptyDir(filepath.Join(filePath, file.Name())) if err != nil { return false, err } + if !isEmpty { + return false, nil + } } return true, nil } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/pkg/transformer/kubernetes/k8sutils_test.go new/kompose-1.39.0/pkg/transformer/kubernetes/k8sutils_test.go --- old/kompose-1.38.0/pkg/transformer/kubernetes/k8sutils_test.go 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/pkg/transformer/kubernetes/k8sutils_test.go 2026-11-24 19:56:52.000000000 +0100 @@ -2503,6 +2503,15 @@ wantSkip: false, }, { + name: "nested dir not empty", + args: args{ + filePath: "../../../script/test/fixtures/configmap-file-configs/certs-level1", + }, + wantUseConfigMap: true, + wantReadonly: true, + wantSkip: false, + }, + { name: "sock", args: args{ filePath: "./docker.sock", @@ -2590,6 +2599,14 @@ want: false, wantErr: false, }, + { + name: "nested dir not empty", + args: args{ + filePath: "../../../script/test/fixtures/configmap-file-configs/certs-level1", + }, + want: false, + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2605,6 +2622,39 @@ } } +func Test_checkIsEmptyDir_nestedNonEmpty(t *testing.T) { + dir := t.TempDir() + nested := filepath.Join(dir, "subdir", "deep") + if err := os.MkdirAll(nested, 0o755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(nested, "file.txt"), []byte("data"), 0o644); err != nil { + t.Fatal(err) + } + got, err := checkIsEmptyDir(dir) + if err != nil { + t.Fatalf("checkIsEmptyDir() unexpected error = %v", err) + } + if got { + t.Errorf("checkIsEmptyDir() = true, want false for directory with nested file") + } +} + +func Test_checkIsEmptyDir_nestedEmpty(t *testing.T) { + dir := t.TempDir() + nested := filepath.Join(dir, "a", "b", "c") + if err := os.MkdirAll(nested, 0o755); err != nil { + t.Fatal(err) + } + got, err := checkIsEmptyDir(dir) + if err != nil { + t.Fatalf("checkIsEmptyDir() error = %v", err) + } + if !got { + t.Errorf("checkIsEmptyDir() = %v, want true", got) + } +} + func Test_removeFromSlice(t *testing.T) { type args struct { objects []runtime.Object diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/pkg/transformer/kubernetes/kubernetes.go new/kompose-1.39.0/pkg/transformer/kubernetes/kubernetes.go --- old/kompose-1.38.0/pkg/transformer/kubernetes/kubernetes.go 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/pkg/transformer/kubernetes/kubernetes.go 2026-11-24 19:56:52.000000000 +0100 @@ -17,7 +17,6 @@ package kubernetes import ( - "encoding/base64" "fmt" "os" "os/exec" @@ -356,7 +355,10 @@ if isText { stringData[k] = lfText } else { - binData[k] = []byte(base64.StdEncoding.EncodeToString([]byte(v))) + // BinaryData is base64-encoded when the object is marshaled. + // Store the file bytes so the printed manifest decodes once + // back to the original content. + binData[k] = []byte(v) } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/pkg/transformer/kubernetes/kubernetes_test.go new/kompose-1.39.0/pkg/transformer/kubernetes/kubernetes_test.go --- old/kompose-1.38.0/pkg/transformer/kubernetes/kubernetes_test.go 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/pkg/transformer/kubernetes/kubernetes_test.go 2026-11-24 19:56:52.000000000 +0100 @@ -1322,3 +1322,204 @@ }) } } + +// pvcServiceConfig returns the service from kubernetes/kompose#2090: a single +// named volume converted to a PersistentVolumeClaim. +func pvcServiceConfig(labels map[string]string) kobject.ServiceConfig { + return kobject.ServiceConfig{ + Name: "postgresql", + ContainerName: "postgresql", + Image: "postgres:13-alpine", + Replicas: 1, + Volumes: []kobject.Volumes{ + { + SvcName: "postgresql", + MountPath: "/var/lib/postgresql/data", + Container: "/var/lib/postgresql/data", + PVCName: "pgdata", + PVCSize: "1Gi", + }, + }, + Labels: labels, + } +} + +// TestStatefulSetDoesNotDuplicatePVC covers kubernetes/kompose#2090: a +// StatefulSet owns its volume through volumeClaimTemplates, so conversion must +// emit neither a standalone PersistentVolumeClaim, which would have no consumer +// and stay Pending, nor a pod template volume bound to the same claim. +func TestStatefulSetDoesNotDuplicatePVC(t *testing.T) { + komposeObject := kobject.KomposeObject{ + ServiceConfigs: map[string]kobject.ServiceConfig{ + "postgresql": pvcServiceConfig(map[string]string{ + compose.LabelControllerType: StatefulStateController, + "kompose.volume.type": "persistentVolumeClaim", + "kompose.volume.size": "1Gi", + }), + }, + } + + // No --controller flag, so the controller type comes from the + // kompose.controller.type label, as in the reported compose file. + k := Kubernetes{} + objs, err := k.Transform(komposeObject, kobject.ConvertOptions{}) + if err != nil { + t.Fatalf("k.Transform failed: %v", err) + } + + var statefulSets []*appsv1.StatefulSet + var standalonePVCs []string + for _, obj := range objs { + switch o := obj.(type) { + case *appsv1.StatefulSet: + statefulSets = append(statefulSets, o) + case *api.PersistentVolumeClaim: + standalonePVCs = append(standalonePVCs, o.Name) + } + } + + if len(standalonePVCs) != 0 { + t.Errorf("expected no standalone PersistentVolumeClaim objects for a StatefulSet, got %v", standalonePVCs) + } + if len(statefulSets) != 1 { + t.Fatalf("expected 1 StatefulSet, got %d", len(statefulSets)) + } + + statefulSet := statefulSets[0] + if len(statefulSet.Spec.VolumeClaimTemplates) != 1 { + t.Fatalf("expected 1 volumeClaimTemplate, got %d", len(statefulSet.Spec.VolumeClaimTemplates)) + } + claimName := statefulSet.Spec.VolumeClaimTemplates[0].Name + if claimName != "pgdata" { + t.Errorf("expected volumeClaimTemplate named %q, got %q", "pgdata", claimName) + } + + for _, vol := range statefulSet.Spec.Template.Spec.Volumes { + if vol.PersistentVolumeClaim != nil { + t.Errorf("StatefulSet pod template has volume %q backed by claim %q; volumeClaimTemplates already provides it", + vol.Name, vol.PersistentVolumeClaim.ClaimName) + } + } + + // The container must still mount the volume volumeClaimTemplates creates. + mounts := statefulSet.Spec.Template.Spec.Containers[0].VolumeMounts + var mounted bool + for _, mount := range mounts { + if mount.Name == claimName { + mounted = true + if mount.MountPath != "/var/lib/postgresql/data" { + t.Errorf("expected %q mounted at %q, got %q", claimName, "/var/lib/postgresql/data", mount.MountPath) + } + } + } + if !mounted { + t.Errorf("expected container to mount %q, got mounts %v", claimName, mounts) + } +} + +// TestPodFromRestartPolicyKeepsStandalonePVC covers the other direction: a +// restart policy of "no" or "on-failure" yields a bare Pod when no controller +// flag is given, even when kompose.controller.type asks for a StatefulSet. A +// Pod has no volumeClaimTemplates, so suppressing the claim there would leave +// the container mounting a volume that does not exist. +func TestPodFromRestartPolicyKeepsStandalonePVC(t *testing.T) { + service := pvcServiceConfig(map[string]string{ + compose.LabelControllerType: StatefulStateController, + "kompose.volume.type": "persistentVolumeClaim", + "kompose.volume.size": "1Gi", + }) + service.Restart = "on-failure" + + komposeObject := kobject.KomposeObject{ + ServiceConfigs: map[string]kobject.ServiceConfig{"postgresql": service}, + } + + k := Kubernetes{} + objs, err := k.Transform(komposeObject, kobject.ConvertOptions{}) + if err != nil { + t.Fatalf("k.Transform failed: %v", err) + } + + var pods []*api.Pod + var standalonePVCs []string + for _, obj := range objs { + switch o := obj.(type) { + case *api.Pod: + pods = append(pods, o) + case *api.PersistentVolumeClaim: + standalonePVCs = append(standalonePVCs, o.Name) + } + } + + if len(pods) != 1 { + t.Fatalf("expected 1 Pod, got %d", len(pods)) + } + if len(standalonePVCs) != 1 || standalonePVCs[0] != "pgdata" { + t.Errorf("expected a standalone PersistentVolumeClaim %q, got %v", "pgdata", standalonePVCs) + } + + volumes := map[string]bool{} + for _, vol := range pods[0].Spec.Volumes { + volumes[vol.Name] = true + } + for _, mount := range pods[0].Spec.Containers[0].VolumeMounts { + if !volumes[mount.Name] { + t.Errorf("container mounts %q but the Pod declares no such volume, so the API server rejects it (volumes: %v)", + mount.Name, pods[0].Spec.Volumes) + } + } +} + +// TestStatefulSetKeepsNonClaimVolumes covers the other half of the suppression: +// only claim-backed volumes move to volumeClaimTemplates, so every other volume +// must stay in the pod template. A mount with nothing behind it is an invalid +// manifest. +func TestStatefulSetKeepsNonClaimVolumes(t *testing.T) { + komposeObject := kobject.KomposeObject{ + ServiceConfigs: map[string]kobject.ServiceConfig{ + "postgresql": pvcServiceConfig(map[string]string{ + compose.LabelControllerType: StatefulStateController, + "kompose.volume.type": "emptyDir", + }), + }, + } + + k := Kubernetes{} + objs, err := k.Transform(komposeObject, kobject.ConvertOptions{}) + if err != nil { + t.Fatalf("k.Transform failed: %v", err) + } + + var statefulSet *appsv1.StatefulSet + for _, obj := range objs { + if o, ok := obj.(*appsv1.StatefulSet); ok { + statefulSet = o + } + } + if statefulSet == nil { + t.Fatalf("expected a StatefulSet, got %v", objs) + } + if len(statefulSet.Spec.VolumeClaimTemplates) != 0 { + t.Fatalf("an emptyDir volume needs no claim, got %d volumeClaimTemplate(s)", + len(statefulSet.Spec.VolumeClaimTemplates)) + } + + mounts := statefulSet.Spec.Template.Spec.Containers[0].VolumeMounts + if len(mounts) == 0 { + t.Fatalf("expected the container to mount the volume, got no mounts") + } + + backed := map[string]bool{} + for _, vol := range statefulSet.Spec.Template.Spec.Volumes { + if vol.EmptyDir == nil { + t.Errorf("expected volume %q to be an emptyDir, got %+v", vol.Name, vol.VolumeSource) + } + backed[vol.Name] = true + } + for _, mount := range mounts { + if !backed[mount.Name] { + t.Errorf("container mounts %q but the pod template declares no such volume, so the manifest is invalid (volumes: %v)", + mount.Name, statefulSet.Spec.Template.Spec.Volumes) + } + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/pkg/transformer/utils.go new/kompose-1.39.0/pkg/transformer/utils.go --- old/kompose-1.38.0/pkg/transformer/utils.go 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/pkg/transformer/utils.go 2026-11-24 19:56:52.000000000 +0100 @@ -108,6 +108,11 @@ volumeStrings = volumeStrings[:len(volumeStrings)-1] } + if len(volumeStrings) == 0 { + err = fmt.Errorf("invalid volume format: %s", volume) + return + } + // Check the volume format as well as host container = volumeStrings[len(volumeStrings)-1] volumeStrings = volumeStrings[:len(volumeStrings)-1] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/pkg/transformer/utils_test.go new/kompose-1.39.0/pkg/transformer/utils_test.go --- old/kompose-1.38.0/pkg/transformer/utils_test.go 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/pkg/transformer/utils_test.go 2026-11-24 19:56:52.000000000 +0100 @@ -242,6 +242,26 @@ } } +func TestParseVolumeNameAndAccessMode(t *testing.T) { + // name + access mode (no container path) used to panic: + // parseVolume strips the name and the trailing mode, then indexes [-1]. + for _, volume := range []string{"myvol:ro", "myvol:rw", "myvol:z", "myvol:Z"} { + _, _, _, _, err := ParseVolume(volume) + if err == nil { + t.Errorf("ParseVolume(%q) succeeded, expected invalid volume format", volume) + } + } + + // well-formed volumes with a trailing mode still parse + name, host, container, mode, err := ParseVolume("myvol:/data:ro") + if err != nil { + t.Fatalf("ParseVolume(myvol:/data:ro) returned unexpected error %v", err) + } + if name != "myvol" || host != "" || container != "/data" || mode != "ro" { + t.Errorf("ParseVolume(myvol:/data:ro) = (%q, %q, %q, %q), want (myvol, \"\", /data, ro)", name, host, container, mode) + } +} + func TestParseVolume(t *testing.T) { name1 := "datavolume" host1 := "./cache" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/pkg/version/version.go new/kompose-1.39.0/pkg/version/version.go --- old/kompose-1.38.0/pkg/version/version.go 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/pkg/version/version.go 2026-11-24 19:56:52.000000000 +0100 @@ -2,7 +2,7 @@ var ( // VERSION is version number that will be displayed when running ./kompose version - VERSION = "1.38.0" + VERSION = "1.39.0" // GITCOMMIT is hash of the commit that will be displayed when running ./kompose version // this will be overwritten when running build like this: go build -ldflags="-X github.com/kubernetes/kompose/pkg/version.GITCOMMIT=$(GITCOMMIT)" // HEAD is default indicating that this was not set during build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/script/test/cmd/tests.sh new/kompose-1.39.0/script/test/cmd/tests.sh --- old/kompose-1.38.0/script/test/cmd/tests.sh 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/script/test/cmd/tests.sh 2026-11-24 19:56:52.000000000 +0100 @@ -448,3 +448,11 @@ k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/security-contexts/compose.yaml convert --stdout --with-kompose-annotation=false --service-group-mode label" k8s_output="$KOMPOSE_ROOT/script/test/fixtures/security-contexts/output-k8s.yaml" convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1 + +# Test service names containing dots are normalized to dashes (bug #1897) +k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/service-name-dots/compose.yaml convert --stdout --with-kompose-annotation=false" +k8s_output="$KOMPOSE_ROOT/script/test/fixtures/service-name-dots/output-k8s.yaml" +os_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/service-name-dots/compose.yaml convert --provider openshift --stdout --with-kompose-annotation=false" +os_output="$KOMPOSE_ROOT/script/test/fixtures/service-name-dots/output-os.yaml" +convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" "Service name in docker-compose has been changed" || exit 1 +convert::expect_success_and_warning "$os_cmd" "$os_output" "Service name in docker-compose has been changed" || exit 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/script/test/cmd/update-e2e.sh new/kompose-1.39.0/script/test/cmd/update-e2e.sh --- old/kompose-1.38.0/script/test/cmd/update-e2e.sh 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/script/test/cmd/update-e2e.sh 2026-11-24 19:56:52.000000000 +0100 @@ -29,6 +29,7 @@ $KOMPOSE_ROOT/kompose -f $KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/docker-compose-v2.yaml convert --stdout --with-kompose-annotation=false > $KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/output-k8s-v2.yaml $KOMPOSE_ROOT/kompose -f $KOMPOSE_ROOT/script/test/fixtures/compose-file-support/compose.yaml convert --stdout --with-kompose-annotation=false > $KOMPOSE_ROOT/script/test/fixtures/compose-file-support/output-k8s.yaml $KOMPOSE_ROOT/kompose -f $KOMPOSE_ROOT/script/test/fixtures/env/docker-compose.yml convert --stdout --with-kompose-annotation=false > $KOMPOSE_ROOT/script/test/fixtures/env/output-k8s.yaml +$KOMPOSE_ROOT/kompose -f $KOMPOSE_ROOT/script/test/fixtures/service-name-dots/compose.yaml convert --stdout --with-kompose-annotation=false > $KOMPOSE_ROOT/script/test/fixtures/service-name-dots/output-k8s.yaml fi if $UPDATE_OS ; then @@ -50,4 +51,5 @@ $KOMPOSE_ROOT/kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/docker-compose-v1.yaml convert --stdout --with-kompose-annotation=false > $KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/output-os-v1.yaml $KOMPOSE_ROOT/kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/docker-compose-v2.yaml convert --stdout --with-kompose-annotation=false > $KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/output-os-v2.yaml $KOMPOSE_ROOT/kompose -f $KOMPOSE_ROOT/script/test/fixtures/env/docker-compose.yml convert --stdout --with-kompose-annotation=false --provider openshift > $KOMPOSE_ROOT/script/test/fixtures/env/output-os.yaml +$KOMPOSE_ROOT/kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/service-name-dots/compose.yaml convert --stdout --with-kompose-annotation=false > $KOMPOSE_ROOT/script/test/fixtures/service-name-dots/output-os.yaml fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/script/test/fixtures/configmap-file-configs/compose-3.yaml new/kompose-1.39.0/script/test/fixtures/configmap-file-configs/compose-3.yaml --- old/kompose-1.38.0/script/test/fixtures/configmap-file-configs/compose-3.yaml 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/script/test/fixtures/configmap-file-configs/compose-3.yaml 2026-11-24 19:56:52.000000000 +0100 @@ -5,4 +5,4 @@ - "8081:8080" - "8026:8025" volumes: - - /tmp:/tmp:ro \ No newline at end of file + - /root:/tmp:ro \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/script/test/fixtures/configmap-volume/output-k8s-withlabel.yaml new/kompose-1.39.0/script/test/fixtures/configmap-volume/output-k8s-withlabel.yaml --- old/kompose-1.38.0/script/test/fixtures/configmap-volume/output-k8s-withlabel.yaml 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/script/test/fixtures/configmap-volume/output-k8s-withlabel.yaml 2026-11-24 19:56:52.000000000 +0100 @@ -36,7 +36,7 @@ --- apiVersion: v1 binaryData: - configs.tar: SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3lTWGFEc1NZcEpmdExabWJmNC9mbXZielpOeThsNm13eFdtZG12dFpwN3pjT0xEQjdJSVEwUllGQTh4Q3RLQUJHQkdKSnd4S1JzS0xKRUJGRVpCVkFadzZ4eE5DemJHcnlVTXl1MVdVbU0ra0Uzdk1uTzVYZDhvYXgyV25SUmh2dVdzd2N5WlgvVStCZ3ZTREFCWGpRcUJleHJoTkZ3YXFHQks3cGVScFoxeVFkUzdJZ0lkaXlHeTFXeElxdWFycFdJQ2lueWhqcC9Lc0w1LzBMVXZ3UGdxclB6OU5IV1AvSC9ObFdQNzF6MTdmZlRuK2hDT1AxajVBQ29ETFBvRUlzZWYySDUxOGE5SUZjdFU1dG1udGpkZG96OHNIem9jcnk1UHNmY1dIMC9JbWt5T245dndoTWMvOFRMZkgreHdVbHZmd3ZPc0w2bjMzVlJ3anIveGdrM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COP1j5ACoDLPoEIsef2H518a9IFctU5tmntjddoz8sHzocry5PsfcWH0/ImkyOn9vwhMc/8TLfH+xwUlvfwvOsL6n33VRwjr/xgk3/8ykcfrHxH+/w/NPJIELHn9g8s3r4AVALZpDT4rwz0YwNWBq3wQPn7yweVLN6bbcqNS2fGfPIuvfOyNUVYC/XUAbtU6rRztdpss16SW3bNYnb+K7G6pHHB/8LEFwLWI16K1JleekmzVJby3n973qXce/n794OPj/ufvH6onX05unzUpy4N4/5/9PXCG/s/FtP8vAmn/X26E9T+/7v/X/o9lNF7/WMVS2v8XgRcChEeC2/FFxxEfQYwyoeTJ7ipOpfIeM+68FgwHDqY1LGdHNd40og/UeccQM9DwtjT43v6TU3V8RX/Ytefbt8uur3PqvZwh+gbQp7sfOOQ1MxXZDw5mjEQ2DzGiRzu7UU3ePTmeANzWcGK2sZwF83igmSTH3HiTHg6bQcfLbWDLJWi0o/2P3Lkf+fLyDYtwdeh0Bh5Xx87ff4N82X2JPLH/j5wYK06jNbvRadNXTbbNqNUzWeWwyxKsSFIA4lAuBtkXOaUvvDzvMkyRIkWKheMPCMQG7gAcAAA= kind: ConfigMap metadata: annotations: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/script/test/fixtures/configmap-volume/output-k8s.yaml new/kompose-1.39.0/script/test/fixtures/configmap-volume/output-k8s.yaml --- old/kompose-1.38.0/script/test/fixtures/configmap-volume/output-k8s.yaml 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/script/test/fixtures/configmap-volume/output-k8s.yaml 2026-11-24 19:56:52.000000000 +0100 @@ -37,7 +37,7 @@ --- apiVersion: v1 binaryData: - configs.tar: SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3l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igMap metadata: annotations: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/script/test/fixtures/configmap-volume/output-os-withlabel.yaml new/kompose-1.39.0/script/test/fixtures/configmap-volume/output-os-withlabel.yaml --- old/kompose-1.38.0/script/test/fixtures/configmap-volume/output-os-withlabel.yaml 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/script/test/fixtures/configmap-volume/output-os-withlabel.yaml 2026-11-24 19:56:52.000000000 +0100 @@ -64,7 +64,7 @@ --- apiVersion: v1 binaryData: - configs.tar: SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3lTWGFEc1NZcEpmdExabWJmNC9mbXZielpOeThsNm13eFdtZG12dFpwN3pjT0xEQjdJSVEwUllGQTh4Q3RLQUJHQkdKSnd4S1JzS0xKRUJGRVpCVkFadzZ4eE5DemJHcnlVTXl1MVdVbU0ra0Uzdk1uTzVYZDhvYXgyV25SUmh2dVdzd2N5WlgvVStCZ3ZTREFCWGpRcUJleHJoTkZ3YXFHQks3cGVScFoxeVFkUzdJZ0lkaXlHeTFXeElxdWFycFdJQ2lueWhqcC9Lc0w1LzBMVXZ3UGdxclB6OU5IV1AvSC9ObFdQNzF6MTdmZlRuK2hDT1AxajVBQ29ETFBvRUlzZWYySDUxOGE5SUZjdFU1dG1udGpkZG96OHNIem9jcnk1UHNmY1dIMC9JbWt5T245dndoTWMvOFRMZkgreHdVbHZmd3ZPc0w2bjMzVlJ3anIveGdrMy84eWtjZnJIeEgrL3cvTlBKSUVMSG45ZzhzM3I0QVZBTFpwRFQ0cnd6MFl3TldCcTN3UVBuN3l3ZVZMTjZiYmNxTlMyZkdmUEl1dmZPeU5VVllDL1hVQWJ0VTZyUnp0ZHBzczE2U1czYk5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n7yweVLN6bbcqNS2fGfPIuvfOyNUVYC/XUAbtU6rRztdpss16SW3bNYnb+K7G6pHHB/8LEFwLWI16K1JleekmzVJby3n973qXce/n794OPj/ufvH6onX05unzUpy4N4/5/9PXCG/s/FtP8vAmn/X26E9T+/7v/X/o9lNF7/WMVS2v8XgRcChEeC2/FFxxEfQYwyoeTJ7ipOpfIeM+68FgwHDqY1LGdHNd40og/UeccQM9DwtjT43v6TU3V8RX/Ytefbt8uur3PqvZwh+gbQp7sfOOQ1MxXZDw5mjEQ2DzGiRzu7UU3ePTmeANzWcGK2sZwF83igmSTH3HiTHg6bQcfLbWDLJWi0o/2P3Lkf+fLyDYtwdeh0Bh5Xx87ff4N82X2JPLH/j5wYK06jNbvRadNXTbbNqNUzWeWwyxKsSFIA4lAuBtkXOaUvvDzvMkyRIkWKheMPCMQG7gAcAAA= kind: ConfigMap metadata: annotations: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/script/test/fixtures/configmap-volume/output-os.yaml new/kompose-1.39.0/script/test/fixtures/configmap-volume/output-os.yaml --- old/kompose-1.38.0/script/test/fixtures/configmap-volume/output-os.yaml 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/script/test/fixtures/configmap-volume/output-os.yaml 2026-11-24 19:56:52.000000000 +0100 @@ -65,7 +65,7 @@ --- apiVersion: v1 binaryData: - configs.tar: SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3lTWGFEc1NZcEpmdExabWJmNC9mbXZielpOeThsNm13eFdtZG12dFpwN3pjT0xEQjdJSVEwUllGQTh4Q3RLQUJHQkdKSnd4S1JzS0xKRUJGRVpCVkFadzZ4eE5DemJHcnlVTXl1MVdVbU0ra0Uzdk1uTzVYZDhv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FK1IMTSoFV8KYTGskX+xuZEuJ9Oi/4NGbZ2+Cl+JN/Cs896xXZ7+ySXaDsSYpJftLZmbf4/fmvbzZNy8l6mwxWmdmvtZp7zcOLDB7IIQ0RYFA8xCtKABGBGJJwxKRsKLJEBFEZBVAZw6xxNCzbGryUMyu1WUmM+kE3vMnO5Xd8oax2WnRRhvuWswcyZX/U+BgvSDABXjQqBexrhNFwaqGBK7peRpZ1yQdS7IgIdiyGy1WxIquarpWICinyhjp/KsL5/0LUvwPgqrPz9NHWP/H/NlWP71z17ffTn+hCOP1j5ACoDLPoEIsef2H518a9IFctU5tmntjddoz8sHzocry5PsfcWH0/ImkyOn9vwhMc/8TLfH+xwUlvfwvOsL6n33VRwjr/xgk3/8ykcfrHxH+/w/NPJIELHn9g8s3r4AVALZpDT4rwz0YwNWBq3wQPn7yweVLN6bbcqNS2fGfPIuvfOyNUVYC/XUAbtU6rRztdpss16SW3bNYnb+K7G6pHHB/8LEFwLWI16K1JleekmzVJby3n973qXce/n794OPj/ufvH6onX05unzUpy4N4/5/9PXCG/s/FtP8vAmn/X26E9T+/7v/X/o9lNF7/WMVS2v8XgRcChEeC2/FFxxEfQYwyoeTJ7ipOpfIeM+68FgwHDqY1LGdHNd40og/UeccQM9DwtjT43v6TU3V8RX/Ytefbt8uur3PqvZwh+gbQp7sfOOQ1MxXZDw5mjEQ2DzGiRzu7UU3ePTmeANzWcGK2sZwF83igmSTH3HiTHg6bQcfLbWDLJWi0o/2P3Lkf+fLyDYtwdeh0Bh5Xx87ff4N82X2JPLH/j5wYK06jNbvRadNXTbbNqNUzWeWwyxKsSFIA4lAuBtkXOaUvvDzvMkyRIkWKheMPCMQG7gAcAAA= kind: ConfigMap metadata: annotations: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/script/test/fixtures/service-name-dots/compose.yaml new/kompose-1.39.0/script/test/fixtures/service-name-dots/compose.yaml --- old/kompose-1.38.0/script/test/fixtures/service-name-dots/compose.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/kompose-1.39.0/script/test/fixtures/service-name-dots/compose.yaml 2026-11-24 19:56:52.000000000 +0100 @@ -0,0 +1,10 @@ +services: + web.server: + image: nginx:1.27 + ports: + - "8080:80" + + api.gateway: + image: nginx:1.27 + ports: + - "9090:90" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/script/test/fixtures/service-name-dots/output-k8s.yaml new/kompose-1.39.0/script/test/fixtures/service-name-dots/output-k8s.yaml --- old/kompose-1.38.0/script/test/fixtures/service-name-dots/output-k8s.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/kompose-1.39.0/script/test/fixtures/service-name-dots/output-k8s.yaml 2026-11-24 19:56:52.000000000 +0100 @@ -0,0 +1,80 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: api-gateway + name: api-gateway +spec: + ports: + - name: "9090" + port: 9090 + targetPort: 90 + selector: + io.kompose.service: api-gateway + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: web-server + name: web-server +spec: + ports: + - name: "8080" + port: 8080 + targetPort: 80 + selector: + io.kompose.service: web-server + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + io.kompose.service: api-gateway + name: api-gateway +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: api-gateway + template: + metadata: + labels: + io.kompose.service: api-gateway + spec: + containers: + - image: nginx:1.27 + name: api-gateway + ports: + - containerPort: 90 + protocol: TCP + restartPolicy: Always + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + io.kompose.service: web-server + name: web-server +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: web-server + template: + metadata: + labels: + io.kompose.service: web-server + spec: + containers: + - image: nginx:1.27 + name: web-server + ports: + - containerPort: 80 + protocol: TCP + restartPolicy: Always + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/script/test/fixtures/service-name-dots/output-os.yaml new/kompose-1.39.0/script/test/fixtures/service-name-dots/output-os.yaml --- old/kompose-1.38.0/script/test/fixtures/service-name-dots/output-os.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/kompose-1.39.0/script/test/fixtures/service-name-dots/output-os.yaml 2026-11-24 19:56:52.000000000 +0100 @@ -0,0 +1,136 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: api-gateway + name: api-gateway +spec: + ports: + - name: "9090" + port: 9090 + targetPort: 90 + selector: + io.kompose.service: api-gateway + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: web-server + name: web-server +spec: + ports: + - name: "8080" + port: 8080 + targetPort: 80 + selector: + io.kompose.service: web-server + +--- +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + labels: + io.kompose.service: api-gateway + name: api-gateway +spec: + replicas: 1 + selector: + io.kompose.service: api-gateway + template: + metadata: + labels: + io.kompose.service: api-gateway + spec: + containers: + - image: ' ' + name: api-gateway + ports: + - containerPort: 90 + protocol: TCP + restartPolicy: Always + test: false + triggers: + - type: ConfigChange + - imageChangeParams: + automatic: true + containerNames: + - api-gateway + from: + kind: ImageStreamTag + name: api-gateway:1.27 + type: ImageChange + +--- +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + labels: + io.kompose.service: api-gateway + name: api-gateway +spec: + lookupPolicy: + local: false + tags: + - from: + kind: DockerImage + name: nginx:1.27 + name: "1.27" + referencePolicy: + type: "" + +--- +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + labels: + io.kompose.service: web-server + name: web-server +spec: + replicas: 1 + selector: + io.kompose.service: web-server + template: + metadata: + labels: + io.kompose.service: web-server + spec: + containers: + - image: ' ' + name: web-server + ports: + - containerPort: 80 + protocol: TCP + restartPolicy: Always + test: false + triggers: + - type: ConfigChange + - imageChangeParams: + automatic: true + containerNames: + - web-server + from: + kind: ImageStreamTag + name: web-server:1.27 + type: ImageChange + +--- +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + labels: + io.kompose.service: web-server + name: web-server +spec: + lookupPolicy: + local: false + tags: + - from: + kind: DockerImage + name: nginx:1.27 + name: "1.27" + referencePolicy: + type: "" + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kompose-1.38.0/script/test/fixtures/single-file-output/output-k8s.yaml new/kompose-1.39.0/script/test/fixtures/single-file-output/output-k8s.yaml --- old/kompose-1.38.0/script/test/fixtures/single-file-output/output-k8s.yaml 2026-01-15 22:31:26.000000000 +0100 +++ new/kompose-1.39.0/script/test/fixtures/single-file-output/output-k8s.yaml 2026-11-24 19:56:52.000000000 +0100 @@ -4,7 +4,7 @@ metadata: labels: io.kompose.service: front-end - name: front_end + name: front-end spec: ports: - name: "80" ++++++ kompose.obsinfo ++++++ --- /var/tmp/diff_new_pack.03sIFX/_old 2026-11-25 16:15:07.845923342 +0100 +++ /var/tmp/diff_new_pack.03sIFX/_new 2026-11-25 16:15:07.851923597 +0100 @@ -1,5 +1,5 @@ name: kompose -version: 1.38.0 -mtime: 1768512686 -commit: a8f5d1cbdcfe3b47cb5c936fb1d57966390064a8 +version: 1.39.0 +mtime: 1795546612 +commit: f90c0f540a858977af465b2ddea5d0126eb875c4 ++++++ vendor.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/modules.txt new/vendor/modules.txt --- old/vendor/modules.txt 2026-01-15 22:31:26.000000000 +0100 +++ new/vendor/modules.txt 2026-11-24 19:56:52.000000000 +0100 @@ -183,7 +183,7 @@ ## explicit; go 1.18 github.com/opencontainers/image-spec/specs-go github.com/opencontainers/image-spec/specs-go/v1 -# github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20230704153349-abb98ff04d03 +# github.com/openshift/api v0.0.0-20230704153349-abb98ff04d03 ## explicit; go 1.20 github.com/openshift/api/apps/v1 github.com/openshift/api/build/v1
