Skip to content

Commit

Permalink
chore(api): leave .status.phase=Ready as default
Browse files Browse the repository at this point in the history
As it could be used by any external tool.
  • Loading branch information
squakez committed Oct 18, 2023
1 parent 92b4276 commit 987ad67
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 31 deletions.
5 changes: 4 additions & 1 deletion config/crd/bases/camel.apache.org_kamelets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,10 @@ spec:
type: object
type: object
status:
description: the actual status of the resource
default:
phase: Ready
description: the actual status of the resource Deprecated no longer in
use
properties:
conditions:
description: Conditions --
Expand Down
2 changes: 2 additions & 0 deletions docs/modules/ROOT/partials/apis/camel-k-crds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ the desired specification
the actual status of the resource
Deprecated no longer in use
|===
Expand Down Expand Up @@ -3748,6 +3749,7 @@ Camel dependencies needed by the Kamelet
* <<#_camel_apache_org_v1_Kamelet, Kamelet>>
KameletStatus defines the observed state of Kamelet.
Required since we deprecated the parameter. Any external user can still expect a Ready status here.
[cols="2,2a",options="header"]
|===
Expand Down
3 changes: 1 addition & 2 deletions e2e/yaks/common/kamelet-beans/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ pre:
- name: installation
run: |
kubectl apply -f beans-source.kamelet.yaml -n $YAKS_NAMESPACE
kubectl wait kamelet beans-source --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
post:
- name: print dump
if: env:CI=true && failure()
Expand Down
3 changes: 1 addition & 2 deletions e2e/yaks/common/kamelet-binding-autoload/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ pre:
kubectl apply -f secret-specific.yaml -n $YAKS_NAMESPACE
kubectl apply -f timer-source.kamelet.yaml -n $YAKS_NAMESPACE
kubectl wait kamelet timer-source --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
post:
- name: print dump
if: env:CI=true && failure()
Expand Down
3 changes: 0 additions & 3 deletions e2e/yaks/common/kamelet-binding-broker/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ pre:
kubectl apply -f timer-source.kamelet.yaml -n $YAKS_NAMESPACE
kubectl apply -f logger-sink.kamelet.yaml -n $YAKS_NAMESPACE
kubectl wait kamelet timer-source --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kubectl wait kamelet logger-sink --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kubectl apply -f timer-source-binding.yaml -n $YAKS_NAMESPACE
kubectl apply -f logger-sink-binding.yaml -n $YAKS_NAMESPACE
kubectl wait kameletbinding timer-source-binding --for=condition=Ready --timeout=15m -n $YAKS_NAMESPACE
Expand Down
2 changes: 0 additions & 2 deletions e2e/yaks/common/kamelet-binding-http/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ pre:
run: |
kubectl apply -f timer-source.kamelet.yaml -n $YAKS_NAMESPACE
kubectl wait kamelet timer-source --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kamel run display.groovy -w -n $YAKS_NAMESPACE
cat timer-source-binding-display.yaml | sed 's/{namespace}/'"${YAKS_NAMESPACE}"'/' | kubectl apply -n $YAKS_NAMESPACE -f -
kubectl wait kameletbinding timer-source-binding-display --for=condition=Ready --timeout=15m -n $YAKS_NAMESPACE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ pre:
- name: installation
run: |
kubectl apply -f timer-source.kamelet.yaml -n $YAKS_NAMESPACE
kubectl wait kamelet timer-source --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kubectl apply -f properties-binding.yaml -n $YAKS_NAMESPACE
post:
Expand Down
4 changes: 0 additions & 4 deletions e2e/yaks/common/kamelet-binding/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ pre:
kubectl apply -f timer-source.kamelet.yaml -n $YAKS_NAMESPACE
kubectl apply -f logger-sink.kamelet.yaml -n $YAKS_NAMESPACE
kubectl wait kamelet timer-source --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kubectl wait kamelet logger-sink --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kubectl apply -f timer-source-binding.yaml -n $YAKS_NAMESPACE
kubectl apply -f logger-sink-binding.yaml -n $YAKS_NAMESPACE
kubectl wait kameletbinding timer-source-binding --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kubectl wait kameletbinding logger-sink-binding --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
post:
Expand Down
4 changes: 0 additions & 4 deletions e2e/yaks/common/kamelet-data-types/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ pre:
kubectl apply -f event-source.kamelet.yaml -n $YAKS_NAMESPACE
kubectl apply -f event-sink.kamelet.yaml -n $YAKS_NAMESPACE
kubectl apply -f data-type-action.kamelet.yaml -n $YAKS_NAMESPACE
kubectl wait kamelet event-source --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kubectl wait kamelet event-sink --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kubectl wait kamelet data-type-action --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
post:
- name: print dump
if: env:CI=true && failure()
Expand Down
5 changes: 0 additions & 5 deletions e2e/yaks/common/kamelet-steps/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@ pre:
run: |
kubectl apply -f timer-source.kamelet.yaml -n $YAKS_NAMESPACE
kubectl apply -f prefix-action.kamelet.yaml -n $YAKS_NAMESPACE
kubectl wait kamelet timer-source --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kubectl wait kamelet prefix-action --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kubectl apply -f steps-binding.yaml -n $YAKS_NAMESPACE
kubectl wait kameletbinding steps-binding --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
post:
- name: print dump
Expand Down
4 changes: 0 additions & 4 deletions e2e/yaks/common/kamelet/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ pre:
run: |
kubectl apply -f timer-source.kamelet.yaml -n $YAKS_NAMESPACE
kubectl apply -f echo-sink.kamelet.yaml -n $YAKS_NAMESPACE
kubectl wait kamelet timer-source --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kubectl wait kamelet echo-sink --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
kamel run source-sink.groovy -w -n $YAKS_NAMESPACE
post:
- name: print dump
Expand Down
5 changes: 4 additions & 1 deletion helm/camel-k/crds/crd-kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,10 @@ spec:
type: object
type: object
status:
description: the actual status of the resource
default:
phase: Ready
description: the actual status of the resource Deprecated no longer in
use
properties:
conditions:
description: Conditions --
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/camel/v1/kamelet_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var (
// +kubebuilder:storageversion
// +kubebuilder:resource:path=kamelets,scope=Namespaced,shortName=kl,categories=kamel;camel
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The Kamelet phase"
// +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.status.phase`,description="The Kamelet phase"

// Kamelet is the Schema for the kamelets API.
type Kamelet struct {
Expand All @@ -64,6 +64,7 @@ type Kamelet struct {
// the desired specification
Spec KameletSpec `json:"spec,omitempty"`
// the actual status of the resource
// +kubebuilder:default:={phase:"Ready"}
// Deprecated no longer in use
Status KameletStatus `json:"status,omitempty"`
}
Expand Down

0 comments on commit 987ad67

Please sign in to comment.