Skip to content

Commit

Permalink
properly keyed at contaier_files
Browse files Browse the repository at this point in the history
Signed-off-by: 7h3-3mp7y-m4n <[email protected]>
  • Loading branch information
7h3-3mp7y-m4n committed Oct 16, 2024
1 parent 3753dde commit 4714a28
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions internal/convert/container_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ func convertContainerFile(
Name: mount.Name,
VolumeSource: coreV1.VolumeSource{
ConfigMap: &coreV1.ConfigMapVolumeSource{
Items: []coreV1.KeyToPath{{"file", filepath.Base(fileElem.Target), mountMode}},
Items: []coreV1.KeyToPath{{
Key: "file",
Path: filepath.Base(fileElem.Target),
Mode: mountMode,
}},
LocalObjectReference: coreV1.LocalObjectReference{Name: configMapName},
},
},
Expand All @@ -107,7 +111,10 @@ func convertContainerFile(
VolumeSource: coreV1.VolumeSource{
Secret: &coreV1.SecretVolumeSource{
SecretName: refs[0].Name,
Items: []coreV1.KeyToPath{{refs[0].Key, filepath.Base(fileElem.Target), mountMode}},
Items: []coreV1.KeyToPath{{
Key: refs[0].Key,
Path: filepath.Base(fileElem.Target),
Mode: mountMode}},
},
},
}, nil
Expand Down

0 comments on commit 4714a28

Please sign in to comment.