This is an automated email from the ASF dual-hosted git repository. pcongiusti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push: new 4bc56007a feat(doc): adding Kamelet spec 4bc56007a is described below commit 4bc56007ac72b1f3779cf3e0ff135653c43874fc Author: Pasquale Congiusti <pasquale.congiu...@gmail.com> AuthorDate: Thu Sep 11 16:11:00 2025 +0200 feat(doc): adding Kamelet spec Generating and adding doc to have a complete separation from Camel K --- Makefile | 3 +- crds/gen_crd/gen-crd-api-config.json | 22 + crds/gen_crd/gen_crd_api.sh | 40 + crds/gen_crd/template/members.tpl | 30 + crds/gen_crd/template/pkg.tpl | 32 + crds/gen_crd/template/type.tpl | 32 + crds/pkg/apis/camel/v1/doc.go | 21 + .../camel/applyconfiguration/camel/v1/kamelet.go | 2 +- crds/pkg/client/camel/applyconfiguration/utils.go | 2 +- .../versioned/typed/camel/v1/camel_client.go | 2 +- .../camel/informers/externalversions/generic.go | 2 +- docs/modules/ROOT/pages/apis/spec.adoc | 4 + docs/modules/ROOT/pages/index.adoc | 2 +- .../ROOT/partials/apis/camel-kamelets-crds.adoc | 1083 ++++++++++++++++++++ 14 files changed, 1271 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 5c5f1defb..860641232 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,8 @@ generate: ./gen_client.sh && \ ./generate.sh && \ cd ../script/generator && \ - go run . ../../kamelets/ ../../docs/modules/ROOT/ + go run . ../../kamelets/ ../../docs/modules/ROOT/ && \ + cd ../../crds && ./gen_crd/gen_crd_api.sh validate: cd script/validator && \ diff --git a/crds/gen_crd/gen-crd-api-config.json b/crds/gen_crd/gen-crd-api-config.json new file mode 100644 index 000000000..e0975ad8f --- /dev/null +++ b/crds/gen_crd/gen-crd-api-config.json @@ -0,0 +1,22 @@ +{ + "hideMemberFields": [ + "TypeMeta", + "baseErrorHandler" + ], + "hideTypePatterns": [ + "ParseError$", + "List$" + ], + "externalPackages": [ + { + "typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/", + "docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.dex .PackageSegments -2}}" + } + ], + "typeDisplayNamePrefixOverrides": { + "k8s.io/api/": "Kubernetes ", + "k8s.io/apimachinery/pkg/apis/": "Kubernetes " + }, + "markdownDisabled": true, + "asciiDoc": true +} diff --git a/crds/gen_crd/gen_crd_api.sh b/crds/gen_crd/gen_crd_api.sh new file mode 100755 index 000000000..a834c4f42 --- /dev/null +++ b/crds/gen_crd/gen_crd_api.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +location=$(dirname $0) +rootdir=$location/../.. +crd_file_camel=$rootdir/docs/modules/ROOT/partials/apis/camel-kamelets-crds.adoc + +# Until the pull req below is merged upstream, we need to use a self-hosted +# version of gen-crd-api-reference-docs: +# https://github.com/ahmetb/gen-crd-api-reference-docs/pull/45 + +## update the kubernetes version for the generated links +ver=$(grep k8s.io/client-go ${rootdir}/go.mod |sed 's/.*v0\.\(..\)\../\1/g') +sed -i "/docsURLTemplate/s/\(kubernetes-api\/v1\.\)../\1${ver}/" $location/gen-*.json + +echo "Generating CRD API documentation..." +# to run a local copy use something like +#go run /Users/david/projects/camel/gen-crd-api-reference-docs/main.go \ +#you will probably need to comment out use of blackfriday. +go run github.com/tadayosi/gen-crd-api-reference-docs@v0.4.0-camel-k-2 \ + -config $location/gen-crd-api-config.json \ + -template-dir $location/template \ + -api-dir "github.com/apache/camel-kamelets/crds/pkg/apis/camel/v1" \ + -out-file $crd_file_camel + +echo "Generating CRD API documentation... Done." diff --git a/crds/gen_crd/template/members.tpl b/crds/gen_crd/template/members.tpl new file mode 100644 index 000000000..23afa3784 --- /dev/null +++ b/crds/gen_crd/template/members.tpl @@ -0,0 +1,30 @@ +{{ define "members" -}} + +{{ range .Members -}} + {{- if not (hiddenMember .) -}} +|`{{ fieldName . }}` + +{{ if linkForType .Type -}} + {{- if isLocalType .Type -}} +*xref:#{{ sanitizeId (anchorIDForType .Type) }}[{{ asciiDocAttributeEscape (typeDisplayName .Type) }}]* + {{- else -}} +*{{ linkForType .Type}}[{{ asciiDocAttributeEscape (typeDisplayName .Type) }}]* + {{- end -}} +{{- else -}} + {{- typeDisplayName .Type -}} +{{- end }} +|{{ if fieldEmbedded . -}} +(Members of `{{ fieldName . }}` are embedded into this type.) +{{- end }} +{{ if isOptionalMember . -}} +*(Optional)* +{{- end }} + +{{ renderComments .CommentLines }} + +{{ if and (eq (.Type.Name.Name) "ObjectMeta") -}} +Refer to the Kubernetes API documentation for the fields of the `metadata` field. +{{ end -}} +{{- end -}} +{{- end -}} + +{{- end }} diff --git a/crds/gen_crd/template/pkg.tpl b/crds/gen_crd/template/pkg.tpl new file mode 100644 index 000000000..e539cdc47 --- /dev/null +++ b/crds/gen_crd/template/pkg.tpl @@ -0,0 +1,32 @@ +{{ define "packages" -}} +{{ range .packages -}} + +[#{{ sanitizeId (packageAnchorID .) }}] +== {{ packageDisplayName . }} + + {{- with (index .GoPackages 0 ) -}} + {{- with .DocComments }} + +{{ renderComments . }} + {{- end -}} + {{- end }} + +== Resource Types + + {{- range (visibleTypes (sortedTypes .Types)) -}} + {{- if isExportedType . -}} + {{- template "type" . }} + {{- end -}} + {{- end }} + +== Internal Types + + {{- range (visibleTypes (sortedTypes .Types)) -}} + {{- if not (isExportedType .) -}} + {{- template "type" . }} + {{- end -}} + {{- end -}} + +{{- end -}} + +{{- end }} diff --git a/crds/gen_crd/template/type.tpl b/crds/gen_crd/template/type.tpl new file mode 100644 index 000000000..d52c4c34a --- /dev/null +++ b/crds/gen_crd/template/type.tpl @@ -0,0 +1,32 @@ +{{ define "type" }} + +[#{{ sanitizeId (anchorIDForType .) }}] +=== {{ .Name.Name }}{{ if eq .Kind "Alias" }}(`{{.Underlying}}` alias){{ end }} +{{- with (typeReferences .) }} + +*Appears on:* +{{ range . }} +* <<#{{ sanitizeId (anchorIDForType .) }}, {{ typeDisplayName . }}>> +{{- end -}} +{{- end }} + +{{ renderComments .CommentLines }} +{{ if .Members }} +[cols="2,2a",options="header"] +|=== +|Field +|Description +{{ if isExportedType . }} +|`apiVersion` + +string +|`{{apiGroup .}}` + +|`kind` + +string +|`{{.Name.Name}}` +{{- end }} +{{ template "members" . }} +|=== +{{- end -}} + +{{- end -}} diff --git a/crds/pkg/apis/camel/v1/doc.go b/crds/pkg/apis/camel/v1/doc.go new file mode 100644 index 000000000..1f4fbdc32 --- /dev/null +++ b/crds/pkg/apis/camel/v1/doc.go @@ -0,0 +1,21 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1 contains API Schema definitions for the camel v1 API group +// +kubebuilder:object:generate=true +// +groupName=camel.apache.org +package v1 diff --git a/crds/pkg/client/camel/applyconfiguration/camel/v1/kamelet.go b/crds/pkg/client/camel/applyconfiguration/camel/v1/kamelet.go index 93e62572f..ef71104aa 100644 --- a/crds/pkg/client/camel/applyconfiguration/camel/v1/kamelet.go +++ b/crds/pkg/client/camel/applyconfiguration/camel/v1/kamelet.go @@ -41,7 +41,7 @@ func Kamelet(name, namespace string) *KameletApplyConfiguration { b.WithName(name) b.WithNamespace(namespace) b.WithKind("Kamelet") - b.WithAPIVersion("camel/v1") + b.WithAPIVersion("camel.apache.org/v1") return b } diff --git a/crds/pkg/client/camel/applyconfiguration/utils.go b/crds/pkg/client/camel/applyconfiguration/utils.go index 5be3b892b..b7267c311 100644 --- a/crds/pkg/client/camel/applyconfiguration/utils.go +++ b/crds/pkg/client/camel/applyconfiguration/utils.go @@ -32,7 +32,7 @@ import ( // apply configuration type exists for the given GroupVersionKind. func ForKind(kind schema.GroupVersionKind) interface{} { switch kind { - // Group=camel, Version=v1 + // Group=camel.apache.org, Version=v1 case v1.SchemeGroupVersion.WithKind("DataSpec"): return &camelv1.DataSpecApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("DataTypeSpec"): diff --git a/crds/pkg/client/camel/clientset/versioned/typed/camel/v1/camel_client.go b/crds/pkg/client/camel/clientset/versioned/typed/camel/v1/camel_client.go index 15b782d28..6eb28859b 100644 --- a/crds/pkg/client/camel/clientset/versioned/typed/camel/v1/camel_client.go +++ b/crds/pkg/client/camel/clientset/versioned/typed/camel/v1/camel_client.go @@ -32,7 +32,7 @@ type CamelV1Interface interface { KameletsGetter } -// CamelV1Client is used to interact with features provided by the camel group. +// CamelV1Client is used to interact with features provided by the camel.apache.org group. type CamelV1Client struct { restClient rest.Interface } diff --git a/crds/pkg/client/camel/informers/externalversions/generic.go b/crds/pkg/client/camel/informers/externalversions/generic.go index ac70689ec..31ed31b31 100644 --- a/crds/pkg/client/camel/informers/externalversions/generic.go +++ b/crds/pkg/client/camel/informers/externalversions/generic.go @@ -53,7 +53,7 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=camel, Version=v1 + // Group=camel.apache.org, Version=v1 case v1.SchemeGroupVersion.WithResource("kamelets"): return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1().Kamelets().Informer()}, nil diff --git a/docs/modules/ROOT/pages/apis/spec.adoc b/docs/modules/ROOT/pages/apis/spec.adoc new file mode 100644 index 000000000..fcafecc28 --- /dev/null +++ b/docs/modules/ROOT/pages/apis/spec.adoc @@ -0,0 +1,4 @@ += Camel Kamelets API +:page-aliases: camel.adoc + +include::partial$apis/camel-kamelets-crds.adoc[] diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index babae9287..dcb0b4809 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -2,7 +2,7 @@ == Kamelet specification -Kamelets were originally born for Kubernetes and they have eventually moved to be used as Camel core resources. Its specification is a Kubernetes CRD specification. You can use it in your project by using Maven dependency `org.apache.camel.kamelets:camel-kamelets-crds`. +Kamelets were originally born for Kubernetes and they have eventually moved to be used as Camel core resources. Its specification is a xref:apis/spec.adoc[Kubernetes CRD specification]. You can use it in your project by using Maven dependency `org.apache.camel.kamelets:camel-kamelets-crds`. == Development guide diff --git a/docs/modules/ROOT/partials/apis/camel-kamelets-crds.adoc b/docs/modules/ROOT/partials/apis/camel-kamelets-crds.adoc new file mode 100644 index 000000000..88b7acbb1 --- /dev/null +++ b/docs/modules/ROOT/partials/apis/camel-kamelets-crds.adoc @@ -0,0 +1,1083 @@ +[#_camel_apache_org_v1] +== camel.apache.org/v1 + +Package v1 contains API Schema definitions for the camel v1 API group + +== Resource Types + +[#_camel_apache_org_v1_Kamelet] +=== Kamelet + +Kamelet is the Schema for the kamelets API. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`apiVersion` + +string +|`camel.apache.org/v1` + +|`kind` + +string +|`Kamelet` +|`metadata` + +*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.dex .PackageSegments -2}}[Kubernetes meta/v1.ObjectMeta]* +| + + + + +Refer to the Kubernetes API documentation for the fields of the `metadata` field. +|`spec` + +*xref:#_camel_apache_org_v1_KameletSpec[KameletSpec]* +| + + +the desired specification + +|`status` + +*xref:#_camel_apache_org_v1_KameletStatus[KameletStatus]* +| + + +the actual status of the resource +Deprecated no longer in use + + +|=== + +== Internal Types + +[#_camel_apache_org_v1_DataSpec] +=== DataSpec + +*Appears on:* + +* <<#_camel_apache_org_v1_SourceSpec, SourceSpec>> + +DataSpec represents the way the source is materialized in the running `Pod`. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`name` + +string +| + + +the name of the specification + +|`path` + +string +| + + +the path where the file is stored + +|`content` + +string +| + + +the source code (plain text) + +|`rawContent` + +[]byte +| + + +the source code (binary) + +|`contentRef` + +string +| + + +the confimap reference holding the source content + +|`contentKey` + +string +| + + +the confimap key holding the source content + +|`contentType` + +string +| + + +the content type (typically text or binary) + +|`compression` + +bool +| + + +if the content is compressed (base64 encrypted) + + +|=== + +[#_camel_apache_org_v1_DataTypeReference] +=== DataTypeReference + +DataTypeReference references to the specification of a data type by its scheme and format name. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`scheme` + +string +| + + +the data type component scheme + +|`format` + +string +| + + +the data type format name + + +|=== + +[#_camel_apache_org_v1_DataTypeSpec] +=== DataTypeSpec + +*Appears on:* + +* <<#_camel_apache_org_v1_DataTypesSpec, DataTypesSpec>> + +DataTypeSpec represents the specification for a data type. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`scheme` + +string +| + + +the data type component scheme + +|`format` + +string +| + + +the data type format name + +|`description` + +string +| + + +optional description + +|`mediaType` + +string +| + + +media type as expected for HTTP media types (ie, application/json) + +|`dependencies` + +[]string +| + + +the list of Camel or Maven dependencies required by the data type + +|`headers` + +*xref:#_camel_apache_org_v1_HeaderSpec[map[string\]github.com/apache/camel-kamelets/crds/pkg/apis/camel/v1.HeaderSpec]* +| + + +one to many header specifications + +|`schema` + +*xref:#_camel_apache_org_v1_JSONSchemaProps[JSONSchemaProps]* +| + + +the expected schema for the data type + + +|=== + +[#_camel_apache_org_v1_DataTypesSpec] +=== DataTypesSpec + +*Appears on:* + +* <<#_camel_apache_org_v1_KameletSpecBase, KameletSpecBase>> + +DataTypesSpec represents the specification for a set of data types. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`default` + +string +| + + +the default data type for this Kamelet + +|`types` + +*xref:#_camel_apache_org_v1_DataTypeSpec[map[string\]github.com/apache/camel-kamelets/crds/pkg/apis/camel/v1.DataTypeSpec]* +| + + +one to many data type specifications + +|`headers` + +*xref:#_camel_apache_org_v1_HeaderSpec[map[string\]github.com/apache/camel-kamelets/crds/pkg/apis/camel/v1.HeaderSpec]* +| + + +one to many header specifications + + +|=== + +[#_camel_apache_org_v1_EventTypeSpec] +=== EventTypeSpec + +*Appears on:* + +* <<#_camel_apache_org_v1_KameletSpecBase, KameletSpecBase>> + +EventTypeSpec represents a specification for an event type. +Deprecated: In favor of using DataTypeSpec. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`mediaType` + +string +| + + +media type as expected for HTTP media types (ie, application/json) + +|`schema` + +*xref:#_camel_apache_org_v1_JSONSchemaProps[JSONSchemaProps]* +| + + +the expected schema for the event + + +|=== + +[#_camel_apache_org_v1_ExternalDocumentation] +=== ExternalDocumentation + +*Appears on:* + +* <<#_camel_apache_org_v1_JSONSchemaProps, JSONSchemaProps>> + +ExternalDocumentation allows referencing an external resource for extended documentation. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`description` + +string +| + + + + +|`url` + +string +| + + + + + +|=== + +[#_camel_apache_org_v1_HeaderSpec] +=== HeaderSpec + +*Appears on:* + +* <<#_camel_apache_org_v1_DataTypeSpec, DataTypeSpec>> +* <<#_camel_apache_org_v1_DataTypesSpec, DataTypesSpec>> + +HeaderSpec represents the specification for a header used in the Kamelet. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`type` + +string +| + + + + +|`title` + +string +| + + + + +|`description` + +string +| + + + + +|`required` + +bool +| + + + + +|`default` + +string +| + + + + + +|=== + +[#_camel_apache_org_v1_JSON] +=== JSON + +*Appears on:* + +* <<#_camel_apache_org_v1_JSONSchemaProp, JSONSchemaProp>> +* <<#_camel_apache_org_v1_JSONSchemaProps, JSONSchemaProps>> + +JSON represents any valid JSON value. +These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`RawMessage` + +*xref:#_camel_apache_org_v1_RawMessage[RawMessage]* +|(Members of `RawMessage` are embedded into this type.) + + + + + +|=== + +[#_camel_apache_org_v1_JSONSchemaProp] +=== JSONSchemaProp + +*Appears on:* + +* <<#_camel_apache_org_v1_JSONSchemaProps, JSONSchemaProps>> + + + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`id` + +string +| + + + + +|`deprecated` + +bool +| + + + + +|`description` + +string +| + + + + +|`type` + +string +| + + + + +|`format` + +string +| + + +format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: + +- bsonobjectid: a bson object ID, i.e. a 24 characters hex string +- uri: an URI as parsed by Golang net/url.ParseRequestURI +- email: an email address as parsed by Golang net/mail.ParseAddress +- hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. +- ipv4: an IPv4 IP as parsed by Golang net.ParseIP +- ipv6: an IPv6 IP as parsed by Golang net.ParseIP +- cidr: a CIDR as parsed by Golang net.ParseCIDR +- mac: a MAC address as parsed by Golang net.ParseMAC +- uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]\{8}-?[0-9a-f]\{4}-?[0-9a-f]\{4}-?[0-9a-f]\{4}-?[0-9a-f]\{12}$ +- uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]\{8}-?[0-9a-f]\{4}-?3[0-9a-f]\{3}-?[0-9a-f]\{4}-?[0-9a-f]\{12}$ +- uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]\{8}-?[0-9a-f]\{4}-?4[0-9a-f]\{3}-?[89ab][0-9a-f]\{3}-?[0-9a-f]\{12}$ +- uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]\{8}-?[0-9a-f]\{4}-?5[0-9a-f]\{3}-?[89ab][0-9a-f]\{3}-?[0-9a-f]\{12}$ +- isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" +- isbn10: an ISBN10 number string like "0321751043" +- isbn13: an ISBN13 number string like "978-0321751041" +- creditcard: a credit card number defined by the regex ^(?:4[0-9]\{12}(?:[0-9]\{3})?{vbar}5[1-5][0-9]\{14}{vbar}6(?:011{vbar}5[0-9][0-9])[0-9]\{12}{vbar}3[47][0-9]\{13}{vbar}3(?:0[0-5]{vbar}[68][0-9])[0-9]\{11}{vbar}(?:2131{vbar}1800{vbar}35\\d\{3})\\d\{11})$ with any non digit characters mixed in +- ssn: a U.S. social security number following the regex ^\\d\{3}[- ]?\\d\{2}[- ]?\\d\{4}$ +- hexcolor: an hexadecimal color code like "\#FFFFFF" following the regex ^#?([0-9a-fA-F]\{3}{vbar}[0-9a-fA-F]\{6})$ +- rgbcolor: an RGB color code like rgb like "rgb(255,255,255)" +- byte: base64 encoded binary data +- password: any kind of string +- date: a date string like "2006-01-02" as defined by full-date in RFC3339 +- duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format +- datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. + +|`title` + +string +| + + + + +|`default` + +*xref:#_camel_apache_org_v1_JSON[JSON]* +| + + +default is a default value for undefined object fields. + +|`maximum` + +encoding/json.Number +| + + + + +|`exclusiveMaximum` + +bool +| + + + + +|`minimum` + +encoding/json.Number +| + + + + +|`exclusiveMinimum` + +bool +| + + + + +|`maxLength` + +int64 +| + + + + +|`minLength` + +int64 +| + + + + +|`pattern` + +string +| + + + + +|`maxItems` + +int64 +| + + + + +|`minItems` + +int64 +| + + + + +|`uniqueItems` + +bool +| + + + + +|`maxProperties` + +int64 +| + + + + +|`minProperties` + +int64 +| + + + + +|`multipleOf` + +encoding/json.Number +| + + + + +|`enum` + +*xref:#_camel_apache_org_v1_JSON[[\]JSON]* +| + + + + +|`example` + +*xref:#_camel_apache_org_v1_JSON[JSON]* +| + + + + +|`nullable` + +bool +| + + + + +|`x-descriptors` + +[]string +| + + +XDescriptors is a list of extended properties that trigger a custom behavior in external systems + + +|=== + +[#_camel_apache_org_v1_JSONSchemaProps] +=== JSONSchemaProps + +*Appears on:* + +* <<#_camel_apache_org_v1_DataTypeSpec, DataTypeSpec>> +* <<#_camel_apache_org_v1_EventTypeSpec, EventTypeSpec>> +* <<#_camel_apache_org_v1_KameletSpecBase, KameletSpecBase>> + +JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`id` + +string +| + + + + +|`description` + +string +| + + + + +|`title` + +string +| + + + + +|`properties` + +*xref:#_camel_apache_org_v1_JSONSchemaProp[map[string\]github.com/apache/camel-kamelets/crds/pkg/apis/camel/v1.JSONSchemaProp]* +| + + + + +|`required` + +[]string +| + + + + +|`example` + +*xref:#_camel_apache_org_v1_JSON[JSON]* +| + + + + +|`externalDocs` + +*xref:#_camel_apache_org_v1_ExternalDocumentation[ExternalDocumentation]* +| + + + + +|`$schema` + +*xref:#_camel_apache_org_v1_JSONSchemaURL[JSONSchemaURL]* +| + + + + +|`type` + +string +| + + + + + +|=== + +[#_camel_apache_org_v1_JSONSchemaURL] +=== JSONSchemaURL(`string` alias) + +*Appears on:* + +* <<#_camel_apache_org_v1_JSONSchemaProps, JSONSchemaProps>> + +JSONSchemaURL represents a schema url. + + +[#_camel_apache_org_v1_KameletCondition] +=== KameletCondition + +*Appears on:* + +* <<#_camel_apache_org_v1_KameletStatus, KameletStatus>> + +KameletCondition describes the state of a resource at a certain point. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`type` + +*xref:#_camel_apache_org_v1_KameletConditionType[KameletConditionType]* +| + + +Type of kamelet condition. + +|`status` + +*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.dex .PackageSegments -2}}[Kubernetes core/v1.ConditionStatus]* +| + + +Status of the condition, one of True, False, Unknown. + +|`lastUpdateTime` + +*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.dex .PackageSegments -2}}[Kubernetes meta/v1.Time]* +| + + +The last time this condition was updated. + +|`lastTransitionTime` + +*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.dex .PackageSegments -2}}[Kubernetes meta/v1.Time]* +| + + +Last time the condition transitioned from one status to another. + +|`reason` + +string +| + + +The reason for the condition's last transition. + +|`message` + +string +| + + +A human-readable message indicating details about the transition. + + +|=== + +[#_camel_apache_org_v1_KameletConditionType] +=== KameletConditionType(`string` alias) + +*Appears on:* + +* <<#_camel_apache_org_v1_KameletCondition, KameletCondition>> + +KameletConditionType --. + + +[#_camel_apache_org_v1_KameletPhase] +=== KameletPhase(`string` alias) + +*Appears on:* + +* <<#_camel_apache_org_v1_KameletStatus, KameletStatus>> + +KameletPhase --. + + +[#_camel_apache_org_v1_KameletProperty] +=== KameletProperty + +*Appears on:* + +* <<#_camel_apache_org_v1_KameletStatus, KameletStatus>> + +KameletProperty specify the behavior of a property in a Kamelet. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`name` + +string +| + + +the name of the property + +|`default` + +string +| + + +the default value of the property (if any) + + +|=== + +[#_camel_apache_org_v1_KameletSpec] +=== KameletSpec + +*Appears on:* + +* <<#_camel_apache_org_v1_Kamelet, Kamelet>> + +KameletSpec specifies the configuration required to execute a Kamelet. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`KameletSpecBase` + +*xref:#_camel_apache_org_v1_KameletSpecBase[KameletSpecBase]* +|(Members of `KameletSpecBase` are embedded into this type.) + + + + +|`versions` + +*xref:#_camel_apache_org_v1_KameletSpecBase[map[string\]github.com/apache/camel-kamelets/crds/pkg/apis/camel/v1.KameletSpecBase]* +| + + +the optional versions available for this Kamelet. This field may not be taken in account by Camel core and is meant to support +any user defined versioning model on cluster only. If the user wants to use any given version, she must materialize a file with the given version spec +as the `main` Kamelet spec on the runtime. + + +|=== + +[#_camel_apache_org_v1_KameletSpecBase] +=== KameletSpecBase + +*Appears on:* + +* <<#_camel_apache_org_v1_KameletSpec, KameletSpec>> + +KameletSpecBase specifies the base configuration of a Kamelet. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`definition` + +*xref:#_camel_apache_org_v1_JSONSchemaProps[JSONSchemaProps]* +| + + +defines the formal configuration of the Kamelet + +|`sources` + +*xref:#_camel_apache_org_v1_SourceSpec[[\]SourceSpec]* +| + + +sources in any Camel DSL supported + +|`template` + +*xref:#_camel_apache_org_v1_Template[Template]* +| + + +the main source in YAML DSL + +|`types` + +*xref:#_camel_apache_org_v1_EventTypeSpec[map[github.com/apache/camel-kamelets/crds/pkg/apis/camel/v1.TypeSlot\]github.com/apache/camel-kamelets/crds/pkg/apis/camel/v1.EventTypeSpec]* +| + + +data specification types for the events consumed/produced by the Kamelet +Deprecated: In favor of using DataTypes + +|`dataTypes` + +*xref:#_camel_apache_org_v1_DataTypesSpec[map[github.com/apache/camel-kamelets/crds/pkg/apis/camel/v1.TypeSlot\]github.com/apache/camel-kamelets/crds/pkg/apis/camel/v1.DataTypesSpec]* +| + + +data specification types for the events consumed/produced by the Kamelet + +|`dependencies` + +[]string +| + + +Camel dependencies needed by the Kamelet + + +|=== + +[#_camel_apache_org_v1_KameletStatus] +=== KameletStatus + +*Appears on:* + +* <<#_camel_apache_org_v1_Kamelet, Kamelet>> + +KameletStatus defines the observed state of Kamelet. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`observedGeneration` + +int64 +| + + +ObservedGeneration is the most recent generation observed for this Kamelet. + +|`phase` + +*xref:#_camel_apache_org_v1_KameletPhase[KameletPhase]* +| + + +Phase -- + +|`conditions` + +*xref:#_camel_apache_org_v1_KameletCondition[[\]KameletCondition]* +| + + +Conditions -- + +|`properties` + +*xref:#_camel_apache_org_v1_KameletProperty[[\]KameletProperty]* +| + + +Properties -- + + +|=== + +[#_camel_apache_org_v1_Language] +=== Language(`string` alias) + +*Appears on:* + +* <<#_camel_apache_org_v1_SourceSpec, SourceSpec>> + +Language represents a supported language (Camel DSL). + + +[#_camel_apache_org_v1_RawMessage] +=== RawMessage(`[]byte` alias) + +*Appears on:* + +* <<#_camel_apache_org_v1_JSON, JSON>> +* <<#_camel_apache_org_v1_Template, Template>> + +RawMessage is a raw encoded JSON value. +It implements Marshaler and Unmarshaler and can +be used to delay JSON decoding or precompute a JSON encoding. + + +[#_camel_apache_org_v1_ResourceCondition] +=== ResourceCondition + +ResourceCondition is a common type for all conditions. + + +[#_camel_apache_org_v1_SourceSpec] +=== SourceSpec + +*Appears on:* + +* <<#_camel_apache_org_v1_KameletSpecBase, KameletSpecBase>> + +SourceSpec defines the configuration for one or more routes to be executed in a certain Camel DSL language. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`DataSpec` + +*xref:#_camel_apache_org_v1_DataSpec[DataSpec]* +|(Members of `DataSpec` are embedded into this type.) + + +contains configuration related to the source code + +|`language` + +*xref:#_camel_apache_org_v1_Language[Language]* +| + + +specify which is the language (Camel DSL) used to interpret this source code + +|`loader` + +string +| + + +Loader is an optional id of the org.apache.camel.k.RoutesLoader that will +interpret this source at runtime + +|`interceptors` + +[]string +| + + +Interceptors are optional identifiers the org.apache.camel.k.RoutesLoader +uses to pre/post process sources + +|`type` + +*xref:#_camel_apache_org_v1_SourceType[SourceType]* +| + + +Type defines the kind of source described by this object + +|`property-names` + +[]string +| + + +List of property names defined in the source (e.g. if type is "template") + +|`from-kamelet` + +bool +| + + +True if the spec is generated from a Kamelet + + +|=== + +[#_camel_apache_org_v1_SourceType] +=== SourceType(`string` alias) + +*Appears on:* + +* <<#_camel_apache_org_v1_SourceSpec, SourceSpec>> + +SourceType represents an available source type. + + +[#_camel_apache_org_v1_Template] +=== Template + +*Appears on:* + +* <<#_camel_apache_org_v1_KameletSpecBase, KameletSpecBase>> + +Template is an unstructured object representing a Kamelet template in YAML/JSON DSL. + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`RawMessage` + +*xref:#_camel_apache_org_v1_RawMessage[RawMessage]* +|(Members of `RawMessage` are embedded into this type.) + + +an unstructured raw message + + +|=== + +[#_camel_apache_org_v1_TypeSlot] +=== TypeSlot(`string` alias) + +TypeSlot represent a kind of data (ie, input, output, ...).