You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2020/07/01 07:08:11 UTC

[camel-k] 04/24: chore(api): Upgrade Integration CRD to apiextensions.k8s.io/v1

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 14b02d28c81dd60cd5d208982e58ce1fbac7ce98
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Wed Jun 10 11:32:43 2020 +0200

    chore(api): Upgrade Integration CRD to apiextensions.k8s.io/v1
---
 deploy/crd-integration.yaml            | 338 ++++++++++++++++++++++++++++++---
 deploy/resources.go                    |   4 +-
 pkg/apis/camel/v1/integration_types.go |  10 +-
 3 files changed, 318 insertions(+), 34 deletions(-)

diff --git a/deploy/crd-integration.yaml b/deploy/crd-integration.yaml
index 41797cb..24d9815 100644
--- a/deploy/crd-integration.yaml
+++ b/deploy/crd-integration.yaml
@@ -15,7 +15,7 @@
 # limitations under the License.
 # ---------------------------------------------------------------------------
 
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   name: integrations.camel.apache.org
@@ -23,37 +23,315 @@ metadata:
     app: "camel-k"
 spec:
   group: camel.apache.org
-  scope: Namespaced
-  version: v1
-  versions:
-  - name: v1
-    served: true
-    storage: true
-  - name: v1alpha1
-    served: true
-    storage: false
-  subresources:
-    status: {}
-    scale:
-      specReplicasPath: .spec.replicas
-      statusReplicasPath: .status.replicas
   names:
     kind: Integration
     listKind: IntegrationList
     plural: integrations
-    singular: integration
     shortNames:
-    - it
-  additionalPrinterColumns:
-    - name: Phase
-      type: string
-      description: The integration phase
-      JSONPath: .status.phase
-    - name: Kit
-      type: string
-      description: The integration kit
-      JSONPath: .status.kit
-    - name: Replicas
-      type: integer
-      description: The number of pods
-      JSONPath: .status.replicas
+      - it
+    singular: integration
+  scope: Namespaced
+  versions:
+    - additionalPrinterColumns:
+        - description: The integration phase
+          jsonPath: .status.phase
+          name: Phase
+          type: string
+        - description: The integration kit
+          jsonPath: .status.kit
+          name: Kit
+          type: string
+        - description: The number of pods
+          jsonPath: .status.replicas
+          name: Replicas
+          type: integer
+      name: v1
+      schema:
+        openAPIV3Schema:
+          description: Integration is the Schema for the integrations API
+          properties:
+            apiVersion:
+              description: 'APIVersion defines the versioned schema of this representation
+              of an object. Servers should convert recognized schemas to the latest
+              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+              type: string
+            kind:
+              description: 'Kind is a string value representing the REST resource this
+              object represents. Servers may infer this from the endpoint the client
+              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+              type: string
+            metadata:
+              type: object
+            spec:
+              description: IntegrationSpec defines the desired state of Integration
+              properties:
+                configuration:
+                  items:
+                    description: ConfigurationSpec --
+                    properties:
+                      type:
+                        type: string
+                      value:
+                        type: string
+                    required:
+                      - type
+                      - value
+                    type: object
+                  type: array
+                dependencies:
+                  items:
+                    type: string
+                  type: array
+                flows:
+                  items:
+                    $ref: '#/definitions/encoding~1json~0RawMessage'
+                    description: Flow is an unstructured object representing a Camel
+                      Flow in YAML/JSON DSL
+                  type: array
+                kit:
+                  type: string
+                profile:
+                  description: TraitProfile represents lists of traits that are enabled
+                    for the specific installation/integration
+                  type: string
+                replicas:
+                  format: int32
+                  type: integer
+                repositories:
+                  items:
+                    type: string
+                  type: array
+                resources:
+                  items:
+                    description: ResourceSpec --
+                    properties:
+                      compression:
+                        type: boolean
+                      content:
+                        type: string
+                      contentKey:
+                        type: string
+                      contentRef:
+                        type: string
+                      mountPath:
+                        type: string
+                      name:
+                        type: string
+                      type:
+                        description: ResourceType --
+                        type: string
+                    type: object
+                  type: array
+                serviceAccountName:
+                  type: string
+                sources:
+                  items:
+                    description: SourceSpec --
+                    properties:
+                      compression:
+                        type: boolean
+                      content:
+                        type: string
+                      contentKey:
+                        type: string
+                      contentRef:
+                        type: string
+                      interceptors:
+                        description: Interceptors are optional identifiers the org.apache.camel.k.RoutesLoader
+                          uses to pre/post process sources
+                        items:
+                          type: string
+                        type: array
+                      language:
+                        description: Language --
+                        type: string
+                      loader:
+                        description: Loader is an optional id of the org.apache.camel.k.RoutesLoader
+                          that will interpret this source at runtime
+                        type: string
+                      name:
+                        type: string
+                    type: object
+                  type: array
+                traits:
+                  additionalProperties:
+                    description: A TraitSpec contains the configuration of a trait
+                    properties:
+                      configuration:
+                        additionalProperties:
+                          type: string
+                        type: object
+                    type: object
+                  type: object
+              type: object
+            status:
+              description: IntegrationStatus defines the observed state of Integration
+              properties:
+                capabilities:
+                  items:
+                    type: string
+                  type: array
+                conditions:
+                  items:
+                    description: IntegrationCondition describes the state of a resource
+                      at a certain point.
+                    properties:
+                      lastTransitionTime:
+                        description: Last time the condition transitioned from one status
+                          to another.
+                        format: date-time
+                        type: string
+                      lastUpdateTime:
+                        description: The last time this condition was updated.
+                        format: date-time
+                        type: string
+                      message:
+                        description: A human readable message indicating details about
+                          the transition.
+                        type: string
+                      reason:
+                        description: The reason for the condition's last transition.
+                        type: string
+                      status:
+                        description: Status of the condition, one of True, False, Unknown.
+                        type: string
+                      type:
+                        description: Type of integration condition.
+                        type: string
+                    required:
+                      - status
+                      - type
+                    type: object
+                  type: array
+                configuration:
+                  items:
+                    description: ConfigurationSpec --
+                    properties:
+                      type:
+                        type: string
+                      value:
+                        type: string
+                    required:
+                      - type
+                      - value
+                    type: object
+                  type: array
+                dependencies:
+                  items:
+                    type: string
+                  type: array
+                digest:
+                  type: string
+                failure:
+                  description: Failure --
+                  properties:
+                    reason:
+                      type: string
+                    recovery:
+                      description: FailureRecovery --
+                      properties:
+                        attempt:
+                          type: integer
+                        attemptMax:
+                          type: integer
+                        attemptTime:
+                          format: date-time
+                          type: string
+                      required:
+                        - attempt
+                        - attemptMax
+                        - attemptTime
+                      type: object
+                    time:
+                      format: date-time
+                      type: string
+                  required:
+                    - reason
+                    - recovery
+                    - time
+                  type: object
+                generatedResources:
+                  items:
+                    description: ResourceSpec --
+                    properties:
+                      compression:
+                        type: boolean
+                      content:
+                        type: string
+                      contentKey:
+                        type: string
+                      contentRef:
+                        type: string
+                      mountPath:
+                        type: string
+                      name:
+                        type: string
+                      type:
+                        description: ResourceType --
+                        type: string
+                    type: object
+                  type: array
+                generatedSources:
+                  items:
+                    description: SourceSpec --
+                    properties:
+                      compression:
+                        type: boolean
+                      content:
+                        type: string
+                      contentKey:
+                        type: string
+                      contentRef:
+                        type: string
+                      interceptors:
+                        description: Interceptors are optional identifiers the org.apache.camel.k.RoutesLoader
+                          uses to pre/post process sources
+                        items:
+                          type: string
+                        type: array
+                      language:
+                        description: Language --
+                        type: string
+                      loader:
+                        description: Loader is an optional id of the org.apache.camel.k.RoutesLoader
+                          that will interpret this source at runtime
+                        type: string
+                      name:
+                        type: string
+                    type: object
+                  type: array
+                image:
+                  type: string
+                kit:
+                  type: string
+                phase:
+                  description: IntegrationPhase --
+                  type: string
+                platform:
+                  type: string
+                profile:
+                  description: TraitProfile represents lists of traits that are enabled
+                    for the specific installation/integration
+                  type: string
+                replicas:
+                  format: int32
+                  type: integer
+                runtimeProvider:
+                  description: RuntimeProvider --
+                  type: string
+                runtimeVersion:
+                  type: string
+                version:
+                  type: string
+              type: object
+          type: object
+      served: true
+      storage: true
+      subresources:
+        scale:
+          specReplicasPath: .spec.replicas
+          statusReplicasPath: .status.replicas
+        status: {}
+    - name: v1alpha1
+      served: true
+      storage: false
diff --git a/deploy/resources.go b/deploy/resources.go
index 9a18b5f..0b11a09 100644
--- a/deploy/resources.go
+++ b/deploy/resources.go
@@ -140,9 +140,9 @@ var assets = func() http.FileSystem {
 		"/crd-integration.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "crd-integration.yaml",
 			modTime:          time.Time{},
-			uncompressedSize: 1880,
+			uncompressedSize: 12846,
 
-			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x55\xcd\x6e\xe3\x46\x13\xbc\xf3\x29\x0a\xe2\x65\x17\xb0\xe9\xcf\xdf\x29\x60\x4e\x8a\x7f\x10\xc5\x86\x64\x88\xda\x2c\xf6\xd8\x22\x5b\x64\xc3\xc3\x99\xc9\xcc\xd0\xb2\x11\xe4\xdd\x83\x19\x52\x96\xb4\x9b\x45\x80\x60\x75\x63\xff\x55\x55\x57\x93\xca\x71\xf9\xe3\x7e\x59\x8e\x47\xa9\x59\x7b\x6e\x10\x0c\x42\xc7\x98\x5b\xaa\x3b\x46\x65\x76\x61\x4f\x8e\x71\x6f\x06\xdd\x50\x10\xa3\xf1\x61\x5e\xdd\x7f\xc4\xa0\x1b\x76\x30\x9a\x [...]
+			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x1a\x5d\x6f\xe2\x48\xf2\xdd\xbf\xa2\x14\x4e\x9a\x5d\x29\xc0\xce\xee\xcb\x89\x7b\xe2\x32\x13\x1d\x37\x99\x24\x02\x66\x57\xf3\x58\xd8\x85\xe9\x8d\xdd\xed\xeb\x6e\x43\x72\xa7\xdb\xdf\x7e\xaa\x6e\x1b\x6c\xb0\x0d\x09\x99\xd1\xea\x14\xbf\xe1\xee\xfa\xfe\x2e\xdc\x83\xfe\xeb\x3d\x41\x0f\x6e\x44\x48\xd2\x50\x04\x56\x81\x5d\x11\x8c\x33\x0c\x57\x04\x33\xb5\xb4\x1b\xd4\x04\xd7\x2a\x97\x11\x5a\xa1\x24\xfc\x30\x9e\x5d\xff\x08\x [...]
 		},
 		"/operator-deployment.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "operator-deployment.yaml",
diff --git a/pkg/apis/camel/v1/integration_types.go b/pkg/apis/camel/v1/integration_types.go
index 3f26277..d32acba 100644
--- a/pkg/apis/camel/v1/integration_types.go
+++ b/pkg/apis/camel/v1/integration_types.go
@@ -61,10 +61,16 @@ type IntegrationStatus struct {
 }
 
 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// Integration is the Schema for the integrations API
 // +k8s:openapi-gen=true
 // +genclient
+// +kubebuilder:resource:path=integrations,scope=Namespaced,shortName=it
+// +kubebuilder:subresource:status
+// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas
+// +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"
+
+// Integration is the Schema for the integrations API
 type Integration struct {
 	metav1.TypeMeta   `json:",inline"`
 	metav1.ObjectMeta `json:"metadata,omitempty"`