You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/07/15 16:26:31 UTC
[GitHub] [camel-k] ipolyzos opened a new pull request #1615: #1556 - Add the camel category to Camel K CRDs
ipolyzos opened a new pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615
Added 'kamel' & 'camel' categories to Camel-K CRDs _(i.e Build, CamelCatalog, Integration, IntegrationKit)_
Please see below example usage:
```
$ kamel install
Camel K installed in namespace myproject
$ kubectl get kamel
NAME PHASE
integrationplatform.camel.apache.org/camel-k
$ kubectl get camel
NAME PHASE
integrationplatform.camel.apache.org/camel-k
$ kamel run examples/simple.groovy
integration "simple" created
$ kubectl get kamel
NAME PHASE
integrationplatform.camel.apache.org/camel-k
NAME PHASE KIT REPLICAS
integration.camel.apache.org/simple
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] ipolyzos commented on a change in pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
ipolyzos commented on a change in pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#discussion_r455821020
##########
File path: pkg/apis/camel/v1/integration_types.go
##########
@@ -70,6 +70,7 @@ type IntegrationStatus struct {
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration phase"
// +kubebuilder:printcolumn:name="Kit",type=string,JSONPath=`.status.kit`,description="The integration kit"
// +kubebuilder:printcolumn:name="Replicas",type=integer,JSONPath=`.status.replicas`,description="The number of pods"
+// +kubebuilder:resource:path=integrations,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
done, thanks :)
##########
File path: pkg/apis/camel/v1/camelcatalog_types.go
##########
@@ -75,6 +75,7 @@ type CamelCatalogStatus struct {
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Runtime Version",type=string,JSONPath=`.spec.runtime.version`,description="The Camel K Runtime version"
// +kubebuilder:printcolumn:name="Runtime Provider",type=string,JSONPath=`.spec.runtime.provider`,description="The Camel K Runtime provider"
+// +kubebuilder:resource:path=integrations,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
done, thanks :)
##########
File path: pkg/apis/camel/v1/build_types.go
##########
@@ -147,6 +147,7 @@ const (
// Change format to 'duration' when CRD uses OpenAPI spec v3 (https://github.com/OAI/OpenAPI-Specification/issues/845)
// +kubebuilder:printcolumn:name="Duration",type=string,JSONPath=`.status.duration`,description="The build last execution duration"
// +kubebuilder:printcolumn:name="Attempts",type=integer,JSONPath=`.status.failure.recovery.attempt`,description="The number of execution attempts"
+// +kubebuilder:resource:path=builds,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
done, thanks :)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] astefanutti commented on a change in pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
astefanutti commented on a change in pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#discussion_r455824157
##########
File path: pkg/apis/camel/v1/camelcatalog_types.go
##########
@@ -75,6 +75,7 @@ type CamelCatalogStatus struct {
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Runtime Version",type=string,JSONPath=`.spec.runtime.version`,description="The Camel K Runtime version"
// +kubebuilder:printcolumn:name="Runtime Provider",type=string,JSONPath=`.spec.runtime.provider`,description="The Camel K Runtime provider"
+// +kubebuilder:resource:path=integrations,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
I still see the duplicated marker.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] ipolyzos commented on a change in pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
ipolyzos commented on a change in pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#discussion_r455820908
##########
File path: pkg/apis/camel/v1/integrationkit_types.go
##########
@@ -57,6 +57,7 @@ type IntegrationKitStatus struct {
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration kit phase"
// +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.metadata.labels.camel\.apache\.org\/kit\.type`,description="The integration kit type"
// +kubebuilder:printcolumn:name="Image",type=string,JSONPath=`.status.image`,description="The integration kit image"
+// +kubebuilder:resource:path=integrationkits,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
done, thanks
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] ipolyzos commented on pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
ipolyzos commented on pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#issuecomment-659432739
> ```
> // +kubebuilder:resource:path=integrations,scope=Namespaced,shortName=it,categories=kamel;camel
> ```
Thank you for the advice, I have applied the change and the tests seems to work fine.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] astefanutti commented on a change in pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
astefanutti commented on a change in pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#discussion_r455830223
##########
File path: pkg/apis/camel/v1/build_types.go
##########
@@ -147,6 +147,7 @@ const (
// Change format to 'duration' when CRD uses OpenAPI spec v3 (https://github.com/OAI/OpenAPI-Specification/issues/845)
// +kubebuilder:printcolumn:name="Duration",type=string,JSONPath=`.status.duration`,description="The build last execution duration"
// +kubebuilder:printcolumn:name="Attempts",type=integer,JSONPath=`.status.failure.recovery.attempt`,description="The number of execution attempts"
+// +kubebuilder:resource:path=builds,scope=Namespaced,shortName=ikb,categories=kamel;camel
Review comment:
Sorry I may not have be enough specific. The `kubebuilder:resource` marker already exists few lines above (142). Only the `categories` should be appended to the existing marker, instead of duplicating it.
##########
File path: pkg/apis/camel/v1/camelcatalog_types.go
##########
@@ -75,6 +75,7 @@ type CamelCatalogStatus struct {
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Runtime Version",type=string,JSONPath=`.spec.runtime.version`,description="The Camel K Runtime version"
// +kubebuilder:printcolumn:name="Runtime Provider",type=string,JSONPath=`.spec.runtime.provider`,description="The Camel K Runtime provider"
+// +kubebuilder:resource:path=camelcatalogs,scope=Namespaced,shortName=cc,categories=kamel;camel
Review comment:
Sorry I may not have be enough specific. The `kubebuilder:resource` marker already exists few lines above (74). Only the `categories` should be appended to the existing marker, instead of duplicating it.
##########
File path: pkg/apis/camel/v1/integrationkit_types.go
##########
@@ -57,6 +57,7 @@ type IntegrationKitStatus struct {
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration kit phase"
// +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.metadata.labels.camel\.apache\.org\/kit\.type`,description="The integration kit type"
// +kubebuilder:printcolumn:name="Image",type=string,JSONPath=`.status.image`,description="The integration kit image"
+// +kubebuilder:resource:path=integrationkits,scope=Namespaced,shortName=ik,categories=kamel;camel
Review comment:
Sorry I may not have be enough specific. The `kubebuilder:resource` marker already exists few lines above (55). Only the `categories` should be appended to the existing marker, instead of duplicating it.
##########
File path: pkg/apis/camel/v1/integration_types.go
##########
@@ -70,6 +70,7 @@ type IntegrationStatus struct {
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration phase"
// +kubebuilder:printcolumn:name="Kit",type=string,JSONPath=`.status.kit`,description="The integration kit"
// +kubebuilder:printcolumn:name="Replicas",type=integer,JSONPath=`.status.replicas`,description="The number of pods"
+// +kubebuilder:resource:path=integrations,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
The `kubebuilder:resource` marker already exists few lines above (67). Only the `categories` should be appended to the existing marker, instead of duplicating it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] ipolyzos commented on a change in pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
ipolyzos commented on a change in pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#discussion_r455834809
##########
File path: pkg/apis/camel/v1/build_types.go
##########
@@ -147,6 +147,7 @@ const (
// Change format to 'duration' when CRD uses OpenAPI spec v3 (https://github.com/OAI/OpenAPI-Specification/issues/845)
// +kubebuilder:printcolumn:name="Duration",type=string,JSONPath=`.status.duration`,description="The build last execution duration"
// +kubebuilder:printcolumn:name="Attempts",type=integer,JSONPath=`.status.failure.recovery.attempt`,description="The number of execution attempts"
+// +kubebuilder:resource:path=builds,scope=Namespaced,shortName=ikb,categories=kamel;camel
Review comment:
Ture, I have now removed the duplication, thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] astefanutti merged pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
astefanutti merged pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] ipolyzos commented on a change in pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
ipolyzos commented on a change in pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#discussion_r455836126
##########
File path: pkg/apis/camel/v1/camelcatalog_types.go
##########
@@ -75,6 +75,7 @@ type CamelCatalogStatus struct {
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Runtime Version",type=string,JSONPath=`.spec.runtime.version`,description="The Camel K Runtime version"
// +kubebuilder:printcolumn:name="Runtime Provider",type=string,JSONPath=`.spec.runtime.provider`,description="The Camel K Runtime provider"
+// +kubebuilder:resource:path=camelcatalogs,scope=Namespaced,shortName=cc,categories=kamel;camel
Review comment:
> LGTM
you are more than welcome and thank you for the review
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] ipolyzos commented on a change in pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
ipolyzos commented on a change in pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#discussion_r455836126
##########
File path: pkg/apis/camel/v1/camelcatalog_types.go
##########
@@ -75,6 +75,7 @@ type CamelCatalogStatus struct {
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Runtime Version",type=string,JSONPath=`.spec.runtime.version`,description="The Camel K Runtime version"
// +kubebuilder:printcolumn:name="Runtime Provider",type=string,JSONPath=`.spec.runtime.provider`,description="The Camel K Runtime provider"
+// +kubebuilder:resource:path=camelcatalogs,scope=Namespaced,shortName=cc,categories=kamel;camel
Review comment:
,categories=kamel;camel
> LGTM
you are more than welcome and thank you for the review
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] ipolyzos edited a comment on pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
ipolyzos edited a comment on pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#issuecomment-659432739
> ```
> // +kubebuilder:resource:path=integrations,scope=Namespaced,shortName=it,categories=kamel;camel
> ```
Thank you for the advice, I have applied the change and the tests seems to work fine.
Please see below for the test run:
```
$grep -A2 "categories*[kamel|camel]*" deploy/crds/camel.apache.org_*
deploy/crds/camel.apache.org_builds.yaml: categories:
deploy/crds/camel.apache.org_builds.yaml- - kamel
deploy/crds/camel.apache.org_builds.yaml- - camel
--
deploy/crds/camel.apache.org_camelcatalogs.yaml: categories:
deploy/crds/camel.apache.org_camelcatalogs.yaml- - kamel
deploy/crds/camel.apache.org_camelcatalogs.yaml- - camel
--
deploy/crds/camel.apache.org_integrationkits.yaml: categories:
deploy/crds/camel.apache.org_integrationkits.yaml- - kamel
deploy/crds/camel.apache.org_integrationkits.yaml- - camel
--
deploy/crds/camel.apache.org_integrationplatforms.yaml: categories:
deploy/crds/camel.apache.org_integrationplatforms.yaml- - kamel
deploy/crds/camel.apache.org_integrationplatforms.yaml- - camel
--
deploy/crds/camel.apache.org_integrations.yaml: categories:
deploy/crds/camel.apache.org_integrations.yaml- - kamel
deploy/crds/camel.apache.org_integrations.yaml- - camel
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] astefanutti commented on a change in pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
astefanutti commented on a change in pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#discussion_r455818960
##########
File path: pkg/apis/camel/v1/integration_types.go
##########
@@ -70,6 +70,7 @@ type IntegrationStatus struct {
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration phase"
// +kubebuilder:printcolumn:name="Kit",type=string,JSONPath=`.status.kit`,description="The integration kit"
// +kubebuilder:printcolumn:name="Replicas",type=integer,JSONPath=`.status.replicas`,description="The number of pods"
+// +kubebuilder:resource:path=integrations,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
ditto :)
##########
File path: pkg/apis/camel/v1/build_types.go
##########
@@ -147,6 +147,7 @@ const (
// Change format to 'duration' when CRD uses OpenAPI spec v3 (https://github.com/OAI/OpenAPI-Specification/issues/845)
// +kubebuilder:printcolumn:name="Duration",type=string,JSONPath=`.status.duration`,description="The build last execution duration"
// +kubebuilder:printcolumn:name="Attempts",type=integer,JSONPath=`.status.failure.recovery.attempt`,description="The number of execution attempts"
+// +kubebuilder:resource:path=builds,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
Could you append to the existing `kubebuilder:resource` marker instead of duplicating it?
##########
File path: pkg/apis/camel/v1/camelcatalog_types.go
##########
@@ -75,6 +75,7 @@ type CamelCatalogStatus struct {
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Runtime Version",type=string,JSONPath=`.spec.runtime.version`,description="The Camel K Runtime version"
// +kubebuilder:printcolumn:name="Runtime Provider",type=string,JSONPath=`.spec.runtime.provider`,description="The Camel K Runtime provider"
+// +kubebuilder:resource:path=integrations,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
ditto :)
##########
File path: pkg/apis/camel/v1/integrationkit_types.go
##########
@@ -57,6 +57,7 @@ type IntegrationKitStatus struct {
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration kit phase"
// +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.metadata.labels.camel\.apache\.org\/kit\.type`,description="The integration kit type"
// +kubebuilder:printcolumn:name="Image",type=string,JSONPath=`.status.image`,description="The integration kit image"
+// +kubebuilder:resource:path=integrationkits,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
ditto :) Mind the `shortName` value.
##########
File path: pkg/apis/camel/v1/integrationplatform_types.go
##########
@@ -54,6 +54,7 @@ type IntegrationPlatformStatus struct {
// +kubebuilder:resource:path=integrationplatforms,scope=Namespaced,shortName=ip
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration platform phase"
+// +kubebuilder:resource:path=integrationplatforms,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
ditto :)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] ipolyzos commented on pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
ipolyzos commented on pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#issuecomment-658934686
@astefanutti thanks for the review.
I have appended the code to generate `categories` in the types based on the [docs provided](https://book.kubebuilder.io/reference/markers/crd.html). It would be great if you could take a look, please.
Also, I could confirm that categories are supported by `apiextensions.k8s.io/v1beta1` based on the link provided in #1556.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] astefanutti commented on a change in pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
astefanutti commented on a change in pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#discussion_r455824157
##########
File path: pkg/apis/camel/v1/camelcatalog_types.go
##########
@@ -75,6 +75,7 @@ type CamelCatalogStatus struct {
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Runtime Version",type=string,JSONPath=`.spec.runtime.version`,description="The Camel K Runtime version"
// +kubebuilder:printcolumn:name="Runtime Provider",type=string,JSONPath=`.spec.runtime.provider`,description="The Camel K Runtime provider"
+// +kubebuilder:resource:path=integrations,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
I still see the duplicated marker https://github.com/apache/camel-k/pull/1615/files#diff-d62eed09730298cb224726849c69abf4R74
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] ipolyzos commented on a change in pull request #1615: #1556 - Add the camel category to Camel K CRDs
Posted by GitBox <gi...@apache.org>.
ipolyzos commented on a change in pull request #1615:
URL: https://github.com/apache/camel-k/pull/1615#discussion_r455833609
##########
File path: pkg/apis/camel/v1/camelcatalog_types.go
##########
@@ -75,6 +75,7 @@ type CamelCatalogStatus struct {
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Runtime Version",type=string,JSONPath=`.spec.runtime.version`,description="The Camel K Runtime version"
// +kubebuilder:printcolumn:name="Runtime Provider",type=string,JSONPath=`.spec.runtime.provider`,description="The Camel K Runtime provider"
+// +kubebuilder:resource:path=integrations,scope=Namespaced,shortName=it,categories=kamel;camel
Review comment:
dah, my mistake on the commit, sorry, if you please check now
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org