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 2023/03/02 07:42:01 UTC

[camel-k] branch main updated (b122d7ec1 -> d1e9687f7)

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

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


    from b122d7ec1 chore: changelog automatic update
     new 0ff65da4e feat: Add path option to ingress trait
     new 6edfeaf42 feat: Add annotations option to ingress trait
     new 6c158fd4d feat: Add path type option to ingress trait
     new 27a082581 chore: Regen CRDs with ingress trait new options
     new d69e4abb8 chore: Run codegen with ingress trait new options
     new af0a87235 chore: Regen docs with ingress trait new options
     new dcdbfbb3c chore: Rebuild resources
     new d1e9687f7 feat(cli): Support setting maps in traits API

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel.apache.org_integrationplatforms.yaml     | 40 ++++++++++++++++++++++
 .../crd/bases/camel.apache.org_integrations.yaml   | 20 +++++++++++
 .../bases/camel.apache.org_kameletbindings.yaml    | 20 +++++++++++
 docs/modules/ROOT/partials/apis/camel-k-crds.adoc  | 24 +++++++++++++
 docs/modules/traits/pages/ingress.adoc             | 15 ++++++++
 helm/camel-k/crds/crd-integration-platform.yaml    | 40 ++++++++++++++++++++++
 helm/camel-k/crds/crd-integration.yaml             | 20 +++++++++++
 helm/camel-k/crds/crd-kamelet-binding.yaml         | 20 +++++++++++
 pkg/apis/camel/v1/trait/ingress.go                 | 12 +++++++
 pkg/apis/camel/v1/trait/zz_generated.deepcopy.go   | 16 ++++++++-
 .../camel/clientset/versioned/fake/register.go     | 14 ++++----
 .../camel/clientset/versioned/scheme/register.go   | 14 ++++----
 pkg/cmd/trait_support.go                           | 24 ++++++++++---
 pkg/resources/resources.go                         | 16 ++++-----
 pkg/trait/ingress.go                               | 21 ++++++------
 pkg/trait/trait_catalog.go                         |  6 +++-
 pkg/trait/util.go                                  | 11 ++++++
 pkg/util/util.go                                   | 19 +++++++---
 resources/traits.yaml                              | 11 ++++++
 19 files changed, 321 insertions(+), 42 deletions(-)


[camel-k] 03/08: feat: Add path type option to ingress trait

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6c158fd4d53fea900e890726089b6476e5ac1847
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Wed Mar 1 12:39:39 2023 +0100

    feat: Add path type option to ingress trait
---
 pkg/apis/camel/v1/trait/ingress.go |  6 ++++++
 pkg/trait/ingress.go               | 10 ++++------
 pkg/trait/util.go                  | 11 +++++++++++
 3 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/pkg/apis/camel/v1/trait/ingress.go b/pkg/apis/camel/v1/trait/ingress.go
index 6a0ee71c6..128b36f02 100644
--- a/pkg/apis/camel/v1/trait/ingress.go
+++ b/pkg/apis/camel/v1/trait/ingress.go
@@ -17,6 +17,8 @@ limitations under the License.
 
 package trait
 
+import networkingv1 "k8s.io/api/networking/v1"
+
 // The Ingress trait can be used to expose the service associated with the integration
 // to the outside world with a Kubernetes Ingress.
 //
@@ -33,6 +35,10 @@ type IngressTrait struct {
 	Host string `property:"host" json:"host,omitempty"`
 	// To configure the path exposed by the ingress (default `/`).
 	Path string `property:"path" json:"path,omitempty"`
+	// To configure the path type exposed by the ingress.
+	// One of `Exact`, `Prefix`, `ImplementationSpecific` (default to `Prefix`).
+	// +kubebuilder:validation:Enum=Exact;Prefix;ImplementationSpecific
+	PathType *networkingv1.PathType `property:"path-type" json:"pathType,omitempty"`
 	// To automatically add an ingress whenever the integration uses an HTTP endpoint consumer.
 	Auto *bool `property:"auto" json:"auto,omitempty"`
 }
diff --git a/pkg/trait/ingress.go b/pkg/trait/ingress.go
index 8f0243cfa..5635d9de1 100644
--- a/pkg/trait/ingress.go
+++ b/pkg/trait/ingress.go
@@ -24,7 +24,6 @@ import (
 	corev1 "k8s.io/api/core/v1"
 	networkingv1 "k8s.io/api/networking/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-	"k8s.io/utils/pointer"
 
 	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
 	traitv1 "github.com/apache/camel-k/pkg/apis/camel/v1/trait"
@@ -42,6 +41,7 @@ func newIngressTrait() Trait {
 			Annotations: map[string]string{},
 			Host:        "",
 			Path:        "/",
+			PathType:    ptrFrom(networkingv1.PathTypePrefix),
 		},
 	}
 }
@@ -56,7 +56,7 @@ func (t *ingressTrait) Configure(e *Environment) (bool, error) {
 		return false, nil
 	}
 
-	if !pointer.BoolDeref(t.Enabled, true) {
+	if !ptrDerefOr(t.Enabled, true) {
 		e.Integration.Status.SetCondition(
 			v1.IntegrationConditionExposureAvailable,
 			corev1.ConditionFalse,
@@ -66,7 +66,7 @@ func (t *ingressTrait) Configure(e *Environment) (bool, error) {
 		return false, nil
 	}
 
-	if pointer.BoolDeref(t.Auto, true) {
+	if ptrDerefOr(t.Auto, true) {
 		if e.Resources.GetUserServiceForIntegration(e.Integration) == nil {
 			e.Integration.Status.SetCondition(
 				v1.IntegrationConditionExposureAvailable,
@@ -87,8 +87,6 @@ func (t *ingressTrait) Apply(e *Environment) error {
 		return errors.New("cannot Apply ingress trait: no target service")
 	}
 
-	pathType := networkingv1.PathTypePrefix
-
 	ingress := networkingv1.Ingress{
 		TypeMeta: metav1.TypeMeta{
 			Kind:       "Ingress",
@@ -108,7 +106,7 @@ func (t *ingressTrait) Apply(e *Environment) error {
 							Paths: []networkingv1.HTTPIngressPath{
 								{
 									Path:     t.Path,
-									PathType: &pathType,
+									PathType: t.PathType,
 									Backend: networkingv1.IngressBackend{
 										Service: &networkingv1.IngressServiceBackend{
 											Name: service.Name,
diff --git a/pkg/trait/util.go b/pkg/trait/util.go
index 1e7daeb8b..d34a6a080 100644
--- a/pkg/trait/util.go
+++ b/pkg/trait/util.go
@@ -42,6 +42,17 @@ import (
 	"github.com/apache/camel-k/pkg/util/property"
 )
 
+func ptrFrom[T any](value T) *T {
+	return &value
+}
+
+func ptrDerefOr[T any](value *T, def T) T {
+	if value != nil {
+		return *value
+	}
+	return def
+}
+
 type Options map[string]map[string]interface{}
 
 func (u Options) Get(id string) (map[string]interface{}, bool) {


[camel-k] 08/08: feat(cli): Support setting maps in traits API

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d1e9687f78b15fc78ef25c0978e3200376bc268e
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Wed Mar 1 12:51:00 2023 +0100

    feat(cli): Support setting maps in traits API
---
 pkg/cmd/trait_support.go   | 24 ++++++++++++++++++++----
 pkg/trait/trait_catalog.go |  6 +++++-
 pkg/util/util.go           | 19 +++++++++++++++----
 3 files changed, 40 insertions(+), 9 deletions(-)

diff --git a/pkg/cmd/trait_support.go b/pkg/cmd/trait_support.go
index 6e8abfa22..a85cc2080 100644
--- a/pkg/cmd/trait_support.go
+++ b/pkg/cmd/trait_support.go
@@ -36,7 +36,7 @@ type optionMap map[string]map[string]interface{}
 // The list of known addons is used for handling backward compatibility.
 var knownAddons = []string{"keda", "master", "strimzi", "3scale", "tracing"}
 
-var traitConfigRegexp = regexp.MustCompile(`^([a-z0-9-]+)((?:\.[a-z0-9-]+)(?:\[[0-9]+\]|\.[A-Za-z0-9-_]+)*)=(.*)$`)
+var traitConfigRegexp = regexp.MustCompile(`^([a-z0-9-]+)((?:\.[a-z0-9-]+)(?:\[[0-9]+\]|\..+)*)=(.*)$`)
 
 func validateTraits(catalog *trait.Catalog, traits []string) error {
 	tp := catalog.ComputeTraitsProperties()
@@ -46,7 +46,9 @@ func validateTraits(catalog *trait.Catalog, traits []string) error {
 		if strings.Contains(prefix, "[") {
 			prefix = prefix[0:strings.Index(prefix, "[")]
 		}
-		if !util.StringSliceExists(tp, prefix) {
+		if valid, err := validateTrait(tp, prefix); err != nil {
+			return err
+		} else if !valid {
 			return fmt.Errorf("%s is not a valid trait property", t)
 		}
 	}
@@ -54,18 +56,32 @@ func validateTraits(catalog *trait.Catalog, traits []string) error {
 	return nil
 }
 
+func validateTrait(properties []string, item string) (bool, error) {
+	for i := 0; i < len(properties); i++ {
+		if strings.HasSuffix(properties[i], ".*") {
+			if match, err := regexp.MatchString(properties[i], item); err != nil {
+				return false, err
+			} else if match {
+				return true, nil
+			}
+		} else if properties[i] == item {
+			return true, nil
+		}
+	}
+
+	return false, nil
+}
+
 func configureTraits(options []string, traits interface{}, catalog trait.Finder) error {
 	config, err := optionsToMap(options)
 	if err != nil {
 		return err
 	}
 
-	//
 	// Known addons need to be put aside here, as otherwise the deprecated addon fields on
 	// Traits might be accidentally populated. The deprecated addon fields are preserved
 	// for backward compatibility and should be populated only when the operator reads
 	// existing CRs from the API server.
-	//
 	addons := make(optionMap)
 	for _, id := range knownAddons {
 		if config[id] != nil {
diff --git a/pkg/trait/trait_catalog.go b/pkg/trait/trait_catalog.go
index 5acbaf94c..6992abd26 100644
--- a/pkg/trait/trait_catalog.go
+++ b/pkg/trait/trait_catalog.go
@@ -182,7 +182,11 @@ func (c *Catalog) processFields(fields []*structs.Field, processor func(string))
 
 		if property != "" {
 			items := strings.Split(property, ",")
-			processor(items[0])
+			if f.Kind() == reflect.Map {
+				processor(items[0] + ".*")
+			} else {
+				processor(items[0])
+			}
 		}
 	}
 }
diff --git a/pkg/util/util.go b/pkg/util/util.go
index 750aada65..28de402f3 100644
--- a/pkg/util/util.go
+++ b/pkg/util/util.go
@@ -93,7 +93,7 @@ var QuarkusDependenciesBaseDirectory = "/quarkus-app"
 // These are sensitive values or values that may have different values depending on
 // where the integration is run (locally vs. the cloud). These environment variables
 // are evaluated at the time of the integration invocation.
-var ListOfLazyEvaluatedEnvVars = []string{}
+var ListOfLazyEvaluatedEnvVars []string
 
 // CLIEnvVars -- List of CLI provided environment variables. They take precedence over
 // any environment variables with the same name.
@@ -645,12 +645,14 @@ func WithTempDir(pattern string, consumer func(string) error) error {
 	return multierr.Append(consumerErr, removeErr)
 }
 
-// Parses a property spec and returns its parts.
+var propertyRegex = regexp.MustCompile("'.+'|\".+\"|[^.]+")
+
+// ConfigTreePropertySplit Parses a property spec and returns its parts.
 func ConfigTreePropertySplit(property string) []string {
 	var res = make([]string, 0)
-	initialParts := strings.Split(property, ".")
+	initialParts := propertyRegex.FindAllString(property, -1)
 	for _, p := range initialParts {
-		cur := p
+		cur := trimQuotes(p)
 		var tmp []string
 		for strings.Contains(cur[1:], "[") && strings.HasSuffix(cur, "]") {
 			pos := strings.LastIndex(cur, "[")
@@ -667,6 +669,15 @@ func ConfigTreePropertySplit(property string) []string {
 	return res
 }
 
+func trimQuotes(s string) string {
+	if len(s) >= 2 {
+		if c := s[len(s)-1]; s[0] == c && (c == '"' || c == '\'') {
+			return s[1 : len(s)-1]
+		}
+	}
+	return s
+}
+
 // NavigateConfigTree switch to the element in the tree represented by the "nodes" spec and creates intermediary
 // nodes if missing. Nodes specs starting with "[" and ending in "]" are treated as slice indexes.
 func NavigateConfigTree(current interface{}, nodes []string) (interface{}, error) {


[camel-k] 01/08: feat: Add path option to ingress trait

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0ff65da4e0e92a92ccb26662200b1e4600062b3c
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Feb 28 15:07:07 2023 +0100

    feat: Add path option to ingress trait
---
 pkg/apis/camel/v1/trait/ingress.go | 2 ++
 pkg/trait/ingress.go               | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/pkg/apis/camel/v1/trait/ingress.go b/pkg/apis/camel/v1/trait/ingress.go
index 1a76319d4..3d93f4aa1 100644
--- a/pkg/apis/camel/v1/trait/ingress.go
+++ b/pkg/apis/camel/v1/trait/ingress.go
@@ -27,6 +27,8 @@ type IngressTrait struct {
 	Trait `property:",squash" json:",inline"`
 	// To configure the host exposed by the ingress.
 	Host string `property:"host" json:"host,omitempty"`
+	// To configure the path exposed by the ingress (default `/`).
+	Path string `property:"path" json:"path,omitempty"`
 	// To automatically add an ingress whenever the integration uses an HTTP endpoint consumer.
 	Auto *bool `property:"auto" json:"auto,omitempty"`
 }
diff --git a/pkg/trait/ingress.go b/pkg/trait/ingress.go
index 99da27bba..ea9eb0a44 100644
--- a/pkg/trait/ingress.go
+++ b/pkg/trait/ingress.go
@@ -40,6 +40,7 @@ func newIngressTrait() Trait {
 		BaseTrait: NewBaseTrait("ingress", 2400),
 		IngressTrait: traitv1.IngressTrait{
 			Host: "",
+			Path: "/",
 		},
 	}
 }
@@ -104,7 +105,7 @@ func (t *ingressTrait) Apply(e *Environment) error {
 						HTTP: &networkingv1.HTTPIngressRuleValue{
 							Paths: []networkingv1.HTTPIngressPath{
 								{
-									Path:     "/",
+									Path:     t.Path,
 									PathType: &pathType,
 									Backend: networkingv1.IngressBackend{
 										Service: &networkingv1.IngressServiceBackend{


[camel-k] 05/08: chore: Run codegen with ingress trait new options

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d69e4abb87846b882781a17f85f4f1c2ac2a35bd
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Wed Mar 1 12:46:08 2023 +0100

    chore: Run codegen with ingress trait new options
---
 pkg/apis/camel/v1/trait/zz_generated.deepcopy.go        | 16 +++++++++++++++-
 pkg/client/camel/clientset/versioned/fake/register.go   | 14 +++++++-------
 pkg/client/camel/clientset/versioned/scheme/register.go | 14 +++++++-------
 3 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go b/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go
index f8831364e..144e4aa41 100644
--- a/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go
@@ -5,7 +5,9 @@
 
 package trait
 
-import ()
+import (
+	"k8s.io/api/networking/v1"
+)
 
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *AffinityTrait) DeepCopyInto(out *AffinityTrait) {
@@ -348,6 +350,18 @@ func (in *HealthTrait) DeepCopy() *HealthTrait {
 func (in *IngressTrait) DeepCopyInto(out *IngressTrait) {
 	*out = *in
 	in.Trait.DeepCopyInto(&out.Trait)
+	if in.Annotations != nil {
+		in, out := &in.Annotations, &out.Annotations
+		*out = make(map[string]string, len(*in))
+		for key, val := range *in {
+			(*out)[key] = val
+		}
+	}
+	if in.PathType != nil {
+		in, out := &in.PathType, &out.PathType
+		*out = new(v1.PathType)
+		**out = **in
+	}
 	if in.Auto != nil {
 		in, out := &in.Auto, &out.Auto
 		*out = new(bool)
diff --git a/pkg/client/camel/clientset/versioned/fake/register.go b/pkg/client/camel/clientset/versioned/fake/register.go
index 449936a90..327b4c8f0 100644
--- a/pkg/client/camel/clientset/versioned/fake/register.go
+++ b/pkg/client/camel/clientset/versioned/fake/register.go
@@ -40,14 +40,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
 // AddToScheme adds all types of this clientset into the given scheme. This allows composition
 // of clientsets, like in:
 //
-//   import (
-//     "k8s.io/client-go/kubernetes"
-//     clientsetscheme "k8s.io/client-go/kubernetes/scheme"
-//     aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
-//   )
+//	import (
+//	  "k8s.io/client-go/kubernetes"
+//	  clientsetscheme "k8s.io/client-go/kubernetes/scheme"
+//	  aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
+//	)
 //
-//   kclientset, _ := kubernetes.NewForConfig(c)
-//   _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
+//	kclientset, _ := kubernetes.NewForConfig(c)
+//	_ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
 //
 // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
 // correctly.
diff --git a/pkg/client/camel/clientset/versioned/scheme/register.go b/pkg/client/camel/clientset/versioned/scheme/register.go
index 6c3443318..40ca6f0dc 100644
--- a/pkg/client/camel/clientset/versioned/scheme/register.go
+++ b/pkg/client/camel/clientset/versioned/scheme/register.go
@@ -40,14 +40,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
 // AddToScheme adds all types of this clientset into the given scheme. This allows composition
 // of clientsets, like in:
 //
-//   import (
-//     "k8s.io/client-go/kubernetes"
-//     clientsetscheme "k8s.io/client-go/kubernetes/scheme"
-//     aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
-//   )
+//	import (
+//	  "k8s.io/client-go/kubernetes"
+//	  clientsetscheme "k8s.io/client-go/kubernetes/scheme"
+//	  aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
+//	)
 //
-//   kclientset, _ := kubernetes.NewForConfig(c)
-//   _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
+//	kclientset, _ := kubernetes.NewForConfig(c)
+//	_ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
 //
 // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
 // correctly.


[camel-k] 07/08: chore: Rebuild resources

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit dcdbfbb3cb4e5c223c604fb3c9165ad80917d107
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Wed Mar 1 12:49:21 2023 +0100

    chore: Rebuild resources
---
 pkg/resources/resources.go | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go
index a171c0de4..862780b14 100644
--- a/pkg/resources/resources.go
+++ b/pkg/resources/resources.go
@@ -138,23 +138,23 @@ var assets = func() http.FileSystem {
 		"/crd/bases/camel.apache.org_integrationplatforms.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "camel.apache.org_integrationplatforms.yaml",
 			modTime:          time.Time{},
-			uncompressedSize: 168233,
+			uncompressedSize: 170461,
 
-			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\xfd\x73\xdb\x36\xb6\x30\x8e\xff\x9e\xbf\x02\xe3\xce\x9d\x38\x19\x4b\x4e\xba\xb7\xbb\xbd\x7e\xa6\xf3\x3c\xae\x93\xb6\x6e\xde\x7c\x6d\x27\x7b\x77\xda\x4e\x05\x91\x47\x12\x6a\x10\xe0\x05\x40\xd9\xea\x77\xbf\xff\xfb\x67\x70\x00\x90\x94\x44\x82\x94\xe4\xc4\x69\x2b\x76\x66\x37\xb6\x89\xc3\x03\xe0\xe0\xbc\xe1\xbc\x7c\x41\x06\xf7\xf7\x3c\xfa\x82\xbc\x66\x09\x08\x0d\x29\x31\x92\x98\x19\x90\xd3\x9c\x26\x33\x20\x57\x72\x [...]
+			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\x7b\x73\xe3\x36\xb2\x28\xfe\xff\x7c\x0a\x94\x53\xa7\xc6\x33\x65\xc9\x33\xbb\x27\xbb\x39\x3e\x95\xba\xd7\xf1\x4c\x12\x67\x1e\xf6\xb1\x3d\xb3\xbb\x95\xa4\x22\x88\x6c\x49\x88\x41\x80\x07\x00\x65\x2b\xbf\xfd\x7d\xf7\x5b\x68\x00\x24\x25\x91\x20\x25\x79\x1e\x49\xc4\x54\xed\x8e\x6d\xa2\xd9\x00\x1a\xfd\x42\x3f\xbe\x20\x83\x87\x7b\x1e\x7d\x41\x5e\xb3\x04\x84\x86\x94\x18\x49\xcc\x0c\xc8\x69\x4e\x93\x19\x90\x6b\x39\x31\x [...]
 		},
 		"/crd/bases/camel.apache.org_integrations.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "camel.apache.org_integrations.yaml",
 			modTime:          time.Time{},
-			uncompressedSize: 491001,
+			uncompressedSize: 492115,
 
-			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x7b\x73\x1b\x37\x96\x30\x8c\xff\x9f\x4f\x81\x72\x52\x8f\xa4\x8d\x48\xd9\x99\xd9\xa9\x19\xff\xa6\x9e\x94\x56\x96\x13\xfd\x62\xcb\x2a\x4b\x49\x9e\x94\x93\x4d\xc0\x6e\x90\xc4\xa3\x6e\xa0\x17\x40\x53\xe2\xbc\x79\xbf\xfb\x5b\x38\x00\xfa\xc2\x5b\x1f\xb4\x48\xc7\xd9\x6d\x4c\x55\xc6\x14\xd9\xa7\x71\x39\x38\xf7\xcb\xe7\x64\xb4\xbf\xf1\xd9\xe7\xe4\x0d\x4f\x98\xd0\x2c\x25\x46\x12\x33\x67\xe4\xbc\xa0\xc9\x9c\x91\x5b\x39\x [...]
+			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x7b\x73\x1b\x37\x96\x30\x8c\xff\x9f\x4f\x81\x72\x52\x8f\xa4\x8d\x48\xd9\x99\xd9\xa9\x19\xff\xa6\x9e\x94\x56\x96\x13\xfd\x62\xcb\x2a\x4b\x49\x9e\x94\x93\x4d\xc0\x6e\x90\xc4\xa3\x6e\xa0\x17\x40\x53\xe2\xbc\x79\xbf\xfb\x5b\x38\x00\xfa\xc2\x5b\x1f\xb4\x48\xc7\xd9\x6d\x4c\x55\xc6\x14\xd9\xa7\x71\x39\x38\xf7\xcb\xe7\x64\xb4\xbf\xf1\xd9\xe7\xe4\x0d\x4f\x98\xd0\x2c\x25\x46\x12\x33\x67\xe4\xbc\xa0\xc9\x9c\x91\x5b\x39\x [...]
 		},
 		"/crd/bases/camel.apache.org_kameletbindings.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "camel.apache.org_kameletbindings.yaml",
 			modTime:          time.Time{},
-			uncompressedSize: 567387,
+			uncompressedSize: 568581,
 
-			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x79\x73\x1b\x37\xd6\x28\x8c\xff\xef\x4f\x81\x92\x53\x57\xd2\x13\x91\xb2\x33\x4b\xcd\xf8\x37\x75\x53\x1a\x59\x76\xf4\x8b\x2d\xb3\x2c\x25\xb9\x29\x27\x4f\x02\x76\x83\x24\xae\xba\x81\x7e\x00\x34\x25\xe6\xf5\xfb\xdd\xdf\xc2\x01\xd0\x0b\x37\xe1\x34\x25\x8d\x3c\xd3\x98\xaa\x8c\x49\xb1\x4f\x63\x3b\xfb\xf6\x9c\x0c\xee\x6f\x3c\x7b\x4e\xde\xf1\x84\x09\xcd\x52\x62\x24\x31\x33\x46\x4e\x0a\x9a\xcc\x18\xb9\x94\x13\x73\x43\x [...]
+			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x79\x73\x1b\x37\xd6\x28\x8c\xff\xef\x4f\x81\x92\x53\x57\xd2\x13\x91\xb2\x33\x4b\xcd\xf8\x37\x75\x53\x1a\x59\x76\xf4\x8b\x2d\xb3\x2c\x25\xb9\x29\x27\x4f\x02\x76\x83\x24\xae\xba\x81\x7e\x00\x34\x25\xe6\xf5\xfb\xdd\xdf\xc2\x01\xd0\x0b\x37\xe1\x34\x25\x8d\x3c\xd3\x98\xaa\x8c\x49\xb1\x4f\x63\x3b\xfb\xf6\x9c\x0c\xee\x6f\x3c\x7b\x4e\xde\xf1\x84\x09\xcd\x52\x62\x24\x31\x33\x46\x4e\x0a\x9a\xcc\x18\xb9\x94\x13\x73\x43\x [...]
 		},
 		"/crd/bases/camel.apache.org_kamelets.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "camel.apache.org_kamelets.yaml",
@@ -611,9 +611,9 @@ var assets = func() http.FileSystem {
 		"/traits.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "traits.yaml",
 			modTime:          time.Time{},
-			uncompressedSize: 64078,
+			uncompressedSize: 64725,
 
-			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\xff\x77\x1b\x37\x92\x20\xfe\xbb\xff\x0a\x3c\xee\x67\x9f\x24\x7f\x44\x4a\xc9\x6c\x66\xb3\xba\xf3\xce\x29\x8e\x33\xa3\x24\xb6\x75\x96\x92\xb9\x79\x3e\xbf\x21\xd8\x0d\x92\x30\x9b\x40\x0f\x80\x96\xcc\xdc\xde\xff\x7e\x0f\x55\x85\x2f\xdd\x6c\x8a\xa4\x2c\x65\x47\x3b\xd9\x7d\x6f\x62\x49\x8d\x42\xa1\x50\x28\x14\xea\xab\x33\x5c\x3a\x7b\xf6\x6c\xc8\x14\x5f\x8a\x33\xf6\x3b\x5b\xf0\x4a\x3c\x63\xac\xae\xb8\x9b\x6a\xb3\x3c\x [...]
+			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x7d\xfd\x77\x1b\x37\x92\xe0\xef\xfe\x2b\xf0\xb8\xb7\x4f\x92\x4f\x24\x95\xcc\x66\x36\xab\x3b\xef\x9c\xe2\x38\x19\x25\xfe\xd0\x59\x4a\x66\xe7\xf9\xfc\x86\x60\x37\x48\xc2\x6c\x02\x3d\x00\x5a\x32\x73\x73\xff\xfb\x3d\x54\x15\x3e\xba\xd9\x94\x48\x5b\xca\x8e\x76\x32\xf3\x5e\x2c\x92\xdd\x85\x42\xa1\x50\x28\xd4\xa7\x33\x5c\x3a\x7b\xfa\x64\xc8\x14\x5f\x89\x53\xf6\x3b\x5b\xf0\x4a\x3c\x61\xac\xae\xb8\x9b\x69\xb3\x3a\x65\x33\x [...]
 		},
 	}
 	fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{


[camel-k] 04/08: chore: Regen CRDs with ingress trait new options

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 27a082581ebcc154c7a4d93594646c6eba27f38d
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Wed Mar 1 12:44:53 2023 +0100

    chore: Regen CRDs with ingress trait new options
---
 .../camel.apache.org_integrationplatforms.yaml     | 40 ++++++++++++++++++++++
 .../crd/bases/camel.apache.org_integrations.yaml   | 20 +++++++++++
 .../bases/camel.apache.org_kameletbindings.yaml    | 20 +++++++++++
 helm/camel-k/crds/crd-integration-platform.yaml    | 40 ++++++++++++++++++++++
 helm/camel-k/crds/crd-integration.yaml             | 20 +++++++++++
 helm/camel-k/crds/crd-kamelet-binding.yaml         | 20 +++++++++++
 6 files changed, 160 insertions(+)

diff --git a/config/crd/bases/camel.apache.org_integrationplatforms.yaml b/config/crd/bases/camel.apache.org_integrationplatforms.yaml
index 728b715e2..cc4bdc10f 100644
--- a/config/crd/bases/camel.apache.org_integrationplatforms.yaml
+++ b/config/crd/bases/camel.apache.org_integrationplatforms.yaml
@@ -800,6 +800,13 @@ spec:
                   ingress:
                     description: The configuration of Ingress trait
                     properties:
+                      annotations:
+                        additionalProperties:
+                          type: string
+                        description: 'The annotations added to the ingress. This can
+                          be used to set controller specific annotations, e.g., when
+                          using the NGINX Ingress controller: See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md'
+                        type: object
                       auto:
                         description: To automatically add an ingress whenever the
                           integration uses an HTTP endpoint consumer.
@@ -816,6 +823,19 @@ spec:
                       host:
                         description: To configure the host exposed by the ingress.
                         type: string
+                      path:
+                        description: To configure the path exposed by the ingress
+                          (default `/`).
+                        type: string
+                      pathType:
+                        description: To configure the path type exposed by the ingress.
+                          One of `Exact`, `Prefix`, `ImplementationSpecific` (default
+                          to `Prefix`).
+                        enum:
+                        - Exact
+                        - Prefix
+                        - ImplementationSpecific
+                        type: string
                     type: object
                   istio:
                     description: The configuration of Istio trait
@@ -2363,6 +2383,13 @@ spec:
                   ingress:
                     description: The configuration of Ingress trait
                     properties:
+                      annotations:
+                        additionalProperties:
+                          type: string
+                        description: 'The annotations added to the ingress. This can
+                          be used to set controller specific annotations, e.g., when
+                          using the NGINX Ingress controller: See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md'
+                        type: object
                       auto:
                         description: To automatically add an ingress whenever the
                           integration uses an HTTP endpoint consumer.
@@ -2379,6 +2406,19 @@ spec:
                       host:
                         description: To configure the host exposed by the ingress.
                         type: string
+                      path:
+                        description: To configure the path exposed by the ingress
+                          (default `/`).
+                        type: string
+                      pathType:
+                        description: To configure the path type exposed by the ingress.
+                          One of `Exact`, `Prefix`, `ImplementationSpecific` (default
+                          to `Prefix`).
+                        enum:
+                        - Exact
+                        - Prefix
+                        - ImplementationSpecific
+                        type: string
                     type: object
                   istio:
                     description: The configuration of Istio trait
diff --git a/config/crd/bases/camel.apache.org_integrations.yaml b/config/crd/bases/camel.apache.org_integrations.yaml
index 51c6ba51f..51269d0fa 100644
--- a/config/crd/bases/camel.apache.org_integrations.yaml
+++ b/config/crd/bases/camel.apache.org_integrations.yaml
@@ -6577,6 +6577,13 @@ spec:
                   ingress:
                     description: The configuration of Ingress trait
                     properties:
+                      annotations:
+                        additionalProperties:
+                          type: string
+                        description: 'The annotations added to the ingress. This can
+                          be used to set controller specific annotations, e.g., when
+                          using the NGINX Ingress controller: See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md'
+                        type: object
                       auto:
                         description: To automatically add an ingress whenever the
                           integration uses an HTTP endpoint consumer.
@@ -6593,6 +6600,19 @@ spec:
                       host:
                         description: To configure the host exposed by the ingress.
                         type: string
+                      path:
+                        description: To configure the path exposed by the ingress
+                          (default `/`).
+                        type: string
+                      pathType:
+                        description: To configure the path type exposed by the ingress.
+                          One of `Exact`, `Prefix`, `ImplementationSpecific` (default
+                          to `Prefix`).
+                        enum:
+                        - Exact
+                        - Prefix
+                        - ImplementationSpecific
+                        type: string
                     type: object
                   istio:
                     description: The configuration of Istio trait
diff --git a/config/crd/bases/camel.apache.org_kameletbindings.yaml b/config/crd/bases/camel.apache.org_kameletbindings.yaml
index e8f8ae8c5..f7b5c6205 100644
--- a/config/crd/bases/camel.apache.org_kameletbindings.yaml
+++ b/config/crd/bases/camel.apache.org_kameletbindings.yaml
@@ -6859,6 +6859,13 @@ spec:
                       ingress:
                         description: The configuration of Ingress trait
                         properties:
+                          annotations:
+                            additionalProperties:
+                              type: string
+                            description: 'The annotations added to the ingress. This
+                              can be used to set controller specific annotations,
+                              e.g., when using the NGINX Ingress controller: See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md'
+                            type: object
                           auto:
                             description: To automatically add an ingress whenever
                               the integration uses an HTTP endpoint consumer.
@@ -6875,6 +6882,19 @@ spec:
                           host:
                             description: To configure the host exposed by the ingress.
                             type: string
+                          path:
+                            description: To configure the path exposed by the ingress
+                              (default `/`).
+                            type: string
+                          pathType:
+                            description: To configure the path type exposed by the
+                              ingress. One of `Exact`, `Prefix`, `ImplementationSpecific`
+                              (default to `Prefix`).
+                            enum:
+                            - Exact
+                            - Prefix
+                            - ImplementationSpecific
+                            type: string
                         type: object
                       istio:
                         description: The configuration of Istio trait
diff --git a/helm/camel-k/crds/crd-integration-platform.yaml b/helm/camel-k/crds/crd-integration-platform.yaml
index 728b715e2..cc4bdc10f 100644
--- a/helm/camel-k/crds/crd-integration-platform.yaml
+++ b/helm/camel-k/crds/crd-integration-platform.yaml
@@ -800,6 +800,13 @@ spec:
                   ingress:
                     description: The configuration of Ingress trait
                     properties:
+                      annotations:
+                        additionalProperties:
+                          type: string
+                        description: 'The annotations added to the ingress. This can
+                          be used to set controller specific annotations, e.g., when
+                          using the NGINX Ingress controller: See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md'
+                        type: object
                       auto:
                         description: To automatically add an ingress whenever the
                           integration uses an HTTP endpoint consumer.
@@ -816,6 +823,19 @@ spec:
                       host:
                         description: To configure the host exposed by the ingress.
                         type: string
+                      path:
+                        description: To configure the path exposed by the ingress
+                          (default `/`).
+                        type: string
+                      pathType:
+                        description: To configure the path type exposed by the ingress.
+                          One of `Exact`, `Prefix`, `ImplementationSpecific` (default
+                          to `Prefix`).
+                        enum:
+                        - Exact
+                        - Prefix
+                        - ImplementationSpecific
+                        type: string
                     type: object
                   istio:
                     description: The configuration of Istio trait
@@ -2363,6 +2383,13 @@ spec:
                   ingress:
                     description: The configuration of Ingress trait
                     properties:
+                      annotations:
+                        additionalProperties:
+                          type: string
+                        description: 'The annotations added to the ingress. This can
+                          be used to set controller specific annotations, e.g., when
+                          using the NGINX Ingress controller: See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md'
+                        type: object
                       auto:
                         description: To automatically add an ingress whenever the
                           integration uses an HTTP endpoint consumer.
@@ -2379,6 +2406,19 @@ spec:
                       host:
                         description: To configure the host exposed by the ingress.
                         type: string
+                      path:
+                        description: To configure the path exposed by the ingress
+                          (default `/`).
+                        type: string
+                      pathType:
+                        description: To configure the path type exposed by the ingress.
+                          One of `Exact`, `Prefix`, `ImplementationSpecific` (default
+                          to `Prefix`).
+                        enum:
+                        - Exact
+                        - Prefix
+                        - ImplementationSpecific
+                        type: string
                     type: object
                   istio:
                     description: The configuration of Istio trait
diff --git a/helm/camel-k/crds/crd-integration.yaml b/helm/camel-k/crds/crd-integration.yaml
index 51c6ba51f..51269d0fa 100644
--- a/helm/camel-k/crds/crd-integration.yaml
+++ b/helm/camel-k/crds/crd-integration.yaml
@@ -6577,6 +6577,13 @@ spec:
                   ingress:
                     description: The configuration of Ingress trait
                     properties:
+                      annotations:
+                        additionalProperties:
+                          type: string
+                        description: 'The annotations added to the ingress. This can
+                          be used to set controller specific annotations, e.g., when
+                          using the NGINX Ingress controller: See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md'
+                        type: object
                       auto:
                         description: To automatically add an ingress whenever the
                           integration uses an HTTP endpoint consumer.
@@ -6593,6 +6600,19 @@ spec:
                       host:
                         description: To configure the host exposed by the ingress.
                         type: string
+                      path:
+                        description: To configure the path exposed by the ingress
+                          (default `/`).
+                        type: string
+                      pathType:
+                        description: To configure the path type exposed by the ingress.
+                          One of `Exact`, `Prefix`, `ImplementationSpecific` (default
+                          to `Prefix`).
+                        enum:
+                        - Exact
+                        - Prefix
+                        - ImplementationSpecific
+                        type: string
                     type: object
                   istio:
                     description: The configuration of Istio trait
diff --git a/helm/camel-k/crds/crd-kamelet-binding.yaml b/helm/camel-k/crds/crd-kamelet-binding.yaml
index e8f8ae8c5..f7b5c6205 100644
--- a/helm/camel-k/crds/crd-kamelet-binding.yaml
+++ b/helm/camel-k/crds/crd-kamelet-binding.yaml
@@ -6859,6 +6859,13 @@ spec:
                       ingress:
                         description: The configuration of Ingress trait
                         properties:
+                          annotations:
+                            additionalProperties:
+                              type: string
+                            description: 'The annotations added to the ingress. This
+                              can be used to set controller specific annotations,
+                              e.g., when using the NGINX Ingress controller: See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md'
+                            type: object
                           auto:
                             description: To automatically add an ingress whenever
                               the integration uses an HTTP endpoint consumer.
@@ -6875,6 +6882,19 @@ spec:
                           host:
                             description: To configure the host exposed by the ingress.
                             type: string
+                          path:
+                            description: To configure the path exposed by the ingress
+                              (default `/`).
+                            type: string
+                          pathType:
+                            description: To configure the path type exposed by the
+                              ingress. One of `Exact`, `Prefix`, `ImplementationSpecific`
+                              (default to `Prefix`).
+                            enum:
+                            - Exact
+                            - Prefix
+                            - ImplementationSpecific
+                            type: string
                         type: object
                       istio:
                         description: The configuration of Istio trait


[camel-k] 06/08: chore: Regen docs with ingress trait new options

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit af0a87235d95069f4b48977525e1e132dc02b8f9
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Wed Mar 1 12:46:56 2023 +0100

    chore: Regen docs with ingress trait new options
---
 docs/modules/ROOT/partials/apis/camel-k-crds.adoc | 24 +++++++++++++++++++++++
 docs/modules/traits/pages/ingress.adoc            | 15 ++++++++++++++
 resources/traits.yaml                             | 11 +++++++++++
 3 files changed, 50 insertions(+)

diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
index 1b9414e5a..bf4937a00 100644
--- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
+++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
@@ -4504,6 +4504,15 @@ It's enabled by default whenever a Service is added to the integration (through
 
 
 
+|`annotations` +
+map[string]string
+|
+
+
+The annotations added to the ingress.
+This can be used to set controller specific annotations, e.g., when using the NGINX Ingress controller:
+See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md
+
 |`host` +
 string
 |
@@ -4511,6 +4520,21 @@ string
 
 To configure the host exposed by the ingress.
 
+|`path` +
+string
+|
+
+
+To configure the path exposed by the ingress (default `/`).
+
+|`pathType` +
+*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#pathtype-v1-networking[Kubernetes networking/v1.PathType]*
+|
+
+
+To configure the path type exposed by the ingress.
+One of `Exact`, `Prefix`, `ImplementationSpecific` (default to `Prefix`).
+
 |`auto` +
 bool
 |
diff --git a/docs/modules/traits/pages/ingress.adoc b/docs/modules/traits/pages/ingress.adoc
index ae0f8c112..ed3a5abb5 100755
--- a/docs/modules/traits/pages/ingress.adoc
+++ b/docs/modules/traits/pages/ingress.adoc
@@ -28,10 +28,25 @@ The following configuration options are available:
 | bool
 | Can be used to enable or disable a trait. All traits share this common property.
 
+| ingress.annotations
+| map[string]string
+| The annotations added to the ingress.
+This can be used to set controller specific annotations, e.g., when using the NGINX Ingress controller:
+See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md
+
 | ingress.host
 | string
 | To configure the host exposed by the ingress.
 
+| ingress.path
+| string
+| To configure the path exposed by the ingress (default `/`).
+
+| ingress.path-type
+| k8s.io/api/networking/v1.PathType
+| To configure the path type exposed by the ingress.
+One of `Exact`, `Prefix`, `ImplementationSpecific` (default to `Prefix`).
+
 | ingress.auto
 | bool
 | To automatically add an ingress whenever the integration uses an HTTP endpoint consumer.
diff --git a/resources/traits.yaml b/resources/traits.yaml
index 697d8c523..f2a4d85f6 100755
--- a/resources/traits.yaml
+++ b/resources/traits.yaml
@@ -643,9 +643,20 @@ traits:
     type: bool
     description: Can be used to enable or disable a trait. All traits share this common
       property.
+  - name: annotations
+    type: map[string]string
+    description: 'The annotations added to the ingress. This can be used to set controller
+      specific annotations, e.g., when using the NGINX Ingress controller: See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md'
   - name: host
     type: string
     description: To configure the host exposed by the ingress.
+  - name: path
+    type: string
+    description: To configure the path exposed by the ingress (default `/`).
+  - name: path-type
+    type: k8s.io/api/networking/v1.PathType
+    description: To configure the path type exposed by the ingress. One of `Exact`,
+      `Prefix`, `ImplementationSpecific` (default to `Prefix`).
   - name: auto
     type: bool
     description: To automatically add an ingress whenever the integration uses an


[camel-k] 02/08: feat: Add annotations option to ingress trait

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6edfeaf42759679a884ee9d633ecefc3261aa887
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Feb 28 15:17:24 2023 +0100

    feat: Add annotations option to ingress trait
---
 pkg/apis/camel/v1/trait/ingress.go |  4 ++++
 pkg/trait/ingress.go               | 10 ++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/pkg/apis/camel/v1/trait/ingress.go b/pkg/apis/camel/v1/trait/ingress.go
index 3d93f4aa1..6a0ee71c6 100644
--- a/pkg/apis/camel/v1/trait/ingress.go
+++ b/pkg/apis/camel/v1/trait/ingress.go
@@ -25,6 +25,10 @@ package trait
 // +camel-k:trait=ingress.
 type IngressTrait struct {
 	Trait `property:",squash" json:",inline"`
+	// The annotations added to the ingress.
+	// This can be used to set controller specific annotations, e.g., when using the NGINX Ingress controller:
+	// See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md
+	Annotations map[string]string `property:"annotations" json:"annotations,omitempty"`
 	// To configure the host exposed by the ingress.
 	Host string `property:"host" json:"host,omitempty"`
 	// To configure the path exposed by the ingress (default `/`).
diff --git a/pkg/trait/ingress.go b/pkg/trait/ingress.go
index ea9eb0a44..8f0243cfa 100644
--- a/pkg/trait/ingress.go
+++ b/pkg/trait/ingress.go
@@ -39,8 +39,9 @@ func newIngressTrait() Trait {
 	return &ingressTrait{
 		BaseTrait: NewBaseTrait("ingress", 2400),
 		IngressTrait: traitv1.IngressTrait{
-			Host: "",
-			Path: "/",
+			Annotations: map[string]string{},
+			Host:        "",
+			Path:        "/",
 		},
 	}
 }
@@ -94,8 +95,9 @@ func (t *ingressTrait) Apply(e *Environment) error {
 			APIVersion: networkingv1.SchemeGroupVersion.String(),
 		},
 		ObjectMeta: metav1.ObjectMeta{
-			Name:      service.Name,
-			Namespace: service.Namespace,
+			Name:        service.Name,
+			Namespace:   service.Namespace,
+			Annotations: t.Annotations,
 		},
 		Spec: networkingv1.IngressSpec{
 			Rules: []networkingv1.IngressRule{