Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ linters:
settings:
goconst:
min-len: 4
min-occurrences: 5
min-occurrences: 10
ignore-calls: true
numbers: false
lll:
Expand Down
19 changes: 9 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/apache/camel-k/v2

go 1.25.9
go 1.26.2

require (
dario.cat/mergo v1.0.2
Expand Down Expand Up @@ -40,17 +40,17 @@ require (
golang.org/x/text v0.36.0
golang.org/x/time v0.15.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.35.4
k8s.io/apimachinery v0.35.4
k8s.io/cli-runtime v0.35.3
k8s.io/client-go v0.35.4
k8s.io/api v0.36.0
k8s.io/apimachinery v0.36.0
k8s.io/cli-runtime v0.36.0
k8s.io/client-go v0.36.0
k8s.io/gengo v0.0.0-20251215205346-5ee0d033ba5b
k8s.io/klog/v2 v2.140.0
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2
knative.dev/eventing v0.49.0
knative.dev/pkg v0.0.0-20260422015212-ec452872dcc1
knative.dev/serving v0.49.0
sigs.k8s.io/controller-runtime v0.23.3
sigs.k8s.io/controller-runtime v0.24.0
sigs.k8s.io/gateway-api v1.5.1
sigs.k8s.io/structured-merge-diff/v6 v6.4.0
)
Expand Down Expand Up @@ -94,7 +94,6 @@ require (
github.com/go-openapi/swag/yamlutils v0.25.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/gnostic-models v0.7.1 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/go-containerregistry v0.20.3 // indirect
Expand All @@ -112,7 +111,6 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pjbgf/sha1cd v0.3.2 // indirect
Expand Down Expand Up @@ -143,13 +141,14 @@ require (
golang.org/x/sys v0.43.0 // indirect
golang.org/x/tools v0.44.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.35.4 // indirect
k8s.io/apiextensions-apiserver v0.36.0 // indirect
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect
k8s.io/streaming v0.36.0 // indirect
knative.dev/networking v0.0.0-20260422140718-e9578ef11562 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
Expand Down
38 changes: 18 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/gnostic-models v0.7.1 h1:SisTfuFKJSKM5CPZkffwi6coztzzeYUhc3v4yxLWH8c=
github.com/google/gnostic-models v0.7.1/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
Expand Down Expand Up @@ -216,8 +214,6 @@ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFd
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ=
Expand Down Expand Up @@ -445,8 +441,8 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI=
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand All @@ -468,25 +464,27 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.35.4 h1:P7nFYKl5vo9AGUp1Z+Pmd3p2tA7bX2wbFWCvDeRv988=
k8s.io/api v0.35.4/go.mod h1:yl4lqySWOgYJJf9RERXKUwE9g2y+CkuwG+xmcOK8wXU=
k8s.io/apiextensions-apiserver v0.35.4 h1:HeP+Upp7ItdvnyGmub0yoix+2z5+ev4M5cE5TCgtOUU=
k8s.io/apiextensions-apiserver v0.35.4/go.mod h1:ogQlk+stIE8mnoRthSYCwlOS12fVqgWFiErMwPaXA7c=
k8s.io/apimachinery v0.35.4 h1:xtdom9RG7e+yDp71uoXoJDWEE2eOiHgeO4GdBzwWpds=
k8s.io/apimachinery v0.35.4/go.mod h1:NNi1taPOpep0jOj+oRha3mBJPqvi0hGdaV8TCqGQ+cc=
k8s.io/apiserver v0.35.4 h1:vtuFqNFmF9bPRdHDL2lpK6qCTPWDreZJL4LRPwVM6ho=
k8s.io/apiserver v0.35.4/go.mod h1:JnBcb+J8kFXKpZkgcbcUnPBBHi4qgBii1I7dLxFY/oo=
k8s.io/cli-runtime v0.35.3 h1:UZq4ipNimtzBmhN7PPKbfAdqo8quK0H0UdGl6qAQnqI=
k8s.io/cli-runtime v0.35.3/go.mod h1:O7MUmCqcKSd5xI+O5X7/pRkB5l0O2NIhOdUVwbHLXu4=
k8s.io/client-go v0.35.4 h1:DN6fyaGuzK64UvnKO5fOA6ymSjvfGAnCAHAR0C66kD8=
k8s.io/client-go v0.35.4/go.mod h1:2Pg9WpsS4NeOpoYTfHHfMxBG8zFMSAUi4O/qoiJC3nY=
k8s.io/api v0.36.0 h1:SgqDhZzHdOtMk40xVSvCXkP9ME0H05hPM3p9AB1kL80=
k8s.io/api v0.36.0/go.mod h1:m1LVrGPNYax5NBHdO+QuAedXyuzTt4RryI/qnmNvs34=
k8s.io/apiextensions-apiserver v0.36.0 h1:Wt7E8J+VBCbj4FjiBfDTK/neXDDjyJVJc7xfuOHImZ0=
k8s.io/apiextensions-apiserver v0.36.0/go.mod h1:kGDjH0msuiIB3tgsYRV0kS9GqpMYMUsQ3GHv7TApyug=
k8s.io/apimachinery v0.36.0 h1:jZyPzhd5Z+3h9vJLt0z9XdzW9VzNzWAUw+P1xZ9PXtQ=
k8s.io/apimachinery v0.36.0/go.mod h1:FklypaRJt6n5wUIwWXIP6GJlIpUizTgfo1T/As+Tyxc=
k8s.io/apiserver v0.36.0 h1:Jg5OFAENUACByUCg15CmhZAYrr5ZyJ+jodyA1mHl3YE=
k8s.io/apiserver v0.36.0/go.mod h1:mHvwdHf+qKEm+1/hYm756SV+oREOKSPnsjagOpx6Vho=
k8s.io/cli-runtime v0.36.0 h1:HNxciQpQMMOKS0/GiUXcKDyA6J2FDILJj9NmP2BZrTg=
k8s.io/cli-runtime v0.36.0/go.mod h1:KObkknK9Ro5LYX+1RdiKc7C8CvGg4aX+V/Zv+E8WPHA=
k8s.io/client-go v0.36.0 h1:pOYi7C4RHChYjMiHpZSpSbIM6ZxVbRXBy7CuiIwqA3c=
k8s.io/client-go v0.36.0/go.mod h1:ZKKcpwF0aLYfkHFCjillCKaTK/yBkEDHTDXCFY6AS9Y=
k8s.io/gengo v0.0.0-20251215205346-5ee0d033ba5b h1:X0Afwan8Q1l7bMcNgh6DAah2jKCQ2irT7EoAXIChFqk=
k8s.io/gengo v0.0.0-20251215205346-5ee0d033ba5b/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=
k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0=
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a h1:xCeOEAOoGYl2jnJoHkC3hkbPJgdATINPMAxaynU2Ovg=
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a/go.mod h1:uGBT7iTA6c6MvqUvSXIaYZo9ukscABYi2btjhvgKGZ0=
k8s.io/streaming v0.36.0 h1:agnTxU+NFulUrtYzXUGKO3ndEa8jKwht1Kwn9nu9x+4=
k8s.io/streaming v0.36.0/go.mod h1:z6fV3D+NVkoeqRMtWwlUZK6U17SY/LqNzOxWL6GyR/s=
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 h1:AZYQSJemyQB5eRxqcPky+/7EdBj0xi3g0ZcxxJ7vbWU=
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk=
knative.dev/eventing v0.49.0 h1:Gole9D1AXnZVBCzoqO00/5n8MApy8rRJpTHYXvUFfQc=
Expand All @@ -497,8 +495,8 @@ knative.dev/pkg v0.0.0-20260422015212-ec452872dcc1 h1:bO5X2bugzMqoVltm2n16mHpAdp
knative.dev/pkg v0.0.0-20260422015212-ec452872dcc1/go.mod h1:EZeB2nBW4QcpZuCPB5a/UnoVIH2N+5z5fwNw1PUeqMg=
knative.dev/serving v0.49.0 h1:5B1JsytwZ+5bh9vOCNnu4GQJ/m6oj61Z/rVKziAY6MA=
knative.dev/serving v0.49.0/go.mod h1:KXvVnXohxsbE3rCRbr1TZlxeC20qIzhVckDwbsgLWPI=
sigs.k8s.io/controller-runtime v0.23.3 h1:VjB/vhoPoA9l1kEKZHBMnQF33tdCLQKJtydy4iqwZ80=
sigs.k8s.io/controller-runtime v0.23.3/go.mod h1:B6COOxKptp+YaUT5q4l6LqUJTRpizbgf9KSRNdQGns0=
sigs.k8s.io/controller-runtime v0.24.0 h1:Ck6N2LdS8Lovy1o25BB4r1xjvLEKUl1s2o9kU+KWDE4=
sigs.k8s.io/controller-runtime v0.24.0/go.mod h1:vFkfY5fGt5xAC/sKb8IBFKgWPNKG9OUG29dR8Y2wImw=
sigs.k8s.io/gateway-api v1.5.1 h1:RqVRIlkhLhUO8wOHKTLnTJA6o/1un4po4/6M1nRzdd0=
sigs.k8s.io/gateway-api v1.5.1/go.mod h1:GvCETiaMAlLym5CovLxGjS0NysqFk3+Yuq3/rh6QL2o=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/camel/v1/camelcatalog_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import (

const (
// CamelCatalogKind -- .
CamelCatalogKind string = "CamelCatalog"
CamelCatalogKind string = "CamelCatalog"
MavenQuarkusGroupID string = "org.apache.camel.quarkus"
)

// +genclient
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/camel/v1/camelcatalog_types_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (c *CamelCatalogSpec) HasCapability(capability string) bool {
// GetDependencyID returns a Camel K recognizable maven dependency for the artifact.
func (in *CamelArtifact) GetDependencyID() string {
switch {
case in.GroupID == "org.apache.camel.quarkus" && strings.HasPrefix(in.ArtifactID, "camel-quarkus-"):
case in.GroupID == MavenQuarkusGroupID && strings.HasPrefix(in.ArtifactID, "camel-quarkus-"):
return "camel:" + in.ArtifactID[14:]
case in.Version == "":
return "mvn:" + in.GroupID + ":" + in.ArtifactID
Expand Down
5 changes: 2 additions & 3 deletions pkg/cmd/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"github.com/spf13/cobra"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/ptr"
)

func newCmdDebug(rootCmdOptions *RootCmdOptions) (*cobra.Command, *debugCmdOptions) {
Expand Down Expand Up @@ -145,8 +144,8 @@ func (o *debugCmdOptions) toggle(it *v1.Integration, active bool) *v1.Integratio
jvmTrait := it.Spec.Traits.JVM

if active {
jvmTrait.Debug = ptr.To(true)
jvmTrait.DebugSuspend = ptr.To(o.Suspend)
jvmTrait.Debug = new(true)
jvmTrait.DebugSuspend = new(o.Suspend)
} else {
jvmTrait.Debug = nil
jvmTrait.DebugSuspend = nil
Expand Down
4 changes: 1 addition & 3 deletions pkg/cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,7 @@ func clone(dst any, src any) error {
func fieldByMapstructureTagName(target reflect.Value, tagName string) (reflect.StructField, bool) {
pl := p.NewClient()

for i := range target.Type().NumField() {
f := target.Type().Field(i)

for f := range target.Type().Fields() {
tag, ok := f.Tag.Lookup(MapstructureTagName)
if !ok {
continue
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/integration/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func getIntegrationSecretAndConfigmapResourceVersions(ctx context.Context, clien
if conf.StorageType() == utilResource.StorageTypeConfigmap {
cm := corev1.ConfigMap{
TypeMeta: metav1.TypeMeta{
Kind: "ConfigMap",
Kind: corev1.ResourceConfigMaps.String(),
APIVersion: corev1.SchemeGroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -347,7 +347,7 @@ func getIntegrationSecretAndConfigmapResourceVersions(ctx context.Context, clien
} else if conf.StorageType() == utilResource.StorageTypeSecret {
sec := corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
Kind: corev1.ResourceSecrets.String(),
APIVersion: corev1.SchemeGroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Expand Down
9 changes: 6 additions & 3 deletions pkg/controller/integrationplatform/kamelets.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"strings"

v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
"k8s.io/utils/ptr"

"github.com/apache/camel-k/v2/pkg/client"
"github.com/apache/camel-k/v2/pkg/util"
Expand Down Expand Up @@ -77,9 +76,13 @@ func prepareKameletDirectory() (string, error) {
}
// If the directory exists, it is likely a leftover from any previous Kamelet
// catalog installation. We should remove to be able to proceed
//
//nolint:gosec // deprecated code to be removed soon
if err := os.RemoveAll(kameletDir); err != nil {
return kameletDirEnv, err
}
//
//nolint:gosec // deprecated code to be removed soon
err := os.MkdirAll(kameletDir, os.ModePerm)

return kameletDir, err
Expand Down Expand Up @@ -239,8 +242,8 @@ func loadKamelet(path string, platform *v1.IntegrationPlatform) (*v1.Kamelet, er
Kind: platform.Kind,
Name: platform.Name,
UID: platform.UID,
Controller: ptr.To(true),
BlockOwnerDeletion: ptr.To(true),
Controller: new(true),
BlockOwnerDeletion: new(true),
},
}
kamelet.SetOwnerReferences(references)
Expand Down
14 changes: 7 additions & 7 deletions pkg/controller/integrationplatform/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func (action *monitorAction) addPlainQuarkusCatalog(ctx context.Context, catalog
clonedCatalog.Spec.Runtime.Provider = v1.RuntimeProviderPlainQuarkus
clonedCatalog.Spec.Runtime.Dependencies = []v1.MavenArtifact{
{
GroupID: "org.apache.camel.quarkus",
GroupID: v1.MavenQuarkusGroupID,
ArtifactID: "camel-quarkus-core",
},
}
Expand All @@ -254,7 +254,7 @@ func (action *monitorAction) addPlainQuarkusCatalog(ctx context.Context, catalog
clonedCatalog.Spec.Runtime.Capabilities["knative"] = v1.Capability{
Dependencies: []v1.MavenArtifact{
{
GroupID: "org.apache.camel.quarkus",
GroupID: v1.MavenQuarkusGroupID,
ArtifactID: "camel-quarkus-knative",
},
},
Expand All @@ -263,15 +263,15 @@ func (action *monitorAction) addPlainQuarkusCatalog(ctx context.Context, catalog
clonedCatalog.Spec.Runtime.Capabilities["master"] = v1.Capability{
Dependencies: []v1.MavenArtifact{
{
GroupID: "org.apache.camel.quarkus",
GroupID: v1.MavenQuarkusGroupID,
ArtifactID: "camel-quarkus-master",
},
{
GroupID: "org.apache.camel.quarkus",
GroupID: v1.MavenQuarkusGroupID,
ArtifactID: "camel-quarkus-kubernetes",
},
{
GroupID: "org.apache.camel.quarkus",
GroupID: v1.MavenQuarkusGroupID,
ArtifactID: "camel-quarkus-kubernetes-cluster-service",
},
},
Expand All @@ -283,11 +283,11 @@ func (action *monitorAction) addPlainQuarkusCatalog(ctx context.Context, catalog
clonedCatalog.Spec.Runtime.Capabilities["jolokia"] = v1.Capability{
Dependencies: []v1.MavenArtifact{
{
GroupID: "org.apache.camel.quarkus",
GroupID: v1.MavenQuarkusGroupID,
ArtifactID: "camel-quarkus-jaxb",
},
{
GroupID: "org.apache.camel.quarkus",
GroupID: v1.MavenQuarkusGroupID,
ArtifactID: "camel-quarkus-management",
},
{
Expand Down
4 changes: 2 additions & 2 deletions pkg/trait/camel.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (t *camelTrait) computeUserProperties(e *Environment) []ctrl.Object {
var userPropertiesSb238 strings.Builder
for _, prop := range e.collectConfigurationPairs("property") {
// properties in resource configuration are expected to be pre-encoded using properties format
userPropertiesSb238.WriteString(fmt.Sprintf("%s=%s\n", prop.Name, prop.Value))
fmt.Fprintf(&userPropertiesSb238, "%s=%s\n", prop.Name, prop.Value)
}
userProperties += userPropertiesSb238.String()

Expand All @@ -248,7 +248,7 @@ func (t *camelTrait) computeUserProperties(e *Environment) []ctrl.Object {
var userPropertiesSb245 strings.Builder
for _, prop := range t.Properties {
k, v := property.SplitPropertyFileEntry(prop)
userPropertiesSb245.WriteString(fmt.Sprintf("%s=%s\n", k, v))
fmt.Fprintf(&userPropertiesSb245, "%s=%s\n", k, v)
}
userProperties += userPropertiesSb245.String()
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/trait/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (t *containerTrait) Configure(e *Environment) (bool, *TraitCondition, error
if ptr.Deref(t.Auto, true) {
if t.Expose == nil {
if e.Resources.GetServiceForIntegration(e.Integration) != nil {
t.Expose = ptr.To(true)
t.Expose = new(true)
}
}
}
Expand Down Expand Up @@ -420,7 +420,7 @@ func (t *containerTrait) getContainerName() string {

func (t *containerTrait) getRunAsNonRoot() *bool {
if t.RunAsNonRoot == nil {
return ptr.To(defaultContainerRunAsNonRoot)
return new(defaultContainerRunAsNonRoot)
}

return t.RunAsNonRoot
Expand All @@ -436,7 +436,7 @@ func (t *containerTrait) getSeccompProfileType() corev1.SeccompProfileType {

func (t *containerTrait) getAllowPrivilegeEscalation() *bool {
if t.AllowPrivilegeEscalation == nil {
return ptr.To(defaultContainerAllowPrivilegeEscalation)
return new(defaultContainerAllowPrivilegeEscalation)
}

return t.AllowPrivilegeEscalation
Expand Down
4 changes: 2 additions & 2 deletions pkg/trait/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (t *cronTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
}

if t.Schedule != "" {
t.Enabled = ptr.To(true)
t.Enabled = new(true)
}

return ptr.Deref(t.Enabled, false), nil, nil
Expand Down Expand Up @@ -177,7 +177,7 @@ func (t *cronTrait) autoConfigure(e *Environment) error {
}
for _, fromURI := range fromURIs {
if uri.GetComponent(fromURI) == genericCronComponent {
t.Fallback = ptr.To(true)
t.Fallback = new(true)

break
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/trait/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func buildHTTPRoute(routeName, gatewayName, serviceName, namespace string, servi
BackendRef: gwv1.BackendRef{
BackendObjectReference: gwv1.BackendObjectReference{
Name: gwv1.ObjectName(serviceName),
Port: ptr.To(p),
Port: new(p),
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/trait/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (t *ingressTrait) getPaths(service *corev1.Service) []networkingv1.HTTPIngr

func (t *ingressTrait) getPathType() *networkingv1.PathType {
if t.PathType == nil {
return ptr.To(defaultPathTypePrefix)
return new(defaultPathTypePrefix)
}

return t.PathType
Expand Down
2 changes: 1 addition & 1 deletion pkg/trait/knative.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (t *knativeTrait) Configure(e *Environment) (bool, *TraitCondition, error)
hasKnativeEndpoint := len(t.ChannelSources) > 0 || len(t.ChannelSinks) > 0 ||
len(t.EndpointSources) > 0 || len(t.EndpointSinks) > 0 ||
len(t.EventSources) > 0 || len(t.EventSinks) > 0
t.Enabled = ptr.To(hasKnativeEndpoint)
t.Enabled = new(hasKnativeEndpoint)
}

if ptr.Deref(t.Enabled, false) {
Expand Down
Loading
Loading