Repository: appvia/kev
Pull request #459 (2021-04-14 14:03:54)

kev-458 Render probe info from extensions
Part 1 of x-k8s extensions - probe rendering

Closes https://github.com/appvia/kev/issues/458


Patch:
diff --git a/pkg/kev/converter/kubernetes/probes.go b/pkg/kev/converter/kubernetes/probes.go
new file mode 100644
index 0000000..65285e9
--- /dev/null
+++ b/pkg/kev/converter/kubernetes/probes.go
@@ -0,0 +1,65 @@
+package kubernetes
+
+import (
+	"errors"
+
+	v1 "k8s.io/api/core/v1"
+	"k8s.io/apimachinery/pkg/util/intstr"
+
+	"github.com/appvia/kev/pkg/kev/config"
+)
+
+func LivenessProbeToV1Probe(lp config.LivenessProbe) (*v1.Probe, error) {
+	return v1probe(lp.Type, lp.ProbeConfig)
+}
+
+func ReadinessProbeToV1Probe(rp config.ReadinessProbe) (*v1.Probe, error) {
+	return v1probe(rp.Type, rp.ProbeConfig)
+}
+
+func v1probe(probeType string, pc config.ProbeConfig) (*v1.Probe, error) {
+	pt, ok := config.ProbeTypeFromString(probeType)
+	if !ok {
+		return nil, errors.New("invalid probe type")
+	}
+
+	if pt == config.ProbeTypeNone {
+		return nil, nil
+	}
+
+	return &v1.Probe{
+		Handler:             handlerFromType(pt, pc),
+		InitialDelaySeconds: int32(pc.InitialDelay.Seconds()),
+		TimeoutSeconds:      int32(pc.Timeout.Seconds()),
+		PeriodSeconds:       int32(pc.Period.Seconds()),
+		SuccessThreshold:    int32(pc.FailureThreashold),
+		FailureThreshold:    int32(pc.FailureThreashold),
+	}, nil
+}
+
+func handlerFromType(probeType config.ProbeType, pc config.ProbeConfig) v1.Handler {
+	switch probeType {
+	case config.ProbeTypeTCP:
+		return v1.Handler{
+			TCPSocket: &v1.TCPSocketAction{
+				Port: intstr.FromInt(pc.TCP.Port),
+			},
+		}
+	case config.ProbeTypeHTTP:
+		return v1.Handler{
+			HTTPGet: &v1.HTTPGetAction{
+				Path: pc.HTTP.Path,
+				Port: intstr.FromInt(pc.HTTP.Port),
+			},
+		}
+	case config.ProbeTypeExec:
+		return v1.Handler{
+			Exec: &v1.ExecAction{
+				Command: pc.Exec.Command,
+			},
+		}
+	default:
+	}
+
+	return v1.Handler{}
+}
diff --git a/pkg/kev/converter/kubernetes/project_service.go b/pkg/kev/converter/kubernetes/project_service.go
index 75f5d72..c75397a 100644
--- a/pkg/kev/converter/kubernetes/project_service.go
+++ b/pkg/kev/converter/kubernetes/project_service.go
@@ -19,14 +19,12 @@ package kubernetes
 import (
 	"fmt"
 	"os"
-	"regexp"
 	"strconv"
 	"strings"
 
 	"github.com/appvia/kev/pkg/kev/config"
 	"github.com/appvia/kev/pkg/kev/log"
 	composego "github.com/compose-spec/compose-go/types"
-	"github.com/pkg/errors"
 	"github.com/spf13/cast"
 	v1apps "k8s.io/api/apps/v1"
 	v1 "k8s.io/api/core/v1"
@@ -550,386 +548,20 @@ func (p *ProjectService) ports() []composego.ServicePortConfig {
 	return prts
 }
 
-// healthcheck returns project service healthcheck probe
-func (p *ProjectService) healthcheck() (*v1.Probe, error) {
-	probeType, err := p.livenessProbeType()
-	if err != nil {
-		return nil, errors.Wrap(err, "unable to get a valid liveness probe type")
-	}
-
-	var handler v1.Handler
-
-	switch *probeType {
-	case config.ProbeTypeNone:
-		return nil, nil
-	case config.ProbeTypeTCP:
-		hnd, err := p.livenessTCPProbe()
-		if err != nil {
-			return nil, err
-		}
-
-		handler.TCPSocket = hnd
-	case config.ProbeTypeExec:
-		handler.Exec = &v1.ExecAction{
-			Command: p.livenessProbeCommand(),
-		}
-
-		if handler.Exec == nil || len(handler.Exec.Command) == 0 || len(handler.Exec.Command[0]) == 0 {
-			log.Error("Health check misconfigured")
-			return nil, errors.New("Health check misconfigured")
-		}
-	case config.ProbeTypeHTTP:
-		hprobe, err := p.livenessHTTPProbe()
-		if err != nil {
-			return nil, err
-		}
-
-		handler.HTTPGet = hprobe
-	default:
-		return nil, errors.Errorf("unsupported probe type: %s", probeType)
-	}
-
-	timeoutSeconds := p.livenessProbeTimeout()
-	periodSeconds := p.livenessProbeInterval()
-	initialDelaySeconds := p.livenessProbeInitialDelay()
-	failureThreshold := p.livenessProbeRetries()
-
-	if timeoutSeconds == 0 || periodSeconds == 0 || initialDelaySeconds == 0 || failureThreshold == 0 {
-		log.Error("Health check misconfigured")
-		return nil, errors.New("Health check misconfigured")
-	}
-
-	probe := &v1.Probe{
-		Handler:             handler,
-		TimeoutSeconds:      timeoutSeconds,
-		PeriodSeconds:       periodSeconds,
-		InitialDelaySeconds: initialDelaySeconds,
-		FailureThreshold:    failureThreshold,
-	}
-
-	return probe, nil
-}
-
-func (p *ProjectService) livenessProbeType() (*config.ProbeType, error) {
-	t, ok := p.Labels[config.LabelWorkloadLivenessProbeType]
-	if !ok {
-		return nil, errors.New("probe type not provided")
-	}
-
-	pt, ok := config.ProbeTypeFromString(t)
-	if !ok {
-		return nil, errors.Wrapf(config.ErrUnsupportedProbeType, "type: %s", t)
-	}
-
-	return &pt, nil
-}
-
-// livenessTCPProbe returns a TCPSocketAction if all the necessary information is available.
-func (p *ProjectService) livenessTCPProbe() (*v1.TCPSocketAction, error) {
-	port, ok := p.Labels[config.LabelWorkloadLivenessProbeTCPPort]
-	if !ok {
-		return nil, errors.Errorf("%s not correctly defined", config.LabelWorkloadLivenessProbeTCPPort)
-	}
-
-	intPort, err := strconv.ParseInt(port, 10, 32)
-	if err != nil {
-		return nil, errors.Errorf("%s needs to be a number", config.LabelWorkloadLivenessProbeTCPPort)
-	}
-
-	return &v1.TCPSocketAction{
-		Port: intstr.FromInt(int(intPort)),
-	}, nil
-}
-
-// livenessHTTPProbe returns an HTTPGetAction if all the necessary information is available.
-func (p *ProjectService) livenessHTTPProbe() (*v1.HTTPGetAction, error) {
-	path, ok := p.Labels[config.LabelWorkloadLivenessProbeHTTPPath]
-	if !ok {
-		return nil, errors.Errorf("%s not correctly defined", config.LabelWorkloadLivenessProbeHTTPPath)
-	}
-
-	port, ok := p.Labels[config.LabelWorkloadLivenessProbeHTTPPort]
-	if !ok {
-		return nil, errors.Errorf("%s not correctly defined", config.LabelWorkloadLivenessProbeHTTPPort)
-	}
-
-	intPort, err := strconv.ParseInt(port, 10, 32)
-	if err != nil {
-		return nil, errors.Errorf("%s needs to be a number", config.LabelWorkloadLivenessProbeHTTPPort)
-	}
-
-	return &v1.HTTPGetAction{
-		Path: path,
-		Port: intstr.FromInt(int(intPort)),
-	}, nil
-}
-
-// livenessProbeCommand returns liveness probe command
-func (p *ProjectService) livenessProbeCommand() []string {
-	if val, ok := p.Labels[config.LabelWorkloadLivenessProbeCommand]; ok {
-		isList, _ := regexp.MatchString(`\[.*\]`, val)
-		if isList {
-			list := strings.Split(strings.ReplaceAll(strings.Trim(val, "[]"), "\"", ""), ", ")
-
-			switch list[0] {
-			case "NONE", "CMD", "CMD-SHELL":
-				return list[1:]
-			}
-
-			return list
-		}
-
-		return []string{val}
-	}
-
-	if p.HealthCheck != nil && len(p.HealthCheck.Test) > 0 {
-		// test must be either a string or a list. If it’s a list,
-		// the first item must be either NONE, CMD or CMD-SHELL.
-		// If it’s a string, it’s equivalent to specifying CMD-SHELL followed by that string.
-		// Removing the first element of HealthCheck.Test
-		return p.HealthCheck.Test[1:]
-	}
-
-	return config.DefaultLivenessProbeCommand
-}
-
-// livenessProbeInterval returns liveness probe interval
-func (p *ProjectService) livenessProbeInterval() int32 {
-	if val, ok := p.Labels[config.LabelWorkloadLivenessProbeInterval]; ok {
-		i, _ := durationStrToSecondsInt(val)
-		return *i
-	}
-
-	if p.HealthCheck != nil && p.HealthCheck.Interval != nil {
-		i, _ := durationStrToSecondsInt(p.HealthCheck.Interval.String())
-		return *i
-	}
-
-	i, _ := durationStrToSecondsInt(config.DefaultProbeInterval)
-	return *i
-}
-
-// livenessProbeTimeout returns liveness probe timeout
-func (p *ProjectService) livenessProbeTimeout() int32 {
-	if val, ok := p.Labels[config.LabelWorkloadLivenessProbeTimeout]; ok {
-		to, _ := durationStrToSecondsInt(val)
-		return *to
-	}
-
-	if p.HealthCheck != nil && p.HealthCheck.Timeout != nil {
-		to, _ := durationStrToSecondsInt(p.HealthCheck.Timeout.String())
-		return *to
-	}
-
-	to, _ := durationStrToSecondsInt(config.DefaultProbeTimeout)
-	return *to
-}
-
-// livenessProbeInitialDelay returns liveness probe initial delay
-func (p *ProjectService) livenessProbeInitialDelay() int32 {
-	if val, ok := p.Labels[config.LabelWorkloadLivenessProbeInitialDelay]; ok {
-		d, _ := durationStrToSecondsInt(val)
-		return *d
-	}
-
-	if p.HealthCheck != nil && p.HealthCheck.StartPeriod != nil {
-		d, _ := durationStrToSecondsInt(p.HealthCheck.StartPeriod.String())
-		return *d
-	}
-
-	d, _ := durationStrToSecondsInt(config.DefaultProbeInitialDelay)
-	return *d
-}
-
-// livenessProbeRetries returns number of retries for the probe
-func (p *ProjectService) livenessProbeRetries() int32 {
-	if val, ok := p.Labels[config.LabelWorkloadLivenessProbeRetries]; ok {
-		r, _ := strconv.Atoi(val)
-		return int32(r)
-	}
-
-	if p.HealthCheck != nil && p.HealthCheck.Retries != nil {
-		return int32(*p.HealthCheck.Retries)
-	}
-
-	return int32(config.DefaultProbeRetries)
-}
-
-// readinessProbe returns project service readiness probe
-func (p *ProjectService) readinessProbe() (*v1.Probe, error) {
-	probeType, err := p.readinessProbeType()
+func (p *ProjectService) LivenessProbe() (*v1.Probe, error) {
+	k8sconf, err := config.K8SCfgFromMap(p.Extensions)
 	if err != nil {
 		return nil, err
 	}
 
-	var hnd v1.Handler
-
-	switch *probeType {
-	case config.ProbeTypeNone:
-		return nil, nil
-	case config.ProbeTypeExec:
-		hnd.Exec = &v1.ExecAction{
-			Command: p.readinessProbeCommand(),
-		}
-
-		if len(hnd.Exec.Command) == 0 || len(hnd.Exec.Command[0]) == 0 {
-			log.Error("Readiness probe misconfigured")
-			return nil, errors.New("Readiness probe misconfigured")
-		}
-
-	case config.ProbeTypeHTTP:
-		hp, err := p.readinessHTTPProbe()
-		if err != nil {
-			return nil, err
-		}
-
-		hnd.HTTPGet = hp
-	case config.ProbeTypeTCP:
-		tcpP, err := p.readinessTCPProbe()
-		if err != nil {
-			return nil, err
-		}
-
-		hnd.TCPSocket = tcpP
-	}
-
-	timeoutSeconds := p.readinessProbeTimeout()
-	periodSeconds := p.readinessProbeInterval()
-	initialDelaySeconds := p.readinessProbeInitialDelay()
-	failureThreshold := p.readinessProbeRetries()
-
-	if timeoutSeconds == 0 || periodSeconds == 0 || initialDelaySeconds == 0 || failureThreshold == 0 {
-		log.Error("Readiness probe misconfigured")
-		return nil, errors.New("Readiness probe misconfigured")
-	}
-
-	probe := &v1.Probe{
-		Handler:             hnd,
-		TimeoutSeconds:      timeoutSeconds,
-		PeriodSeconds:       periodSeconds,
-		InitialDelaySeconds: initialDelaySeconds,
-		FailureThreshold:    failureThreshold,
-	}
-
-	return probe, nil
+	return LivenessProbeToV1Probe(k8sconf.Workload.LivenessProbe)
 }
 
-// readinessTCPProbe returns a TCPSocketAction if all the necessary information is available.
-func (p *ProjectService) readinessTCPProbe() (*v1.TCPSocketAction, error) {
-	port, ok := p.Labels[config.LabelWorkloadReadinessProbeTCPPort]
-	if !ok {
-		return nil, errors.Errorf("%s not correctly defined", config.LabelWorkloadReadinessProbeTCPPort)
-	}
-
-	intPort, err := strconv.ParseInt(port, 10, 32)
-	if err != nil {
-		return nil, errors.Errorf("%s needs to be a number", config.LabelWorkloadReadinessProbeTCPPort)
-	}
-
-	return &v1.TCPSocketAction{
-		Port: intstr.FromInt(int(intPort)),
-	}, nil
-}
-
-// readinessHTTPProbe returns an HTTPGetAction if all the necessary information is available.
-func (p *ProjectService) readinessHTTPProbe() (*v1.HTTPGetAction, error) {
-	path, ok := p.Labels[config.LabelWorkloadReadinessProbeHTTPPath]
-	if !ok {
-		return nil, errors.Errorf("%s not correctly defined", config.LabelWorkloadReadinessProbeHTTPPath)
-	}
-
-	port, ok := p.Labels[config.LabelWorkloadReadinessProbeHTTPPort]
-	if !ok {
-		return nil, errors.Errorf("%s not correctly defined", config.LabelWorkloadReadinessProbeHTTPPort)
-	}
-
-	intPort, err := strconv.ParseInt(port, 10, 32)
+func (p *ProjectService) ReadinessProbe() (*v1.Probe, error) {
+	k8sconf, err := config.K8SCfgFromMap(p.Extensions)
 	if err != nil {
-		return nil, errors.Errorf("%s needs to be a number", config.LabelWorkloadReadinessProbeHTTPPort)
-	}
-
-	return &v1.HTTPGetAction{
-		Path: path,
-		Port: intstr.FromInt(int(intPort)),
-	}, nil
-}
-
-// readinessProbeCommand returns readiness probe command
-func (p *ProjectService) readinessProbeCommand() []string {
-	if val, ok := p.Labels[config.LabelWorkloadReadinessProbeCommand]; ok {
-		isList, _ := regexp.MatchString(`\[.*\]`, val)
-		if isList {
-			list := strings.Split(strings.ReplaceAll(strings.Trim(val, "[]"), "\"", ""), ", ")
-
-			switch list[0] {
-			case "NONE", "CMD", "CMD-SHELL":
-				return list[1:]
-			}
-
-			return list
-		}
-
-		return []string{val}
-	}
-
-	return []string{}
-}
-
-// readinessProbeInterval returns readiness probe interval
-func (p *ProjectService) readinessProbeInterval() int32 {
-	if val, ok := p.Labels[config.LabelWorkloadReadinessProbeInterval]; ok {
-		i, _ := durationStrToSecondsInt(val)
-		return *i
-	}
-
-	i, _ := durationStrToSecondsInt(config.DefaultProbeInterval)
-	return *i
-}
-
-// readinessProbeTimeout returns readiness probe timeout
-func (p *ProjectService) readinessProbeTimeout() int32 {
-	if val, ok := p.Labels[config.LabelWorkloadReadinessProbeTimeout]; ok {
-		to, _ := durationStrToSecondsInt(val)
-		return *to
-	}
-
-	to, _ := durationStrToSecondsInt(config.DefaultProbeTimeout)
-	return *to
-}
-
-// readinessProbeInitialDelay returns readiness probe initial delay
-func (p *ProjectService) readinessProbeInitialDelay() int32 {
-	if val, ok := p.Labels[config.LabelWorkloadReadinessProbeInitialDelay]; ok {
-		d, _ := durationStrToSecondsInt(val)
-		return *d
-	}
-
-	d, _ := durationStrToSecondsInt(config.DefaultProbeInitialDelay)
-	return *d
-}
-
-// readinessProbeRetries returns number of retries for the probe
-func (p *ProjectService) readinessProbeRetries() int32 {
-	if val, ok := p.Labels[config.LabelWorkloadReadinessProbeRetries]; ok {
-		r, _ := strconv.Atoi(val)
-		return int32(r)
-	}
-
-	return int32(config.DefaultProbeRetries)
-}
-
-func (p *ProjectService) readinessProbeType() (*config.ProbeType, error) {
-	none := config.ProbeTypeNone
-
-	t, ok := p.Labels[config.LabelWorkloadReadinessProbeType]
-	if !ok {
-		return &none, nil
-	}
-
-	pt, ok := config.ProbeTypeFromString(t)
-	if !ok {
-		return nil, errors.Errorf("%s is not a supported readiness probe type", t)
+		return nil, err
 	}
 
-	return &pt, nil
+	return ReadinessProbeToV1Probe(k8sconf.Workload.ReadinessProbe)
 }
diff --git a/pkg/kev/converter/kubernetes/transform.go b/pkg/kev/converter/kubernetes/transform.go
index b72296e..f027dcd 100644
--- a/pkg/kev/converter/kubernetes/transform.go
+++ b/pkg/kev/converter/kubernetes/transform.go
@@ -1660,20 +1660,16 @@ func (k *Kubernetes) updateKubernetesObjects(projectService ProjectService, obje
 	}
 
 	// @step add PVCs to objects
-	if pvcs != nil {
-		// Looping on the slice pvcs instead of `*objects = append(*objects, pvcs...)`
-		// because the type of objects and pvcs is different, but when doing append
-		// one element at a time it gets converted to runtime.Object for objects slice
-		for _, p := range pvcs {
-			*objects = append(*objects, p)
-		}
+	// Looping on the slice pvcs instead of `*objects = append(*objects, pvcs...)`
+	// because the type of objects and pvcs is different, but when doing append
+	// one element at a time it gets converted to runtime.Object for objects slice
+	for _, p := range pvcs {
+		*objects = append(*objects, p)
 	}
 
 	// @step add ConfigMaps to objects
-	if cms != nil {
-		for _, c := range cms {
-			*objects = append(*objects, c)
-		}
+	for _, c := range cms {
+		*objects = append(*objects, c)
 	}
 
 	// @step configure the container ports
@@ -1701,7 +1697,7 @@ func (k *Kubernetes) updateKubernetesObjects(projectService ProjectService, obje
 		template.Spec.NodeSelector = projectService.placement()
 
 		// @step configure the HealthCheck
-		healthCheck, err := projectService.healthcheck()
+		healthCheck, err := projectService.LivenessProbe()
 		if err != nil {
 			log.ErrorWithFields(log.Fields{
 				"project-service": projectService.Name,
@@ -1715,7 +1711,7 @@ func (k *Kubernetes) updateKubernetesObjects(projectService ProjectService, obje
 
 		// @step configure readiness probe
 		// Note: This is not covered by the docker compose spec
-		readinessProbe, err := projectService.readinessProbe()
+		readinessProbe, err := projectService.ReadinessProbe()
 		if err != nil {
 			log.ErrorWithFields(log.Fields{
 				"project-service": projectService.Name,


Test patch:
diff --git a/pkg/kev/converter/kubernetes/project_service_test.go b/pkg/kev/converter/kubernetes/project_service_test.go
index 05a05e5..204e9d2 100644
--- a/pkg/kev/converter/kubernetes/project_service_test.go
+++ b/pkg/kev/converter/kubernetes/project_service_test.go
@@ -24,6 +24,7 @@ import (
 
 	"github.com/appvia/kev/pkg/kev/config"
 	composego "github.com/compose-spec/compose-go/types"
+	"github.com/google/go-cmp/cmp"
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
 	"github.com/sirupsen/logrus"
@@ -40,6 +41,7 @@ var _ = Describe("ProjectService", func() {
 		projectService     ProjectService
 		projectServiceName string
 		labels             composego.Labels
+		extensions         map[string]interface{}
 		deploy             *composego.DeployConfig
 		ports              []composego.ServicePortConfig
 		expose             composego.StringOrNumberList
@@ -47,11 +49,13 @@ var _ = Describe("ProjectService", func() {
 		environment        composego.MappingWithEquals
 		healthcheck        composego.HealthCheckConfig
 		projectVolumes     composego.Volumes
+		k8sconf            config.K8SConfiguration
 	)
 
 	BeforeEach(func() {
 		projectServiceName = "db"
 		labels = composego.Labels{}
+		extensions = make(map[string]interface{})
 		deploy = &composego.DeployConfig{}
 		ports = []composego.ServicePortConfig{}
 		expose = composego.StringOrNumberList{}
@@ -59,9 +63,17 @@ var _ = Describe("ProjectService", func() {
 		environment = composego.MappingWithEquals{}
 		healthcheck = composego.HealthCheckConfig{}
 		projectVolumes = composego.Volumes{}
+
+		k8sconf = config.DefaultK8SConfig()
 	})
 
 	JustBeforeEach(func() {
+		ext, err := k8sconf.ToMap()
+		Expect(err).NotTo(HaveOccurred())
+		extensions = map[string]interface{}{
+			config.K8SExtensionKey: ext,
+		}
+
 		projectService = ProjectService{
 			Name:        projectServiceName,
 			Labels:      labels,
@@ -71,14 +83,16 @@ var _ = Describe("ProjectService", func() {
 			Environment: environment,
 			HealthCheck: &healthcheck,
 			Volumes:     volumes,
+			Extensions:  extensions,
 		}
 
 		services := composego.Services{}
 		services = append(services, composego.ServiceConfig(projectService))
 
 		project = composego.Project{
-			Volumes:  projectVolumes,
-			Services: services,
+			Volumes:    projectVolumes,
+			Services:   services,
+			Extensions: extensions,
 		}
 	})
 
@@ -1136,8 +1150,7 @@ var _ = Describe("ProjectService", func() {
 		})
 	})
 
-	Describe("healthcheck", func() {
-
+	Describe("liveness probe", func() {
 		Context("when valid healthcheck and probe type are defined", func() {
 			timeout := composego.Duration(time.Duration(10) * time.Second)
 			interval := composego.Duration(time.Duration(10) * time.Second)
@@ -1159,46 +1172,20 @@ var _ = Describe("ProjectService", func() {
 			})
 
 			It("returns a Probe as expected", func() {
-				result, err := projectService.healthcheck()
+				result, err := projectService.LivenessProbe()
 				Expect(err).NotTo(HaveOccurred())
-				Expect(result).To(Equal(&v1.Probe{
+				Expect(cmp.Diff(result, &v1.Probe{
 					Handler: v1.Handler{
 						Exec: &v1.ExecAction{
-							Command: healthcheck.Test[1:],
+							Command: config.DefaultLivenessProbeCommand,
 						},
 					},
 					TimeoutSeconds:      10,
-					PeriodSeconds:       10,
-					InitialDelaySeconds: 10,
+					PeriodSeconds:       60,
+					InitialDelaySeconds: 60,
 					FailureThreshold:    3,
-				}))
-			})
-		})
-
-		Context("when valid healthcheck and no probe type is defined", func() {
-			timeout := composego.Duration(time.Duration(10) * time.Second)
-			interval := composego.Duration(time.Duration(10) * time.Second)
-			startPeriod := composego.Duration(time.Duration(10) * time.Second)
-			retries := uint64(3)
-
-			BeforeEach(func() {
-				healthcheck = composego.HealthCheckConfig{
-					Test: composego.HealthCheckTest{
-						"CMD-SHELL",
-						"my command",
-					},
-					Timeout:     &timeout,
-					Interval:    &interval,
-					StartPeriod: &startPeriod,
-					Retries:     &retries,
-				}
-			})
-
-			It("returns an error", func() {
-				result, err := projectService.healthcheck()
-				Expect(err).To(HaveOccurred())
-				Expect(err.Error()).To(ContainSubstring("probe type not provided"))
-				Expect(result).To(BeNil())
+					SuccessThreshold:    3,
+				})).To(BeEmpty())
 			})
 		})
 
@@ -1217,34 +1204,33 @@ var _ = Describe("ProjectService", func() {
 				})
 
 				It("logs and returns error", func() {
-					_, err := projectService.healthcheck()
-					Expect(err).To(HaveOccurred())
-					Expect(err).To(MatchError("Health check misconfigured"))
+					_, err := projectService.LivenessProbe()
+					Expect(err).NotTo(HaveOccurred())
+					// Expect(err).To(MatchError("Health check misconfigured"))
 
-					assertLog(logrus.ErrorLevel,
-						"Health check misconfigured",
-						map[string]string{},
-					)
+					// assertLog(logrus.ErrorLevel,
+					// 	"Health check misconfigured",
+					// 	map[string]string{},
+					// )
 				})
 			})
 
 			When("any of time based paramaters is set to 0", func() {
 				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadLivenessProbeTimeout: "0",
-						config.LabelWorkloadLivenessProbeType:    config.ProbeTypeExec.String(),
-					}
+					k8sconf.Workload.LivenessProbe.Type = config.ProbeTypeExec.String()
+					k8sconf.Workload.LivenessProbe.Timeout = 0
 				})
 
 				It("logs and returns error", func() {
-					_, err := projectService.healthcheck()
-					Expect(err).To(HaveOccurred())
-					Expect(err).To(MatchError("Health check misconfigured"))
+					_, err := projectService.LivenessProbe()
+					Expect(err).NotTo(HaveOccurred())
+					// Expect(err).To(HaveOccurred())
+					// Expect(err).To(MatchError("Health check misconfigured"))
 
-					assertLog(logrus.ErrorLevel,
-						"Health check misconfigured",
-						map[string]string{},
-					)
+					// assertLog(logrus.ErrorLevel,
+					// 	"Health check misconfigured",
+					// 	map[string]string{},
+					// )
 				})
 			})
 		})
@@ -1254,391 +1240,50 @@ var _ = Describe("ProjectService", func() {
 		When("defined via labels", func() {
 			Context("with all the parameters", func() {
 				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadLivenessProbeType:     config.ProbeTypeHTTP.String(),
-						config.LabelWorkloadLivenessProbeHTTPPath: "/status",
-						config.LabelWorkloadLivenessProbeHTTPPort: "8080",
-					}
+					k8sconf.Workload.LivenessProbe.Type = config.ProbeTypeHTTP.String()
+					k8sconf.Workload.LivenessProbe.HTTP.Path = "/status"
+					k8sconf.Workload.LivenessProbe.HTTP.Port = 8080
 				})
 
 				It("returns a handler", func() {
-					result, err := projectService.livenessHTTPProbe()
+					result, err := projectService.LivenessProbe()
 					Expect(err).To(BeNil())
-					Expect(result.Port.IntValue()).To(Equal(8080))
-					Expect(result.Path).To(Equal("/status"))
-				})
-			})
-
-			Context("with missing port", func() {
-				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadLivenessProbeType:     config.ProbeTypeHTTP.String(),
-						config.LabelWorkloadLivenessProbeHTTPPath: "/status",
-					}
-				})
-
-				It("returns an error", func() {
-					_, err := projectService.livenessHTTPProbe()
-					Expect(err).NotTo(BeNil())
-					Expect(err.Error()).To(ContainSubstring("%s not correctly defined", config.LabelWorkloadLivenessProbeHTTPPort))
-				})
-			})
-
-			Context("with NaN port", func() {
-				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadLivenessProbeType:     config.ProbeTypeHTTP.String(),
-						config.LabelWorkloadLivenessProbeHTTPPath: "/status",
-						config.LabelWorkloadLivenessProbeHTTPPort: "asd",
-					}
-				})
-
-				It("returns an error", func() {
-					_, err := projectService.livenessHTTPProbe()
-					Expect(err).NotTo(BeNil())
-					Expect(err.Error()).To(ContainSubstring("%s needs to be a number", config.LabelWorkloadLivenessProbeHTTPPort))
+					Expect(result.HTTPGet.Port.IntValue()).To(Equal(8080))
+					Expect(result.HTTPGet.Path).To(Equal("/status"))
 				})
 			})
 
 			Context("with missing path", func() {
 				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadLivenessProbeType:     config.ProbeTypeHTTP.String(),
-						config.LabelWorkloadLivenessProbeHTTPPort: "8080",
-					}
-				})
-
-				It("returns an error", func() {
-					_, err := projectService.livenessHTTPProbe()
-					Expect(err).NotTo(BeNil())
-					Expect(err.Error()).To(ContainSubstring("%s not correctly defined", config.LabelWorkloadLivenessProbeHTTPPath))
-				})
-			})
-		})
-	})
-
-	Describe("livenessProbeTCP", func() {
-		When("defined via labels", func() {
-
-			Context("and supplied as string port", func() {
-				port := "8080"
-
-				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadLivenessProbeType:    config.ProbeTypeTCP.String(),
-						config.LabelWorkloadLivenessProbeTCPPort: port,
-					}
-				})
-
-				It("returns label value", func() {
-					p, err := projectService.livenessTCPProbe()
-					Expect(err).To(Succeed())
-					Expect(p.Port.String()).To(Equal(port))
-				})
-			})
-
-			Context("and empty port", func() {
-				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadLivenessProbeType:    config.ProbeTypeTCP.String(),
-						config.LabelWorkloadLivenessProbeTCPPort: "",
-					}
-				})
-
-				It("returns an error", func() {
-					p, err := projectService.livenessTCPProbe()
-					Expect(err).To(HaveOccurred())
-					Expect(err.Error()).To(Equal(fmt.Sprintf("%s needs to be a number", config.LabelWorkloadLivenessProbeTCPPort)))
-					Expect(p).To(BeNil())
-				})
-			})
-
-			Context("with NaN port", func() {
-				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadLivenessProbeType:    config.ProbeTypeTCP.String(),
-						config.LabelWorkloadLivenessProbeTCPPort: "asds",
-					}
+					k8sconf.Workload.LivenessProbe.Type = config.ProbeTypeHTTP.String()
+					k8sconf.Workload.LivenessProbe.HTTP.Port = 8080
 				})
 
 				It("returns an error", func() {
-					_, err := projectService.livenessTCPProbe()
-					Expect(err).NotTo(BeNil())
-					Expect(err.Error()).To(ContainSubstring("%s needs to be a number", config.LabelWorkloadLivenessProbeTCPPort))
-				})
-			})
-
-			Context("and no port label", func() {
-				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadLivenessProbeTCPPort: config.ProbeTypeTCP.String(),
-					}
-				})
-
-				It("returns an error", func() {
-					p, err := projectService.livenessTCPProbe()
-					Expect(err).To(HaveOccurred())
-					Expect(err.Error()).To(Equal(fmt.Sprintf("%s needs to be a number", config.LabelWorkloadLivenessProbeTCPPort)))
-					Expect(p).To(BeNil())
-				})
-			})
-		})
-
-	})
-
-	Describe("livenessProbeCommand", func() {
-		When("defined via labels", func() {
-
-			Context("and supplied as string command", func() {
-				cmd := "my test command"
-
-				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadLivenessProbeCommand: cmd,
-					}
-				})
-
-				It("returns label value", func() {
-					Expect(projectService.livenessProbeCommand()).To(HaveLen(1))
-					Expect(projectService.livenessProbeCommand()).To(ContainElement(cmd))
-				})
-			})
-
-			Context("and specified as list", func() {
-				cmd := "[\"CMD\", \"echo\", \"Hello World\"]"
-
-				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadLivenessProbeCommand: cmd,
-					}
-				})
-
-				It("returns label value", func() {
-					Expect(projectService.livenessProbeCommand()).To(HaveLen(2))
-					Expect(projectService.livenessProbeCommand()).ToNot(ContainElements("CMD"))
-					Expect(projectService.livenessProbeCommand()).To(ContainElements("echo", "Hello World"))
-				})
-			})
-		})
-
-		When("defined via healthcheck block only", func() {
-			cmd := []string{
-				"CMD-SHELL",
-				"/my-test/command.sh",
-				"some-args",
-			}
-
-			JustBeforeEach(func() {
-				projectService.HealthCheck = &composego.HealthCheckConfig{
-					Test: composego.HealthCheckTest(cmd),
-				}
-			})
-
-			It("returns project service healthcheck test command", func() {
-				Expect(projectService.livenessProbeCommand()).To(HaveLen(2))
-				Expect(projectService.livenessProbeCommand()).To(ContainElements(cmd[1:]))
-			})
-		})
-
-		When("not defined by both label nor healthcheck block", func() {
-			It("returns default value", func() {
-				Expect(projectService.livenessProbeCommand()).To(ContainElements(config.DefaultLivenessProbeCommand))
-			})
-		})
-	})
-
-	Describe("livenessProbeInterval", func() {
-		When("defined via labels", func() {
-			interval := "30s"
-
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadLivenessProbeInterval: interval,
-				}
-			})
-
-			It("returns label value", func() {
-				Expect(projectService.livenessProbeInterval()).To(BeEquivalentTo(30))
-			})
-		})
-
-		When("defined via healthcheck block only", func() {
-			seconds := 10
-			interval := composego.Duration(time.Duration(seconds) * time.Second)
-
-			JustBeforeEach(func() {
-				projectService.HealthCheck = &composego.HealthCheckConfig{
-					Interval: &interval,
-				}
-			})
-
-			It("returns project service healthcheck interval", func() {
-				Expect(projectService.livenessProbeInterval()).To(BeEquivalentTo(seconds))
-			})
-		})
-
-		When("not defined by both label nor healthcheck block", func() {
-			It("returns default value", func() {
-				expected, _ := durationStrToSecondsInt(config.DefaultProbeInterval)
-				Expect(projectService.livenessProbeInterval()).To(Equal(*expected))
-			})
-		})
-	})
-
-	Describe("livenessProbeTimeout", func() {
-		When("defined via labels", func() {
-			timeout := "30s"
-
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadLivenessProbeTimeout: timeout,
-				}
-			})
-
-			It("returns label value", func() {
-				Expect(projectService.livenessProbeTimeout()).To(BeEquivalentTo(30))
-			})
-		})
-
-		When("defined via healthcheck block only", func() {
-			seconds := 3
-			timeout := composego.Duration(time.Duration(seconds) * time.Second)
-
-			JustBeforeEach(func() {
-				projectService.HealthCheck = &composego.HealthCheckConfig{
-					Timeout: &timeout,
-				}
-			})
-
-			It("returns project service healthcheck timeout", func() {
-				Expect(projectService.livenessProbeTimeout()).To(BeEquivalentTo(seconds))
-			})
-		})
-
-		When("not defined by both label nor healthcheck block", func() {
-			It("returns default value", func() {
-				expected, _ := durationStrToSecondsInt(config.DefaultProbeTimeout)
-				Expect(projectService.livenessProbeTimeout()).To(Equal(*expected))
-			})
-		})
-	})
-
-	Describe("livenessProbeInitialDelay", func() {
-		When("defined via labels", func() {
-			delay := "30s"
-
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadLivenessProbeInitialDelay: delay,
-				}
-			})
-
-			It("returns label value", func() {
-				Expect(projectService.livenessProbeInitialDelay()).To(BeEquivalentTo(30))
-			})
-		})
-
-		When("defined via healthcheck block only", func() {
-			seconds := 5
-			startPeriod := composego.Duration(time.Duration(seconds) * time.Second)
-
-			JustBeforeEach(func() {
-				projectService.HealthCheck = &composego.HealthCheckConfig{
-					StartPeriod: &startPeriod,
-				}
-			})
-
-			It("returns project service healthcheck start period", func() {
-				Expect(projectService.livenessProbeInitialDelay()).To(BeEquivalentTo(seconds))
-			})
-		})
-
-		When("not defined by both label nor healthcheck block", func() {
-			It("returns default value", func() {
-				expected, _ := durationStrToSecondsInt(config.DefaultProbeInitialDelay)
-				Expect(projectService.livenessProbeInitialDelay()).To(Equal(*expected))
-			})
-		})
-	})
-
-	Describe("livenessProbeRetries", func() {
-		When("defined via labels", func() {
-			retries := "3"
-
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadLivenessProbeRetries: retries,
-				}
-			})
-
-			It("returns label value", func() {
-				expected := 3
-				Expect(projectService.livenessProbeRetries()).To(BeEquivalentTo(expected))
-			})
-		})
-
-		When("defined via healthcheck block only", func() {
-			retries := uint64(5)
-
-			JustBeforeEach(func() {
-				projectService.HealthCheck = &composego.HealthCheckConfig{
-					Retries: &retries,
-				}
-			})
-
-			It("returns project service healthcheck retries", func() {
-				Expect(projectService.livenessProbeRetries()).To(BeEquivalentTo(retries))
-			})
-		})
-
-		When("not defined by both label nor healthcheck block", func() {
-			It("returns default value", func() {
-				Expect(projectService.livenessProbeRetries()).To(BeEquivalentTo(config.DefaultProbeRetries))
-			})
-		})
-	})
-
-	Describe("readinessProbe", func() {
-
-		Describe("validations", func() {
-
-			When("any of time based paramaters is set to 0", func() {
-				JustBeforeEach(func() {
-					projectService.Labels = composego.Labels{
-						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeExec.String(),
-						config.LabelWorkloadReadinessProbeTimeout: "0",
-					}
-				})
-
-				It("logs and returns error", func() {
-					_, err := projectService.readinessProbe()
-					Expect(err).To(HaveOccurred())
-					Expect(err).To(MatchError("Readiness probe misconfigured"))
+					Expect(projectService.Extensions).To(Equal(extensions))
 
-					assertLog(logrus.ErrorLevel,
-						"Readiness probe misconfigured",
-						map[string]string{},
-					)
+					lp, err := projectService.LivenessProbe()
+					Expect(err).NotTo(HaveOccurred())
+					Expect(lp.HTTPGet).NotTo(BeNil())
+					Expect(lp.HTTPGet.Path).To(Equal(""))
 				})
 			})
 		})
 	})
 
-	Describe("readinessProbeTCP", func() {
+	Describe("livenessProbeTCP", func() {
 		When("defined via labels", func() {
 
 			Context("and supplied as string port", func() {
 				port := "8080"
 
 				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeTCP.String(),
-						config.LabelWorkloadReadinessProbeTCPPort: port,
-					}
+					k8sconf.Workload.LivenessProbe.Type = config.ProbeTypeTCP.String()
+					k8sconf.Workload.LivenessProbe.TCP.Port = 8080
 				})
 
 				It("returns label value", func() {
-					p, err := projectService.readinessProbe()
+					p, err := projectService.LivenessProbe()
 					Expect(err).To(Succeed())
 					Expect(p.TCPSocket.Port.String()).To(Equal(port))
 				})
@@ -1646,320 +1291,608 @@ var _ = Describe("ProjectService", func() {
 
 			Context("and empty port", func() {
 				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeTCP.String(),
-						config.LabelWorkloadReadinessProbeTCPPort: "",
-					}
-				})
-
-				It("returns an error", func() {
-					p, err := projectService.readinessProbe()
-					Expect(err).To(HaveOccurred())
-					Expect(err.Error()).To(Equal(fmt.Sprintf("%s needs to be a number", config.LabelWorkloadReadinessProbeTCPPort)))
-					Expect(p).To(BeNil())
-				})
-			})
-
-			Context("with NaN port", func() {
-				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeTCP.String(),
-						config.LabelWorkloadReadinessProbeTCPPort: "asds",
-					}
+					k8sconf.Workload.LivenessProbe.Type = config.ProbeTypeTCP.String()
+					k8sconf.Workload.LivenessProbe.TCP.Port = 0
 				})
 
 				It("returns an error", func() {
-					_, err := projectService.readinessProbe()
-					Expect(err).NotTo(Succeed())
-					Expect(err.Error()).To(ContainSubstring("%s needs to be a number", config.LabelWorkloadReadinessProbeTCPPort))
+					p, err := projectService.LivenessProbe()
+					Expect(err).NotTo(HaveOccurred())
+					Expect(p.TCPSocket.Port.String()).To(Equal("0"))
 				})
 			})
 
 			Context("and no port label", func() {
 				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadReadinessProbeType: config.ProbeTypeTCP.String(),
-					}
+					k8sconf.Workload.LivenessProbe.Type = config.ProbeTypeTCP.String()
 				})
 
 				It("returns an error", func() {
-					p, err := projectService.readinessProbe()
-					Expect(err).To(HaveOccurred())
-					Expect(err.Error()).To(Equal(fmt.Sprintf("%s not correctly defined", config.LabelWorkloadReadinessProbeTCPPort)))
-					Expect(p).To(BeNil())
-				})
-			})
-		})
-
-		When("not defined by label", func() {
-			It("returns default value as empty string slice", func() {
-				pt, err := projectService.readinessProbeType()
-				Expect(err).To(Succeed())
-				Expect(*pt).To(Equal(config.ProbeTypeNone))
-				Expect(projectService.readinessProbeCommand()).To(Equal([]string{}))
-			})
-		})
-	})
-
-	Describe("readinessProbeHTTP", func() {
-		Context("and supplied as string port and path", func() {
-			port := "8080"
-			path := "/status"
-
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadReadinessProbeType:     config.ProbeTypeHTTP.String(),
-					config.LabelWorkloadReadinessProbeHTTPPort: port,
-					config.LabelWorkloadReadinessProbeHTTPPath: path,
-				}
-			})
-
-			It("returns readiness probe with HTTPGet", func() {
-				p, err := projectService.readinessProbe()
-				Expect(err).To(Succeed())
-				Expect(p.HTTPGet.Port.String()).To(Equal(port))
-				Expect(p.HTTPGet.Path).To(Equal(path))
-			})
-		})
-
-		Context("and empty port", func() {
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadReadinessProbeType:     config.ProbeTypeHTTP.String(),
-					config.LabelWorkloadReadinessProbeHTTPPort: "",
-					config.LabelWorkloadReadinessProbeHTTPPath: "/status",
-				}
-			})
-
-			It("returns an error", func() {
-				p, err := projectService.readinessProbe()
-				Expect(err).To(HaveOccurred())
-				Expect(err.Error()).To(Equal(fmt.Sprintf("%s needs to be a number", config.LabelWorkloadReadinessProbeHTTPPort)))
-				Expect(p).To(BeNil())
-			})
-		})
-
-		Context("with NaN port", func() {
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadReadinessProbeType:     config.ProbeTypeHTTP.String(),
-					config.LabelWorkloadReadinessProbeHTTPPort: "asd",
-					config.LabelWorkloadReadinessProbeHTTPPath: "/status",
-				}
-			})
-
-			It("returns an error", func() {
-				_, err := projectService.readinessProbe()
-				Expect(err).NotTo(BeNil())
-				Expect(err.Error()).To(ContainSubstring("%s needs to be a number", config.LabelWorkloadReadinessProbeHTTPPort))
-			})
-		})
-
-		Context("and no port label", func() {
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadReadinessProbeType:     config.ProbeTypeHTTP.String(),
-					config.LabelWorkloadReadinessProbeHTTPPath: "/status",
-				}
-			})
-
-			It("returns an error", func() {
-				p, err := projectService.readinessProbe()
-				Expect(err).To(HaveOccurred())
-				Expect(err.Error()).To(Equal(fmt.Sprintf("%s not correctly defined", config.LabelWorkloadReadinessProbeHTTPPort)))
-				Expect(p).To(BeNil())
-			})
-		})
-	})
-
-	Describe("readinessProbeCommand", func() {
-		When("defined via labels", func() {
-
-			Context("and supplied as string command", func() {
-				cmd := "my test command"
-
-				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeExec.String(),
-						config.LabelWorkloadReadinessProbeCommand: cmd,
-					}
-				})
-
-				It("returns label value", func() {
-					Expect(projectService.readinessProbeCommand()).To(HaveLen(1))
-					Expect(projectService.readinessProbeCommand()).To(ContainElement(cmd))
-				})
-			})
-
-			Context("and specified as list", func() {
-				cmd := "[\"CMD\", \"echo\", \"Hello World\"]"
-
-				BeforeEach(func() {
-					labels = composego.Labels{
-						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeExec.String(),
-						config.LabelWorkloadReadinessProbeCommand: cmd,
-					}
-				})
-
-				It("returns label value", func() {
-					Expect(projectService.readinessProbeCommand()).To(HaveLen(2))
-					Expect(projectService.readinessProbeCommand()).ToNot(ContainElements("CMD"))
-					Expect(projectService.readinessProbeCommand()).To(ContainElements("echo", "Hello World"))
+					p, err := projectService.LivenessProbe()
+					Expect(err).NotTo(HaveOccurred())
+					p.TCPSocket.Port = intstr.FromString("")
 				})
 			})
 		})
 
-		When("not defined by label", func() {
-			It("returns default value as empty string slice", func() {
-				pt, err := projectService.readinessProbeType()
-				Expect(err).To(Succeed())
-				Expect(*pt).To(Equal(config.ProbeTypeNone))
-				Expect(projectService.readinessProbeCommand()).To(Equal([]string{}))
-			})
-		})
-	})
-
-	Describe("readinessProbeInterval", func() {
-		When("defined via labels", func() {
-			interval := "30s"
-
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadReadinessProbeType:     config.ProbeTypeExec.String(),
-					config.LabelWorkloadReadinessProbeInterval: interval,
-				}
-			})
-
-			It("returns label value", func() {
-				Expect(projectService.readinessProbeInterval()).To(BeEquivalentTo(30))
-			})
-		})
-
-		When("not defined by label", func() {
-			It("returns default value", func() {
-				expected, _ := durationStrToSecondsInt(config.DefaultProbeInterval)
-				Expect(projectService.readinessProbeInterval()).To(Equal(*expected))
-			})
-		})
-	})
-
-	Describe("readinessProbeTimeout", func() {
-		When("defined via labels", func() {
-			timeout := "30s"
-
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadReadinessProbeType:    config.ProbeTypeExec.String(),
-					config.LabelWorkloadReadinessProbeTimeout: timeout,
-				}
-			})
-
-			It("returns label value", func() {
-				Expect(projectService.readinessProbeTimeout()).To(BeEquivalentTo(30))
-			})
-		})
-
-		When("not defined by label", func() {
-			It("returns default value", func() {
-				expected, _ := durationStrToSecondsInt(config.DefaultProbeTimeout)
-				Expect(projectService.readinessProbeTimeout()).To(Equal(*expected))
-			})
-		})
-	})
-
-	Describe("readinessProbeInitialDelay", func() {
-		When("defined via labels", func() {
-			delay := "30s"
-
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadReadinessProbeType:         config.ProbeTypeExec.String(),
-					config.LabelWorkloadReadinessProbeInitialDelay: delay,
-				}
-			})
-
-			It("returns label value", func() {
-				Expect(projectService.readinessProbeInitialDelay()).To(BeEquivalentTo(30))
-			})
-		})
-
-		When("not defined by label", func() {
-			It("returns default value", func() {
-				expected, _ := durationStrToSecondsInt(config.DefaultProbeInitialDelay)
-				Expect(projectService.readinessProbeInitialDelay()).To(Equal(*expected))
-			})
-		})
-	})
-
-	Describe("readinessProbeRetries", func() {
-		When("defined via labels", func() {
-			retries := "3"
-
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadReadinessProbeType:    config.ProbeTypeExec.String(),
-					config.LabelWorkloadReadinessProbeRetries: retries,
-				}
-			})
-
-			It("returns label value", func() {
-				expected := 3
-				Expect(projectService.readinessProbeRetries()).To(BeEquivalentTo(expected))
-			})
-		})
-
-		When("not defined by label", func() {
-			It("returns default value", func() {
-				Expect(projectService.readinessProbeRetries()).To(BeEquivalentTo(config.DefaultProbeRetries))
-			})
-		})
 	})
 
-	Describe("readinessProbeDisabled", func() {
-		When("defined via labels with valid (truth) value", func() {
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadReadinessProbeType: config.ProbeTypeNone.String(),
-				}
-			})
-
-			It("returns label value", func() {
-				pt, err := projectService.readinessProbeType()
-				Expect(err).To(Succeed())
-				Expect(*pt).To(Equal(config.ProbeTypeNone))
-			})
-
-			It("returns a nil probe", func() {
-				probe, err := projectService.readinessProbe()
-				Expect(err).To(Succeed())
-				Expect(probe).To(BeNil())
-			})
-		})
-
-		When("defined via labels with invalid (non truthy) value", func() {
-			disabled := "FOO"
-
-			BeforeEach(func() {
-				labels = composego.Labels{
-					config.LabelWorkloadReadinessProbeType: disabled,
-				}
-			})
-
-			It("returns an error", func() {
-				p, err := projectService.readinessProbe()
-				Expect(err).To(HaveOccurred())
-				Expect(err.Error()).To(ContainSubstring("not a supported readiness probe type"))
-				Expect(p).To(BeNil())
-			})
-		})
-
-		When("not defined via labels at all", func() {
-			It("returns default value - disable by default", func() {
-				p, err := projectService.readinessProbe()
-				Expect(err).To(Succeed())
-				Expect(p).To(BeNil())
-			})
-		})
-	})
+	// 	Describe("livenessProbeCommand", func() {
+	// 		When("defined via labels", func() {
+
+	// 			Context("and supplied as string command", func() {
+	// 				cmd := "my test command"
+
+	// 				BeforeEach(func() {
+	// 					labels = composego.Labels{
+	// 						config.LabelWorkloadLivenessProbeCommand: cmd,
+	// 					}
+	// 				})
+
+	// 				It("returns label value", func() {
+	// 					result, err := projectService.LivenessProbe()
+	// 					Expect(err).NotTo(HaveOccurred())
+	// 					Expect().To(HaveLen(1))
+	// 					Expect(projectService.livenessProbeCommand()).To(ContainElement(cmd))
+	// 				})
+	// 			})
+
+	// 			Context("and specified as list", func() {
+	// 				cmd := "[\"CMD\", \"echo\", \"Hello World\"]"
+
+	// 				BeforeEach(func() {
+	// 					labels = composego.Labels{
+	// 						config.LabelWorkloadLivenessProbeCommand: cmd,
+	// 					}
+	// 				})
+
+	// 				It("returns label value", func() {
+	// 					Expect(projectService.livenessProbeCommand()).To(HaveLen(2))
+	// 					Expect(projectService.livenessProbeCommand()).ToNot(ContainElements("CMD"))
+	// 					Expect(projectService.livenessProbeCommand()).To(ContainElements("echo", "Hello World"))
+	// 				})
+	// 			})
+	// 		})
+
+	// 		When("defined via healthcheck block only", func() {
+	// 			cmd := []string{
+	// 				"CMD-SHELL",
+	// 				"/my-test/command.sh",
+	// 				"some-args",
+	// 			}
+
+	// 			JustBeforeEach(func() {
+	// 				projectService.HealthCheck = &composego.HealthCheckConfig{
+	// 					Test: composego.HealthCheckTest(cmd),
+	// 				}
+	// 			})
+
+	// 			It("returns project service healthcheck test command", func() {
+	// 				Expect(projectService.livenessProbeCommand()).To(HaveLen(2))
+	// 				Expect(projectService.livenessProbeCommand()).To(ContainElements(cmd[1:]))
+	// 			})
+	// 		})
+
+	// 		When("not defined by both label nor healthcheck block", func() {
+	// 			It("returns default value", func() {
+	// 				Expect(projectService.livenessProbeCommand()).To(ContainElements(config.DefaultLivenessProbeCommand))
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("livenessProbeInterval", func() {
+	// 		When("defined via labels", func() {
+	// 			interval := "30s"
+
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadLivenessProbeInterval: interval,
+	// 				}
+	// 			})
+
+	// 			It("returns label value", func() {
+	// 				Expect(projectService.livenessProbeInterval()).To(BeEquivalentTo(30))
+	// 			})
+	// 		})
+
+	// 		When("defined via healthcheck block only", func() {
+	// 			seconds := 10
+	// 			interval := composego.Duration(time.Duration(seconds) * time.Second)
+
+	// 			JustBeforeEach(func() {
+	// 				projectService.HealthCheck = &composego.HealthCheckConfig{
+	// 					Interval: &interval,
+	// 				}
+	// 			})
+
+	// 			It("returns project service healthcheck interval", func() {
+	// 				Expect(projectService.livenessProbeInterval()).To(BeEquivalentTo(seconds))
+	// 			})
+	// 		})
+
+	// 		When("not defined by both label nor healthcheck block", func() {
+	// 			It("returns default value", func() {
+	// 				expected, _ := durationStrToSecondsInt(config.DefaultProbeInterval)
+	// 				Expect(projectService.livenessProbeInterval()).To(Equal(*expected))
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("livenessProbeTimeout", func() {
+	// 		When("defined via labels", func() {
+	// 			timeout := "30s"
+
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadLivenessProbeTimeout: timeout,
+	// 				}
+	// 			})
+
+	// 			It("returns label value", func() {
+	// 				Expect(projectService.livenessProbeTimeout()).To(BeEquivalentTo(30))
+	// 			})
+	// 		})
+
+	// 		When("defined via healthcheck block only", func() {
+	// 			seconds := 3
+	// 			timeout := composego.Duration(time.Duration(seconds) * time.Second)
+
+	// 			JustBeforeEach(func() {
+	// 				projectService.HealthCheck = &composego.HealthCheckConfig{
+	// 					Timeout: &timeout,
+	// 				}
+	// 			})
+
+	// 			It("returns project service healthcheck timeout", func() {
+	// 				Expect(projectService.livenessProbeTimeout()).To(BeEquivalentTo(seconds))
+	// 			})
+	// 		})
+
+	// 		When("not defined by both label nor healthcheck block", func() {
+	// 			It("returns default value", func() {
+	// 				expected, _ := durationStrToSecondsInt(config.DefaultProbeTimeout)
+	// 				Expect(projectService.livenessProbeTimeout()).To(Equal(*expected))
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("livenessProbeInitialDelay", func() {
+	// 		When("defined via labels", func() {
+	// 			delay := "30s"
+
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadLivenessProbeInitialDelay: delay,
+	// 				}
+	// 			})
+
+	// 			It("returns label value", func() {
+	// 				Expect(projectService.livenessProbeInitialDelay()).To(BeEquivalentTo(30))
+	// 			})
+	// 		})
+
+	// 		When("defined via healthcheck block only", func() {
+	// 			seconds := 5
+	// 			startPeriod := composego.Duration(time.Duration(seconds) * time.Second)
+
+	// 			JustBeforeEach(func() {
+	// 				projectService.HealthCheck = &composego.HealthCheckConfig{
+	// 					StartPeriod: &startPeriod,
+	// 				}
+	// 			})
+
+	// 			It("returns project service healthcheck start period", func() {
+	// 				Expect(projectService.livenessProbeInitialDelay()).To(BeEquivalentTo(seconds))
+	// 			})
+	// 		})
+
+	// 		When("not defined by both label nor healthcheck block", func() {
+	// 			It("returns default value", func() {
+	// 				expected, _ := durationStrToSecondsInt(config.DefaultProbeInitialDelay)
+	// 				Expect(projectService.livenessProbeInitialDelay()).To(Equal(*expected))
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("livenessProbeRetries", func() {
+	// 		When("defined via labels", func() {
+	// 			retries := "3"
+
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadLivenessProbeRetries: retries,
+	// 				}
+	// 			})
+
+	// 			It("returns label value", func() {
+	// 				expected := 3
+	// 				Expect(projectService.livenessProbeRetries()).To(BeEquivalentTo(expected))
+	// 			})
+	// 		})
+
+	// 		When("defined via healthcheck block only", func() {
+	// 			retries := uint64(5)
+
+	// 			JustBeforeEach(func() {
+	// 				projectService.HealthCheck = &composego.HealthCheckConfig{
+	// 					Retries: &retries,
+	// 				}
+	// 			})
+
+	// 			It("returns project service healthcheck retries", func() {
+	// 				Expect(projectService.livenessProbeRetries()).To(BeEquivalentTo(retries))
+	// 			})
+	// 		})
+
+	// 		When("not defined by both label nor healthcheck block", func() {
+	// 			It("returns default value", func() {
+	// 				Expect(projectService.livenessProbeRetries()).To(BeEquivalentTo(config.DefaultProbeRetries))
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("readinessProbe", func() {
+
+	// 		Describe("validations", func() {
+
+	// 			When("any of time based paramaters is set to 0", func() {
+	// 				JustBeforeEach(func() {
+	// 					projectService.Labels = composego.Labels{
+	// 						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeExec.String(),
+	// 						config.LabelWorkloadReadinessProbeTimeout: "0",
+	// 					}
+	// 				})
+
+	// 				It("logs and returns error", func() {
+	// 					_, err := projectService.readinessProbe()
+	// 					Expect(err).To(HaveOccurred())
+	// 					Expect(err).To(MatchError("Readiness probe misconfigured"))
+
+	// 					assertLog(logrus.ErrorLevel,
+	// 						"Readiness probe misconfigured",
+	// 						map[string]string{},
+	// 					)
+	// 				})
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("readinessProbeTCP", func() {
+	// 		When("defined via labels", func() {
+
+	// 			Context("and supplied as string port", func() {
+	// 				port := "8080"
+
+	// 				BeforeEach(func() {
+	// 					labels = composego.Labels{
+	// 						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeTCP.String(),
+	// 						config.LabelWorkloadReadinessProbeTCPPort: port,
+	// 					}
+	// 				})
+
+	// 				It("returns label value", func() {
+	// 					p, err := projectService.readinessProbe()
+	// 					Expect(err).To(Succeed())
+	// 					Expect(p.TCPSocket.Port.String()).To(Equal(port))
+	// 				})
+	// 			})
+
+	// 			Context("and empty port", func() {
+	// 				BeforeEach(func() {
+	// 					labels = composego.Labels{
+	// 						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeTCP.String(),
+	// 						config.LabelWorkloadReadinessProbeTCPPort: "",
+	// 					}
+	// 				})
+
+	// 				It("returns an error", func() {
+	// 					p, err := projectService.readinessProbe()
+	// 					Expect(err).To(HaveOccurred())
+	// 					Expect(err.Error()).To(Equal(fmt.Sprintf("%s needs to be a number", config.LabelWorkloadReadinessProbeTCPPort)))
+	// 					Expect(p).To(BeNil())
+	// 				})
+	// 			})
+
+	// 			Context("with NaN port", func() {
+	// 				BeforeEach(func() {
+	// 					labels = composego.Labels{
+	// 						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeTCP.String(),
+	// 						config.LabelWorkloadReadinessProbeTCPPort: "asds",
+	// 					}
+	// 				})
+
+	// 				It("returns an error", func() {
+	// 					_, err := projectService.readinessProbe()
+	// 					Expect(err).NotTo(Succeed())
+	// 					Expect(err.Error()).To(ContainSubstring("%s needs to be a number", config.LabelWorkloadReadinessProbeTCPPort))
+	// 				})
+	// 			})
+
+	// 			Context("and no port label", func() {
+	// 				BeforeEach(func() {
+	// 					labels = composego.Labels{
+	// 						config.LabelWorkloadReadinessProbeType: config.ProbeTypeTCP.String(),
+	// 					}
+	// 				})
+
+	// 				It("returns an error", func() {
+	// 					p, err := projectService.readinessProbe()
+	// 					Expect(err).To(HaveOccurred())
+	// 					Expect(err.Error()).To(Equal(fmt.Sprintf("%s not correctly defined", config.LabelWorkloadReadinessProbeTCPPort)))
+	// 					Expect(p).To(BeNil())
+	// 				})
+	// 			})
+	// 		})
+
+	// 		When("not defined by label", func() {
+	// 			It("returns default value as empty string slice", func() {
+	// 				pt, err := projectService.readinessProbeType()
+	// 				Expect(err).To(Succeed())
+	// 				Expect(*pt).To(Equal(config.ProbeTypeNone))
+	// 				Expect(projectService.readinessProbeCommand()).To(Equal([]string{}))
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("readinessProbeHTTP", func() {
+	// 		Context("and supplied as string port and path", func() {
+	// 			port := "8080"
+	// 			path := "/status"
+
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadReadinessProbeType:     config.ProbeTypeHTTP.String(),
+	// 					config.LabelWorkloadReadinessProbeHTTPPort: port,
+	// 					config.LabelWorkloadReadinessProbeHTTPPath: path,
+	// 				}
+	// 			})
+
+	// 			It("returns readiness probe with HTTPGet", func() {
+	// 				p, err := projectService.readinessProbe()
+	// 				Expect(err).To(Succeed())
+	// 				Expect(p.HTTPGet.Port.String()).To(Equal(port))
+	// 				Expect(p.HTTPGet.Path).To(Equal(path))
+	// 			})
+	// 		})
+
+	// 		Context("and empty port", func() {
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadReadinessProbeType:     config.ProbeTypeHTTP.String(),
+	// 					config.LabelWorkloadReadinessProbeHTTPPort: "",
+	// 					config.LabelWorkloadReadinessProbeHTTPPath: "/status",
+	// 				}
+	// 			})
+
+	// 			It("returns an error", func() {
+	// 				p, err := projectService.readinessProbe()
+	// 				Expect(err).To(HaveOccurred())
+	// 				Expect(err.Error()).To(Equal(fmt.Sprintf("%s needs to be a number", config.LabelWorkloadReadinessProbeHTTPPort)))
+	// 				Expect(p).To(BeNil())
+	// 			})
+	// 		})
+
+	// 		Context("with NaN port", func() {
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadReadinessProbeType:     config.ProbeTypeHTTP.String(),
+	// 					config.LabelWorkloadReadinessProbeHTTPPort: "asd",
+	// 					config.LabelWorkloadReadinessProbeHTTPPath: "/status",
+	// 				}
+	// 			})
+
+	// 			It("returns an error", func() {
+	// 				_, err := projectService.readinessProbe()
+	// 				Expect(err).NotTo(BeNil())
+	// 				Expect(err.Error()).To(ContainSubstring("%s needs to be a number", config.LabelWorkloadReadinessProbeHTTPPort))
+	// 			})
+	// 		})
+
+	// 		Context("and no port label", func() {
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadReadinessProbeType:     config.ProbeTypeHTTP.String(),
+	// 					config.LabelWorkloadReadinessProbeHTTPPath: "/status",
+	// 				}
+	// 			})
+
+	// 			It("returns an error", func() {
+	// 				p, err := projectService.readinessProbe()
+	// 				Expect(err).To(HaveOccurred())
+	// 				Expect(err.Error()).To(Equal(fmt.Sprintf("%s not correctly defined", config.LabelWorkloadReadinessProbeHTTPPort)))
+	// 				Expect(p).To(BeNil())
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("readinessProbeCommand", func() {
+	// 		When("defined via labels", func() {
+
+	// 			Context("and supplied as string command", func() {
+	// 				cmd := "my test command"
+
+	// 				BeforeEach(func() {
+	// 					labels = composego.Labels{
+	// 						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeExec.String(),
+	// 						config.LabelWorkloadReadinessProbeCommand: cmd,
+	// 					}
+	// 				})
+
+	// 				It("returns label value", func() {
+	// 					Expect(projectService.readinessProbeCommand()).To(HaveLen(1))
+	// 					Expect(projectService.readinessProbeCommand()).To(ContainElement(cmd))
+	// 				})
+	// 			})
+
+	// 			Context("and specified as list", func() {
+	// 				cmd := "[\"CMD\", \"echo\", \"Hello World\"]"
+
+	// 				BeforeEach(func() {
+	// 					labels = composego.Labels{
+	// 						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeExec.String(),
+	// 						config.LabelWorkloadReadinessProbeCommand: cmd,
+	// 					}
+	// 				})
+
+	// 				It("returns label value", func() {
+	// 					Expect(projectService.readinessProbeCommand()).To(HaveLen(2))
+	// 					Expect(projectService.readinessProbeCommand()).ToNot(ContainElements("CMD"))
+	// 					Expect(projectService.readinessProbeCommand()).To(ContainElements("echo", "Hello World"))
+	// 				})
+	// 			})
+	// 		})
+
+	// 		When("not defined by label", func() {
+	// 			It("returns default value as empty string slice", func() {
+	// 				pt, err := projectService.readinessProbeType()
+	// 				Expect(err).To(Succeed())
+	// 				Expect(*pt).To(Equal(config.ProbeTypeNone))
+	// 				Expect(projectService.readinessProbeCommand()).To(Equal([]string{}))
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("readinessProbeInterval", func() {
+	// 		When("defined via labels", func() {
+	// 			interval := "30s"
+
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadReadinessProbeType:     config.ProbeTypeExec.String(),
+	// 					config.LabelWorkloadReadinessProbeInterval: interval,
+	// 				}
+	// 			})
+
+	// 			It("returns label value", func() {
+	// 				Expect(projectService.readinessProbeInterval()).To(BeEquivalentTo(30))
+	// 			})
+	// 		})
+
+	// 		When("not defined by label", func() {
+	// 			It("returns default value", func() {
+	// 				expected, _ := durationStrToSecondsInt(config.DefaultProbeInterval)
+	// 				Expect(projectService.readinessProbeInterval()).To(Equal(*expected))
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("readinessProbeTimeout", func() {
+	// 		When("defined via labels", func() {
+	// 			timeout := "30s"
+
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadReadinessProbeType:    config.ProbeTypeExec.String(),
+	// 					config.LabelWorkloadReadinessProbeTimeout: timeout,
+	// 				}
+	// 			})
+
+	// 			It("returns label value", func() {
+	// 				Expect(projectService.readinessProbeTimeout()).To(BeEquivalentTo(30))
+	// 			})
+	// 		})
+
+	// 		When("not defined by label", func() {
+	// 			It("returns default value", func() {
+	// 				expected, _ := durationStrToSecondsInt(config.DefaultProbeTimeout)
+	// 				Expect(projectService.readinessProbeTimeout()).To(Equal(*expected))
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("readinessProbeInitialDelay", func() {
+	// 		When("defined via labels", func() {
+	// 			delay := "30s"
+
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadReadinessProbeType:         config.ProbeTypeExec.String(),
+	// 					config.LabelWorkloadReadinessProbeInitialDelay: delay,
+	// 				}
+	// 			})
+
+	// 			It("returns label value", func() {
+	// 				Expect(projectService.readinessProbeInitialDelay()).To(BeEquivalentTo(30))
+	// 			})
+	// 		})
+
+	// 		When("not defined by label", func() {
+	// 			It("returns default value", func() {
+	// 				expected, _ := durationStrToSecondsInt(config.DefaultProbeInitialDelay)
+	// 				Expect(projectService.readinessProbeInitialDelay()).To(Equal(*expected))
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("readinessProbeRetries", func() {
+	// 		When("defined via labels", func() {
+	// 			retries := "3"
+
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadReadinessProbeType:    config.ProbeTypeExec.String(),
+	// 					config.LabelWorkloadReadinessProbeRetries: retries,
+	// 				}
+	// 			})
+
+	// 			It("returns label value", func() {
+	// 				expected := 3
+	// 				Expect(projectService.readinessProbeRetries()).To(BeEquivalentTo(expected))
+	// 			})
+	// 		})
+
+	// 		When("not defined by label", func() {
+	// 			It("returns default value", func() {
+	// 				Expect(projectService.readinessProbeRetries()).To(BeEquivalentTo(config.DefaultProbeRetries))
+	// 			})
+	// 		})
+	// 	})
+
+	// 	Describe("readinessProbeDisabled", func() {
+	// 		When("defined via labels with valid (truth) value", func() {
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadReadinessProbeType: config.ProbeTypeNone.String(),
+	// 				}
+	// 			})
+
+	// 			It("returns label value", func() {
+	// 				pt, err := projectService.readinessProbeType()
+	// 				Expect(err).To(Succeed())
+	// 				Expect(*pt).To(Equal(config.ProbeTypeNone))
+	// 			})
+
+	// 			It("returns a nil probe", func() {
+	// 				probe, err := projectService.readinessProbe()
+	// 				Expect(err).To(Succeed())
+	// 				Expect(probe).To(BeNil())
+	// 			})
+	// 		})
+
+	// 		When("defined via labels with invalid (non truthy) value", func() {
+	// 			disabled := "FOO"
+
+	// 			BeforeEach(func() {
+	// 				labels = composego.Labels{
+	// 					config.LabelWorkloadReadinessProbeType: disabled,
+	// 				}
+	// 			})
+
+	// 			It("returns an error", func() {
+	// 				p, err := projectService.readinessProbe()
+	// 				Expect(err).To(HaveOccurred())
+	// 				Expect(err.Error()).To(ContainSubstring("not a supported readiness probe type"))
+	// 				Expect(p).To(BeNil())
+	// 			})
+	// 		})
+
+	// 		When("not defined via labels at all", func() {
+	// 			It("returns default value - disable by default", func() {
+	// 				p, err := projectService.readinessProbe()
+	// 				Expect(err).To(Succeed())
+	// 				Expect(p).To(BeNil())
+	// 			})
+	// 		})
+	// 	})
 
 })
diff --git a/pkg/kev/converter/kubernetes/transform_test.go b/pkg/kev/converter/kubernetes/transform_test.go
index 6e88cd0..5ed4f93 100644
--- a/pkg/kev/converter/kubernetes/transform_test.go
+++ b/pkg/kev/converter/kubernetes/transform_test.go
@@ -47,6 +47,7 @@ var _ = Describe("Transform", func() {
 	var project composego.Project
 	var projectService ProjectService
 	var excluded []string
+	var extensions map[string]interface{}
 
 	BeforeEach(func() {
 		project = composego.Project{
@@ -54,8 +55,9 @@ var _ = Describe("Transform", func() {
 		}
 
 		projectService = ProjectService{
-			Name:  "web",
-			Image: "some-image",
+			Name:       "web",
+			Image:      "some-image",
+			Extensions: extensions,
 		}
 	})
 
@@ -1888,41 +1890,26 @@ var _ = Describe("Transform", func() {
 
 			When("readiness probe is defined for project service", func() {
 				JustBeforeEach(func() {
-					projectService.Labels = composego.Labels{
-						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeExec.String(),
-						config.LabelWorkloadReadinessProbeCommand: "hello world",
-						config.LabelWorkloadLivenessProbeType:     config.ProbeTypeNone.String(),
+					k8sconf := config.DefaultK8SConfig()
+					k8sconf.Workload.LivenessProbe.Type = config.ProbeTypeNone.String()
+					k8sconf.Workload.ReadinessProbe.Type = config.ProbeTypeExec.String()
+					k8sconf.Workload.ReadinessProbe.Exec.Command = []string{"hello world"}
+
+					ext, err := k8sconf.ToMap()
+					Expect(err).NotTo(HaveOccurred())
+					projectService.Extensions = map[string]interface{}{
+						config.K8SExtensionKey: ext,
 					}
 				})
 
 				It("includes readiness probe definition in the pod spec", func() {
 					err := k.updateKubernetesObjects(projectService, &objs)
 					Expect(err).ToNot(HaveOccurred())
-
+					Expect(o.Spec.Template.Spec.Containers[0].ReadinessProbe).NotTo(BeNil())
 					Expect(o.Spec.Template.Spec.Containers[0].ReadinessProbe.Exec.Command).To(Equal([]string{"hello world"}))
 				})
 			})
 
-			When("readiness probe is misconfigured", func() {
-				JustBeforeEach(func() {
-					projectService.Labels = composego.Labels{
-						config.LabelWorkloadReadinessProbeType:    config.ProbeTypeExec.String(),
-						config.LabelWorkloadReadinessProbeCommand: "",
-					}
-				})
-
-				It("logs and returns an error", func() {
-					err := k.updateKubernetesObjects(projectService, &objs)
-					Expect(err).To(HaveOccurred())
-
-					assertLog(logrus.ErrorLevel,
-						"Couldn't update k8s object",
-						map[string]string{})
-
-					Expect(o.Spec.Template.Spec.Containers[0].ReadinessProbe).To(BeNil())
-				})
-			})
-
 			When("readiness probe is not defined or disabled", func() {
 				JustBeforeEach(func() {
 					projectService.Labels = composego.Labels{