Allow controller flag to override restart policy (#1340)

This commit is contained in:
Hang Yan
2020-11-02 18:17:12 +08:00
committed by GitHub
parent c1280a4f55
commit 2dc6037cce
4 changed files with 9 additions and 8 deletions
+5
View File
@@ -78,6 +78,11 @@ type ConvertOptions struct {
WithKomposeAnnotation bool
}
// IsPodController indicate if the user want to use a controller
func (opt *ConvertOptions) IsPodController() bool {
return opt.IsDeploymentFlag || opt.IsDaemonSetFlag || opt.IsReplicationControllerFlag || opt.Controller != ""
}
// ServiceConfig holds the basic struct of a container
type ServiceConfig struct {
ContainerName string