This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit e5074043bc75ccfa11aa74d739e8e202c61dc673
Author: Mert Öztürk <[email protected]>
AuthorDate: Sun Apr 30 22:02:49 2023 +0200

    feat(trait): Add startup probes into health trait
---
 .../duck/client/internalclientset/fake/register.go | 14 ++---
 .../client/internalclientset/scheme/register.go    | 14 ++---
 .../camel.apache.org_integrationplatforms.yaml     | 64 ++++++++++++++++++++++
 .../crd/bases/camel.apache.org_integrations.yaml   | 32 +++++++++++
 .../bases/camel.apache.org_kameletbindings.yaml    | 32 +++++++++++
 config/crd/bases/camel.apache.org_pipes.yaml       | 32 +++++++++++
 docs/modules/ROOT/partials/apis/camel-k-crds.adoc  | 49 +++++++++++++++++
 docs/modules/traits/pages/health.adoc              | 28 ++++++++++
 helm/camel-k/crds/crd-integration-platform.yaml    | 64 ++++++++++++++++++++++
 helm/camel-k/crds/crd-integration.yaml             | 32 +++++++++++
 helm/camel-k/crds/crd-kamelet-binding.yaml         | 32 +++++++++++
 helm/camel-k/crds/crd-pipe.yaml                    | 32 +++++++++++
 pkg/apis/camel/v1/trait/health.go                  | 15 +++++
 pkg/apis/camel/v1/trait/zz_generated.deepcopy.go   |  5 ++
 .../camel/clientset/versioned/fake/register.go     | 14 ++---
 .../camel/clientset/versioned/scheme/register.go   | 14 ++---
 pkg/resources/resources.go                         | 20 +++----
 pkg/trait/health.go                                | 29 +++++++++-
 resources/traits.yaml                              | 25 +++++++++
 19 files changed, 508 insertions(+), 39 deletions(-)

diff --git a/addons/strimzi/duck/client/internalclientset/fake/register.go 
b/addons/strimzi/duck/client/internalclientset/fake/register.go
index 53a4309e7..e6ac15499 100644
--- a/addons/strimzi/duck/client/internalclientset/fake/register.go
+++ b/addons/strimzi/duck/client/internalclientset/fake/register.go
@@ -38,14 +38,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
 // AddToScheme adds all types of this clientset into the given scheme. This 
allows composition
 // of clientsets, like in:
 //
-//   import (
-//     "k8s.io/client-go/kubernetes"
-//     clientsetscheme "k8s.io/client-go/kubernetes/scheme"
-//     aggregatorclientsetscheme 
"k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
-//   )
+//     import (
+//       "k8s.io/client-go/kubernetes"
+//       clientsetscheme "k8s.io/client-go/kubernetes/scheme"
+//       aggregatorclientsetscheme 
"k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
+//     )
 //
-//   kclientset, _ := kubernetes.NewForConfig(c)
-//   _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
+//     kclientset, _ := kubernetes.NewForConfig(c)
+//     _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
 //
 // After this, RawExtensions in Kubernetes types will serialize 
kube-aggregator types
 // correctly.
diff --git a/addons/strimzi/duck/client/internalclientset/scheme/register.go 
b/addons/strimzi/duck/client/internalclientset/scheme/register.go
index 11f233b92..6abeca247 100644
--- a/addons/strimzi/duck/client/internalclientset/scheme/register.go
+++ b/addons/strimzi/duck/client/internalclientset/scheme/register.go
@@ -38,14 +38,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
 // AddToScheme adds all types of this clientset into the given scheme. This 
allows composition
 // of clientsets, like in:
 //
-//   import (
-//     "k8s.io/client-go/kubernetes"
-//     clientsetscheme "k8s.io/client-go/kubernetes/scheme"
-//     aggregatorclientsetscheme 
"k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
-//   )
+//     import (
+//       "k8s.io/client-go/kubernetes"
+//       clientsetscheme "k8s.io/client-go/kubernetes/scheme"
+//       aggregatorclientsetscheme 
"k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
+//     )
 //
-//   kclientset, _ := kubernetes.NewForConfig(c)
-//   _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
+//     kclientset, _ := kubernetes.NewForConfig(c)
+//     _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
 //
 // After this, RawExtensions in Kubernetes types will serialize 
kube-aggregator types
 // correctly.
diff --git a/config/crd/bases/camel.apache.org_integrationplatforms.yaml 
b/config/crd/bases/camel.apache.org_integrationplatforms.yaml
index 036d4dd22..c076777c8 100644
--- a/config/crd/bases/camel.apache.org_integrationplatforms.yaml
+++ b/config/crd/bases/camel.apache.org_integrationplatforms.yaml
@@ -809,6 +809,38 @@ spec:
                           times out.
                         format: int32
                         type: integer
+                      startupFailureThreshold:
+                        description: Minimum consecutive failures for the 
startup
+                          probe to be considered failed after having succeeded.
+                        format: int32
+                        type: integer
+                      startupInitialDelay:
+                        description: Number of seconds after the container has 
started
+                          before the startup probe is initiated.
+                        format: int32
+                        type: integer
+                      startupPeriod:
+                        description: How often to perform the startup probe.
+                        format: int32
+                        type: integer
+                      startupProbeEnabled:
+                        description: Configures the startup probe for the 
integration
+                          container (default `false`).
+                        type: boolean
+                      startupScheme:
+                        description: Scheme to use when connecting to the 
startup
+                          probe (default `HTTP`).
+                        type: string
+                      startupSuccessThreshold:
+                        description: Minimum consecutive successes for the 
startup
+                          probe to be considered successful after having 
failed.
+                        format: int32
+                        type: integer
+                      startupTimeout:
+                        description: Number of seconds after which the startup 
probe
+                          times out.
+                        format: int32
+                        type: integer
                     type: object
                   ingress:
                     description: The configuration of Ingress trait
@@ -2412,6 +2444,38 @@ spec:
                           times out.
                         format: int32
                         type: integer
+                      startupFailureThreshold:
+                        description: Minimum consecutive failures for the 
startup
+                          probe to be considered failed after having succeeded.
+                        format: int32
+                        type: integer
+                      startupInitialDelay:
+                        description: Number of seconds after the container has 
started
+                          before the startup probe is initiated.
+                        format: int32
+                        type: integer
+                      startupPeriod:
+                        description: How often to perform the startup probe.
+                        format: int32
+                        type: integer
+                      startupProbeEnabled:
+                        description: Configures the startup probe for the 
integration
+                          container (default `false`).
+                        type: boolean
+                      startupScheme:
+                        description: Scheme to use when connecting to the 
startup
+                          probe (default `HTTP`).
+                        type: string
+                      startupSuccessThreshold:
+                        description: Minimum consecutive successes for the 
startup
+                          probe to be considered successful after having 
failed.
+                        format: int32
+                        type: integer
+                      startupTimeout:
+                        description: Number of seconds after which the startup 
probe
+                          times out.
+                        format: int32
+                        type: integer
                     type: object
                   ingress:
                     description: The configuration of Ingress trait
diff --git a/config/crd/bases/camel.apache.org_integrations.yaml 
b/config/crd/bases/camel.apache.org_integrations.yaml
index a9d9b4624..56b14277f 100644
--- a/config/crd/bases/camel.apache.org_integrations.yaml
+++ b/config/crd/bases/camel.apache.org_integrations.yaml
@@ -6577,6 +6577,38 @@ spec:
                           times out.
                         format: int32
                         type: integer
+                      startupFailureThreshold:
+                        description: Minimum consecutive failures for the 
startup
+                          probe to be considered failed after having succeeded.
+                        format: int32
+                        type: integer
+                      startupInitialDelay:
+                        description: Number of seconds after the container has 
started
+                          before the startup probe is initiated.
+                        format: int32
+                        type: integer
+                      startupPeriod:
+                        description: How often to perform the startup probe.
+                        format: int32
+                        type: integer
+                      startupProbeEnabled:
+                        description: Configures the startup probe for the 
integration
+                          container (default `false`).
+                        type: boolean
+                      startupScheme:
+                        description: Scheme to use when connecting to the 
startup
+                          probe (default `HTTP`).
+                        type: string
+                      startupSuccessThreshold:
+                        description: Minimum consecutive successes for the 
startup
+                          probe to be considered successful after having 
failed.
+                        format: int32
+                        type: integer
+                      startupTimeout:
+                        description: Number of seconds after which the startup 
probe
+                          times out.
+                        format: int32
+                        type: integer
                     type: object
                   ingress:
                     description: The configuration of Ingress trait
diff --git a/config/crd/bases/camel.apache.org_kameletbindings.yaml 
b/config/crd/bases/camel.apache.org_kameletbindings.yaml
index 7eb4a77b2..68234f1a3 100644
--- a/config/crd/bases/camel.apache.org_kameletbindings.yaml
+++ b/config/crd/bases/camel.apache.org_kameletbindings.yaml
@@ -6862,6 +6862,38 @@ spec:
                               probe times out.
                             format: int32
                             type: integer
+                          startupFailureThreshold:
+                            description: Minimum consecutive failures for the 
startup
+                              probe to be considered failed after having 
succeeded.
+                            format: int32
+                            type: integer
+                          startupInitialDelay:
+                            description: Number of seconds after the container 
has
+                              started before the startup probe is initiated.
+                            format: int32
+                            type: integer
+                          startupPeriod:
+                            description: How often to perform the startup 
probe.
+                            format: int32
+                            type: integer
+                          startupProbeEnabled:
+                            description: Configures the startup probe for the 
integration
+                              container (default `false`).
+                            type: boolean
+                          startupScheme:
+                            description: Scheme to use when connecting to the 
startup
+                              probe (default `HTTP`).
+                            type: string
+                          startupSuccessThreshold:
+                            description: Minimum consecutive successes for the 
startup
+                              probe to be considered successful after having 
failed.
+                            format: int32
+                            type: integer
+                          startupTimeout:
+                            description: Number of seconds after which the 
startup
+                              probe times out.
+                            format: int32
+                            type: integer
                         type: object
                       ingress:
                         description: The configuration of Ingress trait
diff --git a/config/crd/bases/camel.apache.org_pipes.yaml 
b/config/crd/bases/camel.apache.org_pipes.yaml
index a9fb01df8..d1640f18e 100644
--- a/config/crd/bases/camel.apache.org_pipes.yaml
+++ b/config/crd/bases/camel.apache.org_pipes.yaml
@@ -6859,6 +6859,38 @@ spec:
                               probe times out.
                             format: int32
                             type: integer
+                          startupFailureThreshold:
+                            description: Minimum consecutive failures for the 
startup
+                              probe to be considered failed after having 
succeeded.
+                            format: int32
+                            type: integer
+                          startupInitialDelay:
+                            description: Number of seconds after the container 
has
+                              started before the startup probe is initiated.
+                            format: int32
+                            type: integer
+                          startupPeriod:
+                            description: How often to perform the startup 
probe.
+                            format: int32
+                            type: integer
+                          startupProbeEnabled:
+                            description: Configures the startup probe for the 
integration
+                              container (default `false`).
+                            type: boolean
+                          startupScheme:
+                            description: Scheme to use when connecting to the 
startup
+                              probe (default `HTTP`).
+                            type: string
+                          startupSuccessThreshold:
+                            description: Minimum consecutive successes for the 
startup
+                              probe to be considered successful after having 
failed.
+                            format: int32
+                            type: integer
+                          startupTimeout:
+                            description: Number of seconds after which the 
startup
+                              probe times out.
+                            format: int32
+                            type: integer
                         type: object
                       ingress:
                         description: The configuration of Ingress trait
diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc 
b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
index 96d354d2d..4cbcfd037 100644
--- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
+++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
@@ -5993,6 +5993,55 @@ int32
 
 Minimum consecutive failures for the readiness probe to be considered failed 
after having succeeded.
 
+|`startupProbeEnabled` +
+bool
+|
+
+
+Configures the startup probe for the integration container (default `false`).
+
+|`startupScheme` +
+string
+|
+
+
+Scheme to use when connecting to the startup probe (default `HTTP`).
+
+|`startupInitialDelay` +
+int32
+|
+
+
+Number of seconds after the container has started before the startup probe is 
initiated.
+
+|`startupTimeout` +
+int32
+|
+
+
+Number of seconds after which the startup probe times out.
+
+|`startupPeriod` +
+int32
+|
+
+
+How often to perform the startup probe.
+
+|`startupSuccessThreshold` +
+int32
+|
+
+
+Minimum consecutive successes for the startup probe to be considered 
successful after having failed.
+
+|`startupFailureThreshold` +
+int32
+|
+
+
+Minimum consecutive failures for the startup probe to be considered failed 
after having succeeded.
+
 
 |===
 
diff --git a/docs/modules/traits/pages/health.adoc 
b/docs/modules/traits/pages/health.adoc
index 6606de9f0..1f4402508 100755
--- a/docs/modules/traits/pages/health.adoc
+++ b/docs/modules/traits/pages/health.adoc
@@ -83,6 +83,34 @@ The following configuration options are available:
 | int32
 | Minimum consecutive failures for the readiness probe to be considered failed 
after having succeeded.
 
+| health.startup-probe-enabled
+| bool
+| Configures the startup probe for the integration container (default `false`).
+
+| health.startup-scheme
+| string
+| Scheme to use when connecting to the startup probe (default `HTTP`).
+
+| health.startup-initial-delay
+| int32
+| Number of seconds after the container has started before the startup probe 
is initiated.
+
+| health.startup-timeout
+| int32
+| Number of seconds after which the startup probe times out.
+
+| health.startup-period
+| int32
+| How often to perform the startup probe.
+
+| health.startup-success-threshold
+| int32
+| Minimum consecutive successes for the startup probe to be considered 
successful after having failed.
+
+| health.startup-failure-threshold
+| int32
+| Minimum consecutive failures for the startup probe to be considered failed 
after having succeeded.
+
 |===
 
 // End of autogenerated code - DO NOT EDIT! (configuration)
diff --git a/helm/camel-k/crds/crd-integration-platform.yaml 
b/helm/camel-k/crds/crd-integration-platform.yaml
index 036d4dd22..c076777c8 100644
--- a/helm/camel-k/crds/crd-integration-platform.yaml
+++ b/helm/camel-k/crds/crd-integration-platform.yaml
@@ -809,6 +809,38 @@ spec:
                           times out.
                         format: int32
                         type: integer
+                      startupFailureThreshold:
+                        description: Minimum consecutive failures for the 
startup
+                          probe to be considered failed after having succeeded.
+                        format: int32
+                        type: integer
+                      startupInitialDelay:
+                        description: Number of seconds after the container has 
started
+                          before the startup probe is initiated.
+                        format: int32
+                        type: integer
+                      startupPeriod:
+                        description: How often to perform the startup probe.
+                        format: int32
+                        type: integer
+                      startupProbeEnabled:
+                        description: Configures the startup probe for the 
integration
+                          container (default `false`).
+                        type: boolean
+                      startupScheme:
+                        description: Scheme to use when connecting to the 
startup
+                          probe (default `HTTP`).
+                        type: string
+                      startupSuccessThreshold:
+                        description: Minimum consecutive successes for the 
startup
+                          probe to be considered successful after having 
failed.
+                        format: int32
+                        type: integer
+                      startupTimeout:
+                        description: Number of seconds after which the startup 
probe
+                          times out.
+                        format: int32
+                        type: integer
                     type: object
                   ingress:
                     description: The configuration of Ingress trait
@@ -2412,6 +2444,38 @@ spec:
                           times out.
                         format: int32
                         type: integer
+                      startupFailureThreshold:
+                        description: Minimum consecutive failures for the 
startup
+                          probe to be considered failed after having succeeded.
+                        format: int32
+                        type: integer
+                      startupInitialDelay:
+                        description: Number of seconds after the container has 
started
+                          before the startup probe is initiated.
+                        format: int32
+                        type: integer
+                      startupPeriod:
+                        description: How often to perform the startup probe.
+                        format: int32
+                        type: integer
+                      startupProbeEnabled:
+                        description: Configures the startup probe for the 
integration
+                          container (default `false`).
+                        type: boolean
+                      startupScheme:
+                        description: Scheme to use when connecting to the 
startup
+                          probe (default `HTTP`).
+                        type: string
+                      startupSuccessThreshold:
+                        description: Minimum consecutive successes for the 
startup
+                          probe to be considered successful after having 
failed.
+                        format: int32
+                        type: integer
+                      startupTimeout:
+                        description: Number of seconds after which the startup 
probe
+                          times out.
+                        format: int32
+                        type: integer
                     type: object
                   ingress:
                     description: The configuration of Ingress trait
diff --git a/helm/camel-k/crds/crd-integration.yaml 
b/helm/camel-k/crds/crd-integration.yaml
index a9d9b4624..56b14277f 100644
--- a/helm/camel-k/crds/crd-integration.yaml
+++ b/helm/camel-k/crds/crd-integration.yaml
@@ -6577,6 +6577,38 @@ spec:
                           times out.
                         format: int32
                         type: integer
+                      startupFailureThreshold:
+                        description: Minimum consecutive failures for the 
startup
+                          probe to be considered failed after having succeeded.
+                        format: int32
+                        type: integer
+                      startupInitialDelay:
+                        description: Number of seconds after the container has 
started
+                          before the startup probe is initiated.
+                        format: int32
+                        type: integer
+                      startupPeriod:
+                        description: How often to perform the startup probe.
+                        format: int32
+                        type: integer
+                      startupProbeEnabled:
+                        description: Configures the startup probe for the 
integration
+                          container (default `false`).
+                        type: boolean
+                      startupScheme:
+                        description: Scheme to use when connecting to the 
startup
+                          probe (default `HTTP`).
+                        type: string
+                      startupSuccessThreshold:
+                        description: Minimum consecutive successes for the 
startup
+                          probe to be considered successful after having 
failed.
+                        format: int32
+                        type: integer
+                      startupTimeout:
+                        description: Number of seconds after which the startup 
probe
+                          times out.
+                        format: int32
+                        type: integer
                     type: object
                   ingress:
                     description: The configuration of Ingress trait
diff --git a/helm/camel-k/crds/crd-kamelet-binding.yaml 
b/helm/camel-k/crds/crd-kamelet-binding.yaml
index 7eb4a77b2..68234f1a3 100644
--- a/helm/camel-k/crds/crd-kamelet-binding.yaml
+++ b/helm/camel-k/crds/crd-kamelet-binding.yaml
@@ -6862,6 +6862,38 @@ spec:
                               probe times out.
                             format: int32
                             type: integer
+                          startupFailureThreshold:
+                            description: Minimum consecutive failures for the 
startup
+                              probe to be considered failed after having 
succeeded.
+                            format: int32
+                            type: integer
+                          startupInitialDelay:
+                            description: Number of seconds after the container 
has
+                              started before the startup probe is initiated.
+                            format: int32
+                            type: integer
+                          startupPeriod:
+                            description: How often to perform the startup 
probe.
+                            format: int32
+                            type: integer
+                          startupProbeEnabled:
+                            description: Configures the startup probe for the 
integration
+                              container (default `false`).
+                            type: boolean
+                          startupScheme:
+                            description: Scheme to use when connecting to the 
startup
+                              probe (default `HTTP`).
+                            type: string
+                          startupSuccessThreshold:
+                            description: Minimum consecutive successes for the 
startup
+                              probe to be considered successful after having 
failed.
+                            format: int32
+                            type: integer
+                          startupTimeout:
+                            description: Number of seconds after which the 
startup
+                              probe times out.
+                            format: int32
+                            type: integer
                         type: object
                       ingress:
                         description: The configuration of Ingress trait
diff --git a/helm/camel-k/crds/crd-pipe.yaml b/helm/camel-k/crds/crd-pipe.yaml
index a9fb01df8..d1640f18e 100644
--- a/helm/camel-k/crds/crd-pipe.yaml
+++ b/helm/camel-k/crds/crd-pipe.yaml
@@ -6859,6 +6859,38 @@ spec:
                               probe times out.
                             format: int32
                             type: integer
+                          startupFailureThreshold:
+                            description: Minimum consecutive failures for the 
startup
+                              probe to be considered failed after having 
succeeded.
+                            format: int32
+                            type: integer
+                          startupInitialDelay:
+                            description: Number of seconds after the container 
has
+                              started before the startup probe is initiated.
+                            format: int32
+                            type: integer
+                          startupPeriod:
+                            description: How often to perform the startup 
probe.
+                            format: int32
+                            type: integer
+                          startupProbeEnabled:
+                            description: Configures the startup probe for the 
integration
+                              container (default `false`).
+                            type: boolean
+                          startupScheme:
+                            description: Scheme to use when connecting to the 
startup
+                              probe (default `HTTP`).
+                            type: string
+                          startupSuccessThreshold:
+                            description: Minimum consecutive successes for the 
startup
+                              probe to be considered successful after having 
failed.
+                            format: int32
+                            type: integer
+                          startupTimeout:
+                            description: Number of seconds after which the 
startup
+                              probe times out.
+                            format: int32
+                            type: integer
                         type: object
                       ingress:
                         description: The configuration of Ingress trait
diff --git a/pkg/apis/camel/v1/trait/health.go 
b/pkg/apis/camel/v1/trait/health.go
index 8d4ddf02b..587249afe 100644
--- a/pkg/apis/camel/v1/trait/health.go
+++ b/pkg/apis/camel/v1/trait/health.go
@@ -54,4 +54,19 @@ type HealthTrait struct {
        ReadinessSuccessThreshold int32 `property:"readiness-success-threshold" 
json:"readinessSuccessThreshold,omitempty"`
        // Minimum consecutive failures for the readiness probe to be 
considered failed after having succeeded.
        ReadinessFailureThreshold int32 `property:"readiness-failure-threshold" 
json:"readinessFailureThreshold,omitempty"`
+
+       // Configures the startup probe for the integration container (default 
`false`).
+       StartupProbeEnabled *bool `property:"startup-probe-enabled" 
json:"startupProbeEnabled,omitempty"`
+       // Scheme to use when connecting to the startup probe (default `HTTP`).
+       StartupScheme string `property:"startup-scheme" 
json:"startupScheme,omitempty"`
+       // Number of seconds after the container has started before the startup 
probe is initiated.
+       StartupInitialDelay int32 `property:"startup-initial-delay" 
json:"startupInitialDelay,omitempty"`
+       // Number of seconds after which the startup probe times out.
+       StartupTimeout int32 `property:"startup-timeout" 
json:"startupTimeout,omitempty"`
+       // How often to perform the startup probe.
+       StartupPeriod int32 `property:"startup-period" 
json:"startupPeriod,omitempty"`
+       // Minimum consecutive successes for the startup probe to be considered 
successful after having failed.
+       StartupSuccessThreshold int32 `property:"startup-success-threshold" 
json:"startupSuccessThreshold,omitempty"`
+       // Minimum consecutive failures for the startup probe to be considered 
failed after having succeeded.
+       StartupFailureThreshold int32 `property:"startup-failure-threshold" 
json:"startupFailureThreshold,omitempty"`
 }
diff --git a/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go 
b/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go
index 942ac425d..6643fcbd7 100644
--- a/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go
@@ -334,6 +334,11 @@ func (in *HealthTrait) DeepCopyInto(out *HealthTrait) {
                *out = new(bool)
                **out = **in
        }
+       if in.StartupProbeEnabled != nil {
+               in, out := &in.StartupProbeEnabled, &out.StartupProbeEnabled
+               *out = new(bool)
+               **out = **in
+       }
 }
 
 // DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new HealthTrait.
diff --git a/pkg/client/camel/clientset/versioned/fake/register.go 
b/pkg/client/camel/clientset/versioned/fake/register.go
index 249a2b9e3..d55e6d595 100644
--- a/pkg/client/camel/clientset/versioned/fake/register.go
+++ b/pkg/client/camel/clientset/versioned/fake/register.go
@@ -40,14 +40,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
 // AddToScheme adds all types of this clientset into the given scheme. This 
allows composition
 // of clientsets, like in:
 //
-//   import (
-//     "k8s.io/client-go/kubernetes"
-//     clientsetscheme "k8s.io/client-go/kubernetes/scheme"
-//     aggregatorclientsetscheme 
"k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
-//   )
+//     import (
+//       "k8s.io/client-go/kubernetes"
+//       clientsetscheme "k8s.io/client-go/kubernetes/scheme"
+//       aggregatorclientsetscheme 
"k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
+//     )
 //
-//   kclientset, _ := kubernetes.NewForConfig(c)
-//   _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
+//     kclientset, _ := kubernetes.NewForConfig(c)
+//     _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
 //
 // After this, RawExtensions in Kubernetes types will serialize 
kube-aggregator types
 // correctly.
diff --git a/pkg/client/camel/clientset/versioned/scheme/register.go 
b/pkg/client/camel/clientset/versioned/scheme/register.go
index 9366fb20c..493d56e4c 100644
--- a/pkg/client/camel/clientset/versioned/scheme/register.go
+++ b/pkg/client/camel/clientset/versioned/scheme/register.go
@@ -40,14 +40,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
 // AddToScheme adds all types of this clientset into the given scheme. This 
allows composition
 // of clientsets, like in:
 //
-//   import (
-//     "k8s.io/client-go/kubernetes"
-//     clientsetscheme "k8s.io/client-go/kubernetes/scheme"
-//     aggregatorclientsetscheme 
"k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
-//   )
+//     import (
+//       "k8s.io/client-go/kubernetes"
+//       clientsetscheme "k8s.io/client-go/kubernetes/scheme"
+//       aggregatorclientsetscheme 
"k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
+//     )
 //
-//   kclientset, _ := kubernetes.NewForConfig(c)
-//   _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
+//     kclientset, _ := kubernetes.NewForConfig(c)
+//     _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
 //
 // After this, RawExtensions in Kubernetes types will serialize 
kube-aggregator types
 // correctly.
diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go
index 97d1c6afa..0ba8bf369 100644
--- a/pkg/resources/resources.go
+++ b/pkg/resources/resources.go
@@ -138,23 +138,23 @@ var assets = func() http.FileSystem {
                "/crd/bases/camel.apache.org_integrationplatforms.yaml": 
&vfsgen۰CompressedFileInfo{
                        name:             
"camel.apache.org_integrationplatforms.yaml",
                        modTime:          time.Time{},
-                       uncompressedSize: 172791,
+                       uncompressedSize: 176185,
 
-                       compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\x7b\x73\xe3\x36\xb2\x28\xfe\xff\x7c\x0a\x94\x53\xa7\xc6\x33\x65\xc9\x33\xbb\x27\xbb\x39\x3e\x95\xba\xd7\xf1\x4c\x12\x67\x1e\xf6\xb1\x3d\xb3\xbb\x95\xa4\x22\x88\x6c\x49\x88\x41\x80\x07\x00\x65\x2b\xbf\xfd\x7d\xf7\x5b\x68\x00\x24\x25\x91\x20\x25\x79\x1e\x49\xc4\x54\xed\x8e\x6d\xa2\xd9\x00\x1a\xfd\x42\x3f\xbe\x20\x83\x87\x7b\x1e\x7d\x41\x5e\xb3\x04\x84\x86\x94\x18\x49\xcc\x0c\xc8\x69\x4e\x93\x19\x90\x6b\x39\x31\x
 [...]
+                       compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\x7b\x73\xe3\x36\xb2\x28\xfe\xff\x7c\x0a\x94\x53\xa7\xc6\x33\x65\xc9\x33\xbb\x27\xbb\x39\x3e\x95\xba\xd7\xf1\x4c\x12\x67\x1e\xf6\xb1\x3d\xb3\xbb\x95\xa4\x22\x88\x6c\x49\x88\x41\x80\x07\x00\x65\x2b\xbf\xfd\x7d\xf7\x5b\x68\x00\x24\x25\x91\x20\x25\x79\x1e\x49\xc4\x54\xed\x8e\x6d\xa2\xd9\x00\x1a\xfd\x42\x3f\xbe\x20\x83\x87\x7b\x1e\x7d\x41\x5e\xb3\x04\x84\x86\x94\x18\x49\xcc\x0c\xc8\x69\x4e\x93\x19\x90\x6b\x39\x31\x
 [...]
                },
                "/crd/bases/camel.apache.org_integrations.yaml": 
&vfsgen۰CompressedFileInfo{
                        name:             "camel.apache.org_integrations.yaml",
                        modTime:          time.Time{},
-                       uncompressedSize: 492785,
+                       uncompressedSize: 494482,
 
-                       compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x7b\x73\x1b\x37\x96\x30\x8c\xff\x9f\x4f\x81\x72\x52\x8f\xa4\x8d\x48\xd9\x99\xd9\xa9\x19\xff\xa6\x9e\x94\x56\x96\x13\xfd\x62\xcb\x2a\x4b\x49\x9e\x94\x93\x4d\xc0\x6e\x90\xc4\xa3\x6e\xa0\x17\x40\x53\xe2\xbc\x79\xbf\xfb\x5b\x38\x00\xfa\xc2\x5b\x1f\xb4\x48\xc7\xd9\x6d\x4c\x55\xc6\x14\xd9\xa7\x71\x39\x38\xf7\xcb\xe7\x64\xb4\xbf\xf1\xd9\xe7\xe4\x0d\x4f\x98\xd0\x2c\x25\x46\x12\x33\x67\xe4\xbc\xa0\xc9\x9c\x91\x5b\x39\x
 [...]
+                       compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x7b\x73\x1b\x37\x96\x30\x8c\xff\x9f\x4f\x81\x72\x52\x8f\xa4\x8d\x48\xd9\x99\xd9\xa9\x19\xff\xa6\x9e\x94\x56\x96\x13\xfd\x62\xcb\x2a\x4b\x49\x9e\x94\x93\x4d\xc0\x6e\x90\xc4\xa3\x6e\xa0\x17\x40\x53\xe2\xbc\x79\xbf\xfb\x5b\x38\x00\xfa\xc2\x5b\x1f\xb4\x48\xc7\xd9\x6d\x4c\x55\xc6\x14\xd9\xa7\x71\x39\x38\xf7\xcb\xe7\x64\xb4\xbf\xf1\xd9\xe7\xe4\x0d\x4f\x98\xd0\x2c\x25\x46\x12\x33\x67\xe4\xbc\xa0\xc9\x9c\x91\x5b\x39\x
 [...]
                },
                "/crd/bases/camel.apache.org_kameletbindings.yaml": 
&vfsgen۰CompressedFileInfo{
                        name:             
"camel.apache.org_kameletbindings.yaml",
                        modTime:          time.Time{},
-                       uncompressedSize: 572601,
+                       uncompressedSize: 574426,
 
-                       compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x6b\x73\x1b\x37\xb6\x30\x0a\x7f\xf7\xaf\x40\xc9\xa9\x47\xd2\x8e\x48\xd9\x99\x99\xd4\x8c\xdf\xa9\x9d\xd2\xc8\x72\xa2\x37\xb6\xcc\xb2\x94\xe4\x49\x39\xd9\x09\xd8\x0d\x92\xd8\xea\x06\x7a\x00\x34\x25\xe6\xf8\xfc\xf7\x53\x58\x00\xfa\xc2\x9b\xb0\x9a\x92\x46\x9e\x69\x4c\x55\xc6\xa4\xd8\xab\x71\x5b\xf7\xdb\x73\x32\xb8\xbf\xf1\xec\x39\x79\xcb\x13\x26\x34\x4b\x89\x91\xc4\xcc\x18\x39\x29\x68\x32\x63\xe4\x52\x4e\xcc\x0d\x
 [...]
+                       compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x6b\x73\x1b\x37\xb6\x30\x0a\x7f\xf7\xaf\x40\xc9\xa9\x47\xd2\x8e\x48\xd9\x99\x99\xd4\x8c\xdf\xa9\x9d\xd2\xc8\x72\xa2\x37\xb6\xcc\xb2\x94\xe4\x49\x39\xd9\x09\xd8\x0d\x92\xd8\xea\x06\x7a\x00\x34\x25\xe6\xf8\xfc\xf7\x53\x58\x00\xfa\xc2\x9b\xb0\x9a\x92\x46\x9e\x69\x4c\x55\xc6\xa4\xd8\xab\x71\x5b\xf7\xdb\x73\x32\xb8\xbf\xf1\xec\x39\x79\xcb\x13\x26\x34\x4b\x89\x91\xc4\xcc\x18\x39\x29\x68\x32\x63\xe4\x52\x4e\xcc\x0d\x
 [...]
                },
                "/crd/bases/camel.apache.org_kamelets.yaml": 
&vfsgen۰CompressedFileInfo{
                        name:             "camel.apache.org_kamelets.yaml",
@@ -166,9 +166,9 @@ var assets = func() http.FileSystem {
                "/crd/bases/camel.apache.org_pipes.yaml": 
&vfsgen۰CompressedFileInfo{
                        name:             "camel.apache.org_pipes.yaml",
                        modTime:          time.Time{},
-                       uncompressedSize: 572326,
+                       uncompressedSize: 574151,
 
-                       compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x79\x73\x1b\x37\xb6\x38\x0c\xff\xef\x4f\x81\x92\x53\x3f\x49\x37\x22\x65\x67\x96\x9a\xf1\x3b\x75\x53\xba\xb2\xec\xe8\x8d\x2d\xb3\x2c\x25\xf9\xa5\x9c\xdc\x04\xec\x06\x49\x5c\x75\x03\x7d\x01\x34\x25\xe6\xf1\xf3\xdd\x9f\xc2\x01\xd0\x0b\x37\xe1\x34\x25\x8d\x3c\xd3\x98\xaa\x8c\x49\xb1\x4f\x63\x3b\xfb\xf6\x9c\x0c\xee\x6f\x3c\x7b\x4e\xde\xf1\x84\x09\xcd\x52\x62\x24\x31\x33\x46\x4e\x0a\x9a\xcc\x18\xb9\x94\x13\x73\x43\x
 [...]
+                       compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x79\x73\x1b\x37\xb6\x38\x0c\xff\xef\x4f\x81\x92\x53\x3f\x49\x37\x22\x65\x67\x96\x9a\xf1\x3b\x75\x53\xba\xb2\xec\xe8\x8d\x2d\xb3\x2c\x25\xf9\xa5\x9c\xdc\x04\xec\x06\x49\x5c\x75\x03\x7d\x01\x34\x25\xe6\xf1\xf3\xdd\x9f\xc2\x01\xd0\x0b\x37\xe1\x34\x25\x8d\x3c\xd3\x98\xaa\x8c\x49\xb1\x4f\x63\x3b\xfb\xf6\x9c\x0c\xee\x6f\x3c\x7b\x4e\xde\xf1\x84\x09\xcd\x52\x62\x24\x31\x33\x46\x4e\x0a\x9a\xcc\x18\xb9\x94\x13\x73\x43\x
 [...]
                },
                "/manager": &vfsgen۰DirInfo{
                        name:    "manager",
@@ -639,9 +639,9 @@ var assets = func() http.FileSystem {
                "/traits.yaml": &vfsgen۰CompressedFileInfo{
                        name:             "traits.yaml",
                        modTime:          time.Time{},
-                       uncompressedSize: 64965,
+                       uncompressedSize: 65967,
 
-                       compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x7d\x6b\x73\x1c\x37\x92\xe0\x77\xfd\x0a\x44\xef\x6d\x90\xd4\xf5\x83\xf2\xac\x67\xbd\xbc\xd3\xce\xd1\xb2\xec\xa1\xf5\xe2\x89\xb4\x67\x27\x74\x8a\x69\x74\x15\xba\x1b\xea\x6a\xa0\x06\x40\x91\x6a\xdf\xdc\x7f\xbf\x40\x66\xe2\x51\xd5\xd5\x64\x53\x12\xbd\xc3\x1d\xef\x46\x8c\x45\xb2\x90\x48\x24\x12\x89\x44\x3e\x9d\xe1\xd2\xd9\x93\x47\x23\xa6\xf8\x5a\x9c\xb0\xdf\xd9\x82\x57\xe2\x11\x63\x75\xc5\xdd\x5c\x9b\xf5\x09\x9b\xf3\x
 [...]
+                       compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x7d\x6b\x73\x1c\x37\x92\xe0\x77\xfd\x0a\x44\xef\x6d\x90\xd4\xf5\x83\xf2\xac\x67\xbd\xbc\xd3\xce\xd1\xb2\xec\xa1\xf5\xe2\x89\xb4\x67\x27\x74\x8a\x69\x74\x15\xba\x1b\xea\x6a\xa0\x06\x40\x91\x6a\xdf\xdc\x7f\xbf\x40\x66\xe2\x51\xd5\xd5\x64\x53\x12\xbd\xc3\x1d\xef\x46\x8c\x45\xb2\x90\x48\x24\x12\x89\x44\x3e\x9d\xe1\xd2\xd9\x93\x47\x23\xa6\xf8\x5a\x9c\xb0\xdf\xd9\x82\x57\xe2\x11\x63\x75\xc5\xdd\x5c\x9b\xf5\x09\x9b\xf3\x
 [...]
                },
        }
        fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
diff --git a/pkg/trait/health.go b/pkg/trait/health.go
index 48407fa68..59a8fce3a 100644
--- a/pkg/trait/health.go
+++ b/pkg/trait/health.go
@@ -32,6 +32,7 @@ import (
 const (
        defaultLivenessProbePath  = "/q/health/live"
        defaultReadinessProbePath = "/q/health/ready"
+       defaultStartupProbePath   = "/q/health/started"
 )
 
 type healthTrait struct {
@@ -45,6 +46,7 @@ func newHealthTrait() Trait {
                HealthTrait: traitv1.HealthTrait{
                        LivenessScheme:  string(corev1.URISchemeHTTP),
                        ReadinessScheme: string(corev1.URISchemeHTTP),
+                       StartupScheme:   string(corev1.URISchemeHTTP),
                },
        }
 }
@@ -74,7 +76,7 @@ func (t *healthTrait) Apply(e *Environment) error {
                return nil
        }
 
-       if !pointer.BoolDeref(t.LivenessProbeEnabled, false) && 
!pointer.BoolDeref(t.ReadinessProbeEnabled, true) {
+       if !pointer.BoolDeref(t.LivenessProbeEnabled, false) && 
!pointer.BoolDeref(t.ReadinessProbeEnabled, true) && 
!pointer.BoolDeref(t.StartupProbeEnabled, false) {
                return nil
        }
 
@@ -97,6 +99,9 @@ func (t *healthTrait) Apply(e *Environment) error {
        if pointer.BoolDeref(t.ReadinessProbeEnabled, true) {
                container.ReadinessProbe = t.newReadinessProbe(port, 
defaultReadinessProbePath)
        }
+       if pointer.BoolDeref(t.StartupProbeEnabled, false) {
+               container.StartupProbe = t.newStartupProbe(port, 
defaultStartupProbePath)
+       }
 
        return nil
 }
@@ -144,3 +149,25 @@ func (t *healthTrait) newReadinessProbe(port 
*intstr.IntOrString, path string) *
 
        return &p
 }
+
+func (t *healthTrait) newStartupProbe(port *intstr.IntOrString, path string) 
*corev1.Probe {
+       p := corev1.Probe{
+               ProbeHandler: corev1.ProbeHandler{
+                       HTTPGet: &corev1.HTTPGetAction{
+                               Path:   path,
+                               Scheme: corev1.URIScheme(t.StartupScheme),
+                       },
+               },
+               InitialDelaySeconds: t.StartupInitialDelay,
+               TimeoutSeconds:      t.StartupTimeout,
+               PeriodSeconds:       t.StartupPeriod,
+               SuccessThreshold:    t.StartupSuccessThreshold,
+               FailureThreshold:    t.StartupFailureThreshold,
+       }
+
+       if port != nil {
+               p.ProbeHandler.HTTPGet.Port = *port
+       }
+
+       return &p
+}
diff --git a/resources/traits.yaml b/resources/traits.yaml
index 1f8c03900..41c56e172 100755
--- a/resources/traits.yaml
+++ b/resources/traits.yaml
@@ -633,6 +633,31 @@ traits:
     type: int32
     description: Minimum consecutive failures for the readiness probe to be 
considered
       failed after having succeeded.
+  - name: startup-probe-enabled
+    type: bool
+    description: Configures the startup probe for the integration container 
(default
+      `false`).
+  - name: startup-scheme
+    type: string
+    description: Scheme to use when connecting to the startup probe (default 
`HTTP`).
+  - name: startup-initial-delay
+    type: int32
+    description: Number of seconds after the container has started before the 
startup
+      probe is initiated.
+  - name: startup-timeout
+    type: int32
+    description: Number of seconds after which the startup probe times out.
+  - name: startup-period
+    type: int32
+    description: How often to perform the startup probe.
+  - name: startup-success-threshold
+    type: int32
+    description: Minimum consecutive successes for the startup probe to be 
considered
+      successful after having failed.
+  - name: startup-failure-threshold
+    type: int32
+    description: Minimum consecutive failures for the startup probe to be 
considered
+      failed after having succeeded.
 - name: ingress
   platform: false
   profiles:


Reply via email to