This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push:
new 06ecee116 added .status.observedGeneration to camel K CRDs
06ecee116 is described below
commit 06ecee1162d620e2f80e0cd322f07e14f3b91743
Author: Subhasmita Swain <[email protected]>
AuthorDate: Mon Apr 18 00:15:15 2022 +0530
added .status.observedGeneration to camel K CRDs
---
.github/actions/e2e-knative-yaks/action.yml | 2 +-
config/crd/bases/camel.apache.org_builds.yaml | 5 +++++
config/crd/bases/camel.apache.org_integrationkits.yaml | 5 +++++
config/crd/bases/camel.apache.org_integrationplatforms.yaml | 5 +++++
config/crd/bases/camel.apache.org_integrations.yaml | 5 +++++
config/crd/bases/camel.apache.org_kameletbindings.yaml | 5 +++++
config/crd/bases/camel.apache.org_kamelets.yaml | 5 +++++
helm/camel-k/crds/crd-build.yaml | 5 +++++
helm/camel-k/crds/crd-integration-kit.yaml | 5 +++++
helm/camel-k/crds/crd-integration-platform.yaml | 5 +++++
helm/camel-k/crds/crd-integration.yaml | 5 +++++
helm/camel-k/crds/crd-kamelet-binding.yaml | 5 +++++
helm/camel-k/crds/crd-kamelet.yaml | 5 +++++
pkg/apis/camel/v1/build_types.go | 2 ++
pkg/apis/camel/v1/integration_types.go | 2 ++
pkg/apis/camel/v1/integrationkit_types.go | 2 ++
pkg/apis/camel/v1/integrationplatform_types.go | 3 ++-
pkg/apis/camel/v1alpha1/kamelet_binding_types.go | 2 ++
pkg/apis/camel/v1alpha1/kamelet_types.go | 2 ++
pkg/controller/build/build_controller.go | 1 +
pkg/controller/integration/integration_controller.go | 1 +
pkg/controller/integrationkit/integrationkit_controller.go | 2 ++
pkg/controller/integrationplatform/integrationplatform_controller.go | 2 ++
pkg/controller/kamelet/kamelet_controller.go | 2 ++
pkg/controller/kameletbinding/kamelet_binding_controller.go | 2 ++
25 files changed, 83 insertions(+), 2 deletions(-)
diff --git a/.github/actions/e2e-knative-yaks/action.yml
b/.github/actions/e2e-knative-yaks/action.yml
index bd1620a85..e0a48c8cc 100644
--- a/.github/actions/e2e-knative-yaks/action.yml
+++ b/.github/actions/e2e-knative-yaks/action.yml
@@ -78,7 +78,7 @@ runs:
uses: ./.github/actions/kamel-install-yaks
with:
image-name: "docker.io/yaks/yaks"
- version: 0.9.0-202202081449
+ version: 0.11.0-202204210858
- id: report-problematic
name: List Tests Marked As Problematic
diff --git a/config/crd/bases/camel.apache.org_builds.yaml
b/config/crd/bases/camel.apache.org_builds.yaml
index f13c37914..6ac023fd6 100644
--- a/config/crd/bases/camel.apache.org_builds.yaml
+++ b/config/crd/bases/camel.apache.org_builds.yaml
@@ -785,6 +785,11 @@ spec:
image:
description: the image name built
type: string
+ observedGeneration:
+ description: ObservedGeneration is the most recent generation
observed
+ for this Build.
+ format: int64
+ type: integer
phase:
description: describes the phase
type: string
diff --git a/config/crd/bases/camel.apache.org_integrationkits.yaml
b/config/crd/bases/camel.apache.org_integrationkits.yaml
index 94c534481..ca5c8f90f 100644
--- a/config/crd/bases/camel.apache.org_integrationkits.yaml
+++ b/config/crd/bases/camel.apache.org_integrationkits.yaml
@@ -236,6 +236,11 @@ spec:
image:
description: actual image name of the kit
type: string
+ observedGeneration:
+ description: ObservedGeneration is the most recent generation
observed
+ for this IntegrationKit.
+ format: int64
+ type: integer
phase:
description: phase of the kit
type: string
diff --git a/config/crd/bases/camel.apache.org_integrationplatforms.yaml
b/config/crd/bases/camel.apache.org_integrationplatforms.yaml
index 8da22b4b4..1b82862f5 100644
--- a/config/crd/bases/camel.apache.org_integrationplatforms.yaml
+++ b/config/crd/bases/camel.apache.org_integrationplatforms.yaml
@@ -630,6 +630,11 @@ spec:
type: object
type: array
type: object
+ observedGeneration:
+ description: ObservedGeneration is the most recent generation
observed
+ for this IntegrationPlatform.
+ format: int64
+ type: integer
phase:
description: defines in what phase the IntegrationPlatform is
found
type: string
diff --git a/config/crd/bases/camel.apache.org_integrations.yaml
b/config/crd/bases/camel.apache.org_integrations.yaml
index 09d67be81..8714e2b7b 100644
--- a/config/crd/bases/camel.apache.org_integrations.yaml
+++ b/config/crd/bases/camel.apache.org_integrations.yaml
@@ -5915,6 +5915,11 @@ spec:
was initialized.
format: date-time
type: string
+ observedGeneration:
+ description: ObservedGeneration is the most recent generation
observed
+ for this Integration.
+ format: int64
+ type: integer
phase:
description: the actual phase
type: string
diff --git a/config/crd/bases/camel.apache.org_kameletbindings.yaml
b/config/crd/bases/camel.apache.org_kameletbindings.yaml
index 0604bff56..186bf6e91 100644
--- a/config/crd/bases/camel.apache.org_kameletbindings.yaml
+++ b/config/crd/bases/camel.apache.org_kameletbindings.yaml
@@ -6666,6 +6666,11 @@ spec:
- type
type: object
type: array
+ observedGeneration:
+ description: ObservedGeneration is the most recent generation
observed
+ for this KameletBinding.
+ format: int64
+ type: integer
phase:
description: Phase --
type: string
diff --git a/config/crd/bases/camel.apache.org_kamelets.yaml
b/config/crd/bases/camel.apache.org_kamelets.yaml
index 48176545f..8f10f5f7b 100644
--- a/config/crd/bases/camel.apache.org_kamelets.yaml
+++ b/config/crd/bases/camel.apache.org_kamelets.yaml
@@ -476,6 +476,11 @@ spec:
- type
type: object
type: array
+ observedGeneration:
+ description: ObservedGeneration is the most recent generation
observed
+ for this Kamelet.
+ format: int64
+ type: integer
phase:
description: Phase --
type: string
diff --git a/helm/camel-k/crds/crd-build.yaml b/helm/camel-k/crds/crd-build.yaml
index f13c37914..6ac023fd6 100644
--- a/helm/camel-k/crds/crd-build.yaml
+++ b/helm/camel-k/crds/crd-build.yaml
@@ -785,6 +785,11 @@ spec:
image:
description: the image name built
type: string
+ observedGeneration:
+ description: ObservedGeneration is the most recent generation
observed
+ for this Build.
+ format: int64
+ type: integer
phase:
description: describes the phase
type: string
diff --git a/helm/camel-k/crds/crd-integration-kit.yaml
b/helm/camel-k/crds/crd-integration-kit.yaml
index 94c534481..ca5c8f90f 100644
--- a/helm/camel-k/crds/crd-integration-kit.yaml
+++ b/helm/camel-k/crds/crd-integration-kit.yaml
@@ -236,6 +236,11 @@ spec:
image:
description: actual image name of the kit
type: string
+ observedGeneration:
+ description: ObservedGeneration is the most recent generation
observed
+ for this IntegrationKit.
+ format: int64
+ type: integer
phase:
description: phase of the kit
type: string
diff --git a/helm/camel-k/crds/crd-integration-platform.yaml
b/helm/camel-k/crds/crd-integration-platform.yaml
index 8da22b4b4..1b82862f5 100644
--- a/helm/camel-k/crds/crd-integration-platform.yaml
+++ b/helm/camel-k/crds/crd-integration-platform.yaml
@@ -630,6 +630,11 @@ spec:
type: object
type: array
type: object
+ observedGeneration:
+ description: ObservedGeneration is the most recent generation
observed
+ for this IntegrationPlatform.
+ format: int64
+ type: integer
phase:
description: defines in what phase the IntegrationPlatform is
found
type: string
diff --git a/helm/camel-k/crds/crd-integration.yaml
b/helm/camel-k/crds/crd-integration.yaml
index 09d67be81..8714e2b7b 100644
--- a/helm/camel-k/crds/crd-integration.yaml
+++ b/helm/camel-k/crds/crd-integration.yaml
@@ -5915,6 +5915,11 @@ spec:
was initialized.
format: date-time
type: string
+ observedGeneration:
+ description: ObservedGeneration is the most recent generation
observed
+ for this Integration.
+ format: int64
+ type: integer
phase:
description: the actual phase
type: string
diff --git a/helm/camel-k/crds/crd-kamelet-binding.yaml
b/helm/camel-k/crds/crd-kamelet-binding.yaml
index 0604bff56..186bf6e91 100644
--- a/helm/camel-k/crds/crd-kamelet-binding.yaml
+++ b/helm/camel-k/crds/crd-kamelet-binding.yaml
@@ -6666,6 +6666,11 @@ spec:
- type
type: object
type: array
+ observedGeneration:
+ description: ObservedGeneration is the most recent generation
observed
+ for this KameletBinding.
+ format: int64
+ type: integer
phase:
description: Phase --
type: string
diff --git a/helm/camel-k/crds/crd-kamelet.yaml
b/helm/camel-k/crds/crd-kamelet.yaml
index 48176545f..8f10f5f7b 100644
--- a/helm/camel-k/crds/crd-kamelet.yaml
+++ b/helm/camel-k/crds/crd-kamelet.yaml
@@ -476,6 +476,11 @@ spec:
- type
type: object
type: array
+ observedGeneration:
+ description: ObservedGeneration is the most recent generation
observed
+ for this Kamelet.
+ format: int64
+ type: integer
phase:
description: Phase --
type: string
diff --git a/pkg/apis/camel/v1/build_types.go b/pkg/apis/camel/v1/build_types.go
index f045fa644..880fef782 100644
--- a/pkg/apis/camel/v1/build_types.go
+++ b/pkg/apis/camel/v1/build_types.go
@@ -146,6 +146,8 @@ type S2iTask struct {
// BuildStatus defines the observed state of Build
type BuildStatus struct {
+ // ObservedGeneration is the most recent generation observed for this
Build.
+ ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// describes the phase
Phase BuildPhase `json:"phase,omitempty"`
// the image name built
diff --git a/pkg/apis/camel/v1/integration_types.go
b/pkg/apis/camel/v1/integration_types.go
index 2caa83d52..210ada47b 100644
--- a/pkg/apis/camel/v1/integration_types.go
+++ b/pkg/apis/camel/v1/integration_types.go
@@ -85,6 +85,8 @@ type IntegrationSpec struct {
// IntegrationStatus defines the observed state of Integration
type IntegrationStatus struct {
+ // ObservedGeneration is the most recent generation observed for this
Integration.
+ ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// the actual phase
Phase IntegrationPhase `json:"phase,omitempty"`
// the digest calculated for this Integration
diff --git a/pkg/apis/camel/v1/integrationkit_types.go
b/pkg/apis/camel/v1/integrationkit_types.go
index 0d1dca4ff..0c8a9f5e9 100644
--- a/pkg/apis/camel/v1/integrationkit_types.go
+++ b/pkg/apis/camel/v1/integrationkit_types.go
@@ -67,6 +67,8 @@ type IntegrationKitSpec struct {
// IntegrationKitStatus defines the observed state of IntegrationKit
type IntegrationKitStatus struct {
+ // ObservedGeneration is the most recent generation observed for this
IntegrationKit.
+ ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// phase of the kit
Phase IntegrationKitPhase `json:"phase,omitempty"`
// base image used by the kit
diff --git a/pkg/apis/camel/v1/integrationplatform_types.go
b/pkg/apis/camel/v1/integrationplatform_types.go
index c78af0388..8a71a21dd 100644
--- a/pkg/apis/camel/v1/integrationplatform_types.go
+++ b/pkg/apis/camel/v1/integrationplatform_types.go
@@ -52,7 +52,8 @@ type IntegrationPlatformResourcesSpec struct {
// IntegrationPlatformStatus defines the observed state of IntegrationPlatform
type IntegrationPlatformStatus struct {
IntegrationPlatformSpec `json:",inline"`
-
+ // ObservedGeneration is the most recent generation observed for this
IntegrationPlatform.
+ ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// defines in what phase the IntegrationPlatform is found
Phase IntegrationPlatformPhase `json:"phase,omitempty"`
// which are the conditions met (particularly useful when in ERROR
phase)
diff --git a/pkg/apis/camel/v1alpha1/kamelet_binding_types.go
b/pkg/apis/camel/v1alpha1/kamelet_binding_types.go
index 746779148..eafd475de 100644
--- a/pkg/apis/camel/v1alpha1/kamelet_binding_types.go
+++ b/pkg/apis/camel/v1alpha1/kamelet_binding_types.go
@@ -94,6 +94,8 @@ type EndpointProperties struct {
// KameletBindingStatus specify the status of a binding
type KameletBindingStatus struct {
+ // ObservedGeneration is the most recent generation observed for this
KameletBinding.
+ ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Phase --
Phase KameletBindingPhase `json:"phase,omitempty"`
// Conditions --
diff --git a/pkg/apis/camel/v1alpha1/kamelet_types.go
b/pkg/apis/camel/v1alpha1/kamelet_types.go
index bca83e883..32c96a743 100644
--- a/pkg/apis/camel/v1alpha1/kamelet_types.go
+++ b/pkg/apis/camel/v1alpha1/kamelet_types.go
@@ -120,6 +120,8 @@ type AuthorizationSpec struct {
// KameletStatus defines the observed state of Kamelet
type KameletStatus struct {
+ // ObservedGeneration is the most recent generation observed for this
Kamelet.
+ ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Phase --
Phase KameletPhase `json:"phase,omitempty"`
// Conditions --
diff --git a/pkg/controller/build/build_controller.go
b/pkg/controller/build/build_controller.go
index 0bb9d1234..51269b2c8 100644
--- a/pkg/controller/build/build_controller.go
+++ b/pkg/controller/build/build_controller.go
@@ -219,6 +219,7 @@ func (r *reconcileBuild) Reconcile(ctx context.Context,
request reconcile.Reques
}
func (r *reconcileBuild) update(ctx context.Context, base *v1.Build, target
*v1.Build) (reconcile.Result, error) {
+ target.Status.ObservedGeneration = base.Generation
err := r.client.Status().Patch(ctx, target, ctrl.MergeFrom(base))
return reconcile.Result{}, err
diff --git a/pkg/controller/integration/integration_controller.go
b/pkg/controller/integration/integration_controller.go
index ae6d4c515..a4d2b7392 100644
--- a/pkg/controller/integration/integration_controller.go
+++ b/pkg/controller/integration/integration_controller.go
@@ -345,6 +345,7 @@ func (r *reconcileIntegration) update(ctx context.Context,
base *v1.Integration,
}
target.Status.Digest = d
+ target.Status.ObservedGeneration = base.Generation
err = r.client.Status().Patch(ctx, target, ctrl.MergeFrom(base))
diff --git a/pkg/controller/integrationkit/integrationkit_controller.go
b/pkg/controller/integrationkit/integrationkit_controller.go
index 35176cfec..bc4225cf1 100644
--- a/pkg/controller/integrationkit/integrationkit_controller.go
+++ b/pkg/controller/integrationkit/integrationkit_controller.go
@@ -309,6 +309,8 @@ func (r *reconcileIntegrationKit) update(ctx
context.Context, base *v1.Integrati
target.Status.Digest = dgst
+ target.Status.ObservedGeneration = base.Generation
+
err = r.client.Status().Patch(ctx, target, ctrl.MergeFrom(base))
return reconcile.Result{}, err
diff --git
a/pkg/controller/integrationplatform/integrationplatform_controller.go
b/pkg/controller/integrationplatform/integrationplatform_controller.go
index fbf3b6621..9768be424 100644
--- a/pkg/controller/integrationplatform/integrationplatform_controller.go
+++ b/pkg/controller/integrationplatform/integrationplatform_controller.go
@@ -189,6 +189,8 @@ func (r *reconcileIntegrationPlatform) Reconcile(ctx
context.Context, request re
}
if target != nil {
+ target.Status.ObservedGeneration =
instance.Generation
+
if err := r.client.Status().Patch(ctx, target,
ctrl.MergeFrom(&instance)); err != nil {
camelevent.NotifyIntegrationPlatformError(ctx, r.client, r.recorder, &instance,
target, err)
return reconcile.Result{}, err
diff --git a/pkg/controller/kamelet/kamelet_controller.go
b/pkg/controller/kamelet/kamelet_controller.go
index db11e053c..19a1375c0 100644
--- a/pkg/controller/kamelet/kamelet_controller.go
+++ b/pkg/controller/kamelet/kamelet_controller.go
@@ -178,6 +178,8 @@ func (r *reconcileKamelet) Reconcile(ctx context.Context,
request reconcile.Requ
}
if target != nil {
+ target.Status.ObservedGeneration =
instance.GetGeneration()
+
if err := r.client.Status().Patch(ctx, target,
ctrl.MergeFrom(&instance)); err != nil {
camelevent.NotifyKameletError(ctx, r.client,
r.recorder, &instance, target, err)
return reconcile.Result{}, err
diff --git a/pkg/controller/kameletbinding/kamelet_binding_controller.go
b/pkg/controller/kameletbinding/kamelet_binding_controller.go
index c422286cf..2ace3da23 100644
--- a/pkg/controller/kameletbinding/kamelet_binding_controller.go
+++ b/pkg/controller/kameletbinding/kamelet_binding_controller.go
@@ -192,6 +192,8 @@ func (r *ReconcileKameletBinding) Reconcile(ctx
context.Context, request reconci
}
if target != nil {
+ target.Status.ObservedGeneration =
instance.Generation
+
if err := r.client.Status().Patch(ctx, target,
ctrl.MergeFrom(&instance)); err != nil {
camelevent.NotifyKameletBindingError(ctx, r.client, r.recorder, &instance,
target, err)
return reconcile.Result{}, err