forked from LaconicNetwork/kompose
feat: support container volume mount subpath (#1628)
* feat: support volumes subpath Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> * docs: add the kompose.volume.sub-path label Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> * fix: update e2e tests Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> --------- Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
This commit is contained in:
@@ -719,6 +719,8 @@ func parseKomposeLabels(labels map[string]string, serviceConfig *kobject.Service
|
||||
serviceConfig.ImagePullSecret = value
|
||||
case LabelImagePullPolicy:
|
||||
serviceConfig.ImagePullPolicy = value
|
||||
case LabelContainerVolumeSubpath:
|
||||
serviceConfig.VolumeMountSubPath = value
|
||||
default:
|
||||
serviceConfig.Labels[key] = value
|
||||
}
|
||||
|
||||
@@ -81,6 +81,9 @@ const (
|
||||
ServiceTypeHeadless = "Headless"
|
||||
// LabelSecurityContextFsGroup defines the pod FsGroup
|
||||
LabelSecurityContextFsGroup = "kompose.security-context.fsgroup"
|
||||
|
||||
// LabelContainerVolumeSubpath defines the volume mount subpath inside container
|
||||
LabelContainerVolumeSubpath = "kompose.volume.subpath"
|
||||
)
|
||||
|
||||
// load environment variables from compose file
|
||||
|
||||
Reference in New Issue
Block a user