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

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

commit 02288f6a4b778b47dd7872d3f45fe560260611bd
Author: Antonin Stefanutti <[email protected]>
AuthorDate: Tue Oct 22 15:33:14 2019 +0200

    feat(quarkus): Introduce Runtime Provider API
---
 assets/json-schema/CamelCatalog.json               | 26 +++++++++
 assets/json-schema/Integration.json                | 26 +++++++++
 assets/json-schema/IntegrationKit.json             | 26 +++++++++
 pkg/apis/camel/v1alpha1/build_types.go             | 21 ++++----
 pkg/apis/camel/v1alpha1/camelcatalog_types.go      |  7 +--
 pkg/apis/camel/v1alpha1/common_types.go            | 11 ++++
 pkg/apis/camel/v1alpha1/integration_types.go       |  1 +
 pkg/apis/camel/v1alpha1/integrationkit_types.go    | 23 ++++----
 .../camel/v1alpha1/integrationplatform_types.go    |  1 +
 pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go   | 62 ++++++++++++++++++++++
 10 files changed, 180 insertions(+), 24 deletions(-)

diff --git a/assets/json-schema/CamelCatalog.json 
b/assets/json-schema/CamelCatalog.json
index a1a71a8..56b0b5a 100644
--- a/assets/json-schema/CamelCatalog.json
+++ b/assets/json-schema/CamelCatalog.json
@@ -179,6 +179,10 @@
           },
           "type": "object"
         },
+        "runtimeProvider": {
+          "$schema": "http://json-schema.org/draft-04/schema#";,
+          "$ref": "#/definitions/RuntimeProvider"
+        },
         "runtimeVersion": {
           "type": "string"
         },
@@ -314,6 +318,28 @@
       "additionalProperties": false,
       "type": "object"
     },
+    "QuarkusRuntimeProvider": {
+      "properties": {
+        "camelQuarkusVersion": {
+          "type": "string"
+        },
+        "quarkusVersion": {
+          "type": "string"
+        }
+      },
+      "additionalProperties": false,
+      "type": "object"
+    },
+    "RuntimeProvider": {
+      "properties": {
+        "quarkus": {
+          "$schema": "http://json-schema.org/draft-04/schema#";,
+          "$ref": "#/definitions/QuarkusRuntimeProvider"
+        }
+      },
+      "additionalProperties": false,
+      "type": "object"
+    },
     "Status": {
       "properties": {
         "apiVersion": {
diff --git a/assets/json-schema/Integration.json 
b/assets/json-schema/Integration.json
index fcdd30b..0df80fe 100644
--- a/assets/json-schema/Integration.json
+++ b/assets/json-schema/Integration.json
@@ -342,6 +342,10 @@
         "replicas": {
           "type": "integer"
         },
+        "runtimeProvider": {
+          "$schema": "http://json-schema.org/draft-04/schema#";,
+          "$ref": "#/definitions/RuntimeProvider"
+        },
         "runtimeVersion": {
           "type": "string"
         },
@@ -404,6 +408,18 @@
       "additionalProperties": false,
       "type": "object"
     },
+    "QuarkusRuntimeProvider": {
+      "properties": {
+        "camelQuarkusVersion": {
+          "type": "string"
+        },
+        "quarkusVersion": {
+          "type": "string"
+        }
+      },
+      "additionalProperties": false,
+      "type": "object"
+    },
     "ResourceSpec": {
       "properties": {
         "compression": {
@@ -431,6 +447,16 @@
       "additionalProperties": false,
       "type": "object"
     },
+    "RuntimeProvider": {
+      "properties": {
+        "quarkus": {
+          "$schema": "http://json-schema.org/draft-04/schema#";,
+          "$ref": "#/definitions/QuarkusRuntimeProvider"
+        }
+      },
+      "additionalProperties": false,
+      "type": "object"
+    },
     "SourceSpec": {
       "properties": {
         "compression": {
diff --git a/assets/json-schema/IntegrationKit.json 
b/assets/json-schema/IntegrationKit.json
index d1a9ca9..576b537 100644
--- a/assets/json-schema/IntegrationKit.json
+++ b/assets/json-schema/IntegrationKit.json
@@ -326,6 +326,10 @@
         "platform": {
           "type": "string"
         },
+        "runtimeProvider": {
+          "$schema": "http://json-schema.org/draft-04/schema#";,
+          "$ref": "#/definitions/RuntimeProvider"
+        },
         "runtimeVersion": {
           "type": "string"
         },
@@ -388,6 +392,28 @@
       "additionalProperties": false,
       "type": "object"
     },
+    "QuarkusRuntimeProvider": {
+      "properties": {
+        "camelQuarkusVersion": {
+          "type": "string"
+        },
+        "quarkusVersion": {
+          "type": "string"
+        }
+      },
+      "additionalProperties": false,
+      "type": "object"
+    },
+    "RuntimeProvider": {
+      "properties": {
+        "quarkus": {
+          "$schema": "http://json-schema.org/draft-04/schema#";,
+          "$ref": "#/definitions/QuarkusRuntimeProvider"
+        }
+      },
+      "additionalProperties": false,
+      "type": "object"
+    },
     "Status": {
       "properties": {
         "apiVersion": {
diff --git a/pkg/apis/camel/v1alpha1/build_types.go 
b/pkg/apis/camel/v1alpha1/build_types.go
index 65d8f06..c429fa7 100644
--- a/pkg/apis/camel/v1alpha1/build_types.go
+++ b/pkg/apis/camel/v1alpha1/build_types.go
@@ -29,16 +29,17 @@ import (
 type BuildSpec struct {
        // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
        // Important: Run "operator-sdk generate k8s" to regenerate code after 
modifying this file
-       Meta           metav1.ObjectMeta       `json:"meta,omitempty"`
-       Image          string                  `json:"image,omitempty"`
-       Steps          []string                `json:"steps,omitempty"`
-       CamelVersion   string                  `json:"camelVersion,omitempty"`
-       RuntimeVersion string                  `json:"runtimeVersion,omitempty"`
-       Platform       IntegrationPlatformSpec `json:"platform,omitempty"`
-       Sources        []SourceSpec            `json:"sources,omitempty"`
-       Resources      []ResourceSpec          `json:"resources,omitempty"`
-       Dependencies   []string                `json:"dependencies,omitempty"`
-       BuildDir       string                  `json:"buildDir,omitempty"`
+       Meta            metav1.ObjectMeta       `json:"meta,omitempty"`
+       Image           string                  `json:"image,omitempty"`
+       Steps           []string                `json:"steps,omitempty"`
+       CamelVersion    string                  `json:"camelVersion,omitempty"`
+       RuntimeVersion  string                  
`json:"runtimeVersion,omitempty"`
+       RuntimeProvider *RuntimeProvider        
`json:"runtimeProvider,omitempty"`
+       Platform        IntegrationPlatformSpec `json:"platform,omitempty"`
+       Sources         []SourceSpec            `json:"sources,omitempty"`
+       Resources       []ResourceSpec          `json:"resources,omitempty"`
+       Dependencies    []string                `json:"dependencies,omitempty"`
+       BuildDir        string                  `json:"buildDir,omitempty"`
 }
 
 // BuildStatus defines the observed state of Build
diff --git a/pkg/apis/camel/v1alpha1/camelcatalog_types.go 
b/pkg/apis/camel/v1alpha1/camelcatalog_types.go
index d778fb5..65a1d65 100644
--- a/pkg/apis/camel/v1alpha1/camelcatalog_types.go
+++ b/pkg/apis/camel/v1alpha1/camelcatalog_types.go
@@ -53,9 +53,10 @@ type CamelArtifact struct {
 
 // CamelCatalogSpec defines the desired state of CamelCatalog
 type CamelCatalogSpec struct {
-       Version        string                   `json:"version" yaml:"version"`
-       RuntimeVersion string                   `json:"runtimeVersion" 
yaml:"runtimeVersion"`
-       Artifacts      map[string]CamelArtifact `json:"artifacts" 
yaml:"artifacts"`
+       Version         string                   `json:"version" yaml:"version"`
+       RuntimeVersion  string                   `json:"runtimeVersion" 
yaml:"runtimeVersion"`
+       RuntimeProvider *RuntimeProvider         
`json:"runtimeProvider,omitempty"`
+       Artifacts       map[string]CamelArtifact `json:"artifacts" 
yaml:"artifacts"`
 }
 
 // CamelCatalogStatus defines the observed state of CamelCatalog
diff --git a/pkg/apis/camel/v1alpha1/common_types.go 
b/pkg/apis/camel/v1alpha1/common_types.go
index cf74f69..abf366f 100644
--- a/pkg/apis/camel/v1alpha1/common_types.go
+++ b/pkg/apis/camel/v1alpha1/common_types.go
@@ -22,6 +22,17 @@ import (
        metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 )
 
+// RuntimeProvider --
+type RuntimeProvider struct {
+       Quarkus *QuarkusRuntimeProvider `json:"quarkus,omitempty"`
+}
+
+// QuarkusRuntimeProvider --
+type QuarkusRuntimeProvider struct {
+       CamelQuarkusVersion string `json:"camelQuarkusVersion,omitempty"`
+       QuarkusVersion      string `json:"quarkusVersion,omitempty"`
+}
+
 // ConfigurationSpec --
 type ConfigurationSpec struct {
        Type  string `json:"type"`
diff --git a/pkg/apis/camel/v1alpha1/integration_types.go 
b/pkg/apis/camel/v1alpha1/integration_types.go
index 3f3d775..829496e 100644
--- a/pkg/apis/camel/v1alpha1/integration_types.go
+++ b/pkg/apis/camel/v1alpha1/integration_types.go
@@ -50,6 +50,7 @@ type IntegrationStatus struct {
        Failure          *Failure               `json:"failure,omitempty"`
        CamelVersion     string                 `json:"camelVersion,omitempty"`
        RuntimeVersion   string                 
`json:"runtimeVersion,omitempty"`
+       RuntimeProvider  *RuntimeProvider       
`json:"runtimeProvider,omitempty"`
        Configuration    []ConfigurationSpec    `json:"configuration,omitempty"`
        Conditions       []IntegrationCondition `json:"conditions,omitempty"`
        Version          string                 `json:"version,omitempty"`
diff --git a/pkg/apis/camel/v1alpha1/integrationkit_types.go 
b/pkg/apis/camel/v1alpha1/integrationkit_types.go
index 6c56580..43b8173 100644
--- a/pkg/apis/camel/v1alpha1/integrationkit_types.go
+++ b/pkg/apis/camel/v1alpha1/integrationkit_types.go
@@ -35,17 +35,18 @@ type IntegrationKitSpec struct {
 
 // IntegrationKitStatus defines the observed state of IntegrationKit
 type IntegrationKitStatus struct {
-       Phase          IntegrationKitPhase       `json:"phase,omitempty"`
-       BaseImage      string                    `json:"baseImage,omitempty"`
-       Image          string                    `json:"image,omitempty"`
-       Digest         string                    `json:"digest,omitempty"`
-       Artifacts      []Artifact                `json:"artifacts,omitempty"`
-       Failure        *Failure                  `json:"failure,omitempty"`
-       CamelVersion   string                    `json:"camelVersion,omitempty"`
-       RuntimeVersion string                    
`json:"runtimeVersion,omitempty"`
-       Platform       string                    `json:"platform,omitempty"`
-       Conditions     []IntegrationKitCondition `json:"conditions,omitempty"`
-       Version        string                    `json:"version,omitempty"`
+       Phase           IntegrationKitPhase       `json:"phase,omitempty"`
+       BaseImage       string                    `json:"baseImage,omitempty"`
+       Image           string                    `json:"image,omitempty"`
+       Digest          string                    `json:"digest,omitempty"`
+       Artifacts       []Artifact                `json:"artifacts,omitempty"`
+       Failure         *Failure                  `json:"failure,omitempty"`
+       CamelVersion    string                    
`json:"camelVersion,omitempty"`
+       RuntimeVersion  string                    
`json:"runtimeVersion,omitempty"`
+       RuntimeProvider *RuntimeProvider          
`json:"runtimeProvider,omitempty"`
+       Platform        string                    `json:"platform,omitempty"`
+       Conditions      []IntegrationKitCondition `json:"conditions,omitempty"`
+       Version         string                    `json:"version,omitempty"`
 }
 
 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
diff --git a/pkg/apis/camel/v1alpha1/integrationplatform_types.go 
b/pkg/apis/camel/v1alpha1/integrationplatform_types.go
index 3c6d5c9..b41aeba 100644
--- a/pkg/apis/camel/v1alpha1/integrationplatform_types.go
+++ b/pkg/apis/camel/v1alpha1/integrationplatform_types.go
@@ -97,6 +97,7 @@ type IntegrationPlatformBuildSpec struct {
        PublishStrategy       IntegrationPlatformBuildPublishStrategy 
`json:"publishStrategy,omitempty"`
        CamelVersion          string                                  
`json:"camelVersion,omitempty"`
        RuntimeVersion        string                                  
`json:"runtimeVersion,omitempty"`
+       RuntimeProvider       *RuntimeProvider                        
`json:"runtimeProvider,omitempty"`
        BaseImage             string                                  
`json:"baseImage,omitempty"`
        Properties            map[string]string                       
`json:"properties,omitempty"`
        LocalRepository       string                                  
`json:"localRepository,omitempty"`
diff --git a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go 
b/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
index e290310..fff2f0a 100644
--- a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
@@ -113,6 +113,11 @@ func (in *BuildSpec) DeepCopyInto(out *BuildSpec) {
                *out = make([]string, len(*in))
                copy(*out, *in)
        }
+       if in.RuntimeProvider != nil {
+               in, out := &in.RuntimeProvider, &out.RuntimeProvider
+               *out = new(RuntimeProvider)
+               (*in).DeepCopyInto(*out)
+       }
        in.Platform.DeepCopyInto(&out.Platform)
        if in.Sources != nil {
                in, out := &in.Sources, &out.Sources
@@ -316,6 +321,11 @@ func (in *CamelCatalogList) DeepCopyObject() 
runtime.Object {
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
 func (in *CamelCatalogSpec) DeepCopyInto(out *CamelCatalogSpec) {
        *out = *in
+       if in.RuntimeProvider != nil {
+               in, out := &in.RuntimeProvider, &out.RuntimeProvider
+               *out = new(RuntimeProvider)
+               (*in).DeepCopyInto(*out)
+       }
        if in.Artifacts != nil {
                in, out := &in.Artifacts, &out.Artifacts
                *out = make(map[string]CamelArtifact, len(*in))
@@ -611,6 +621,11 @@ func (in *IntegrationKitStatus) DeepCopyInto(out 
*IntegrationKitStatus) {
                *out = new(Failure)
                (*in).DeepCopyInto(*out)
        }
+       if in.RuntimeProvider != nil {
+               in, out := &in.RuntimeProvider, &out.RuntimeProvider
+               *out = new(RuntimeProvider)
+               (*in).DeepCopyInto(*out)
+       }
        if in.Conditions != nil {
                in, out := &in.Conditions, &out.Conditions
                *out = make([]IntegrationKitCondition, len(*in))
@@ -695,6 +710,11 @@ func (in *IntegrationPlatform) DeepCopyObject() 
runtime.Object {
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
 func (in *IntegrationPlatformBuildSpec) DeepCopyInto(out 
*IntegrationPlatformBuildSpec) {
        *out = *in
+       if in.RuntimeProvider != nil {
+               in, out := &in.RuntimeProvider, &out.RuntimeProvider
+               *out = new(RuntimeProvider)
+               (*in).DeepCopyInto(*out)
+       }
        if in.Properties != nil {
                in, out := &in.Properties, &out.Properties
                *out = make(map[string]string, len(*in))
@@ -935,6 +955,11 @@ func (in *IntegrationStatus) DeepCopyInto(out 
*IntegrationStatus) {
                *out = new(Failure)
                (*in).DeepCopyInto(*out)
        }
+       if in.RuntimeProvider != nil {
+               in, out := &in.RuntimeProvider, &out.RuntimeProvider
+               *out = new(RuntimeProvider)
+               (*in).DeepCopyInto(*out)
+       }
        if in.Configuration != nil {
                in, out := &in.Configuration, &out.Configuration
                *out = make([]ConfigurationSpec, len(*in))
@@ -984,6 +1009,22 @@ func (in *MavenSpec) DeepCopy() *MavenSpec {
 }
 
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
+func (in *QuarkusRuntimeProvider) DeepCopyInto(out *QuarkusRuntimeProvider) {
+       *out = *in
+       return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new QuarkusRuntimeProvider.
+func (in *QuarkusRuntimeProvider) DeepCopy() *QuarkusRuntimeProvider {
+       if in == nil {
+               return nil
+       }
+       out := new(QuarkusRuntimeProvider)
+       in.DeepCopyInto(out)
+       return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
 func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec) {
        *out = *in
        out.DataSpec = in.DataSpec
@@ -1001,6 +1042,27 @@ func (in *ResourceSpec) DeepCopy() *ResourceSpec {
 }
 
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
+func (in *RuntimeProvider) DeepCopyInto(out *RuntimeProvider) {
+       *out = *in
+       if in.Quarkus != nil {
+               in, out := &in.Quarkus, &out.Quarkus
+               *out = new(QuarkusRuntimeProvider)
+               **out = **in
+       }
+       return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new RuntimeProvider.
+func (in *RuntimeProvider) DeepCopy() *RuntimeProvider {
+       if in == nil {
+               return nil
+       }
+       out := new(RuntimeProvider)
+       in.DeepCopyInto(out)
+       return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
 func (in *SourceSpec) DeepCopyInto(out *SourceSpec) {
        *out = *in
        out.DataSpec = in.DataSpec

Reply via email to