Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): bump golang 1.23 #5929

Merged
merged 1 commit into from
Nov 9, 2024
Merged
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
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ linters:
- cyclop
- depguard
- exhaustive
- exhaustivestruct
- exhaustruct
- forbidigo
- funlen
Expand Down
4 changes: 2 additions & 2 deletions addons/vault/aws/aws_secrets_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (t *awsSecretsManagerTrait) Apply(environment *trait.Environment) error {

hits := v1.PlainConfigSecretRegexp.FindAllStringSubmatch(t.AccessKey, -1)
if len(hits) >= 1 {
var res, _ = v1.DecodeValueSource(t.AccessKey, "aws-access-key", "The access Key provided is not valid")
var res, _ = v1.DecodeValueSource(t.AccessKey, "aws-access-key")
if secretValue, err := kubernetes.ResolveValueSource(environment.Ctx, environment.Client, environment.Platform.Namespace, &res); err != nil {
return err
} else if secretValue != "" {
Expand All @@ -138,7 +138,7 @@ func (t *awsSecretsManagerTrait) Apply(environment *trait.Environment) error {
}
hits = v1.PlainConfigSecretRegexp.FindAllStringSubmatch(t.SecretKey, -1)
if len(hits) >= 1 {
var res, _ = v1.DecodeValueSource(t.SecretKey, "aws-secret-key", "The secret Key provided is not valid")
var res, _ = v1.DecodeValueSource(t.SecretKey, "aws-secret-key")
if secretValue, err := kubernetes.ResolveValueSource(environment.Ctx, environment.Client, environment.Platform.Namespace, &res); err != nil {
return err
} else if secretValue != "" {
Expand Down
4 changes: 2 additions & 2 deletions addons/vault/azure/azure_key_vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (t *azureKeyVaultTrait) Apply(environment *trait.Environment) error {

hits := v1.PlainConfigSecretRegexp.FindAllStringSubmatch(t.ClientSecret, -1)
if len(hits) >= 1 {
var res, _ = v1.DecodeValueSource(t.ClientSecret, "azure-key-vault-client-secret", "The Azure Key Vault Client Secret provided is not valid")
var res, _ = v1.DecodeValueSource(t.ClientSecret, "azure-key-vault-client-secret")
if secretValue, err := kubernetes.ResolveValueSource(environment.Ctx, environment.Client, environment.Platform.Namespace, &res); err != nil {
return err
} else if secretValue != "" {
Expand All @@ -151,7 +151,7 @@ func (t *azureKeyVaultTrait) Apply(environment *trait.Environment) error {
}
hits = v1.PlainConfigSecretRegexp.FindAllStringSubmatch(t.BlobAccessKey, -1)
if len(hits) >= 1 {
var res, _ = v1.DecodeValueSource(t.BlobAccessKey, "azure-storage-blob-access-key", "The Azure Storage Blob Access Key provided is not valid")
var res, _ = v1.DecodeValueSource(t.BlobAccessKey, "azure-storage-blob-access-key")
if secretValue, err := kubernetes.ResolveValueSource(environment.Ctx, environment.Client, environment.Platform.Namespace, &res); err != nil {
return err
} else if secretValue != "" {
Expand Down
2 changes: 1 addition & 1 deletion addons/vault/hashicorp/hashicorp_vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (t *hashicorpVaultTrait) Apply(environment *trait.Environment) error {

hits := v1.PlainConfigSecretRegexp.FindAllStringSubmatch(t.Token, -1)
if len(hits) >= 1 {
var res, _ = v1.DecodeValueSource(t.Token, "hashicorp-vault-token", "The Hashicorp Vault Token provided is not valid")
var res, _ = v1.DecodeValueSource(t.Token, "hashicorp-vault-token")

secretValue, err := kubernetes.ResolveValueSource(environment.Ctx, environment.Client, environment.Platform.Namespace, &res)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions cmd/util/doc-gen/generators/traitdocgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,14 @@ func writeFile(file *os.File, content []string) error {
if err := file.Truncate(0); err != nil {
return err
}
max := 0
mx := 0
for i, line := range content {
if line != "" {
max = i
mx = i
}
}
for i, line := range content {
if i <= max {
if i <= mx {
if _, err := file.WriteString(line + "\n"); err != nil {
return err
}
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/ROOT/partials/apis/camel-k-crds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6608,7 +6608,7 @@ bool
Can be used to enable/disable exposure via kubernetes Service.

|`port` +
int
int32
|


Expand All @@ -6622,7 +6622,7 @@ string
To configure a different port name for the port exposed by the container. It defaults to `http` only when the `expose` parameter is true.

|`servicePort` +
int
int32
|


Expand Down Expand Up @@ -7556,7 +7556,7 @@ string
The password used for authentication, applicable when the `user` option is set.

|`port` +
int
int32
|


Expand Down
4 changes: 2 additions & 2 deletions docs/modules/traits/pages/container.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ The following configuration options are available:
| Can be used to enable/disable exposure via kubernetes Service.

| container.port
| int
| int32
| To configure a different port exposed by the container (default `8080`).

| container.port-name
| string
| To configure a different port name for the port exposed by the container. It defaults to `http` only when the `expose` parameter is true.

| container.service-port
| int
| int32
| To configure under which service port the container port is to be exposed (default `80`).

| container.service-port-name
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/traits/pages/jolokia.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ the servers binds to every network interface (default `"*"`).
| The password used for authentication, applicable when the `user` option is set.

| jolokia.port
| int
| int32
| The Jolokia endpoint port (default `8778`).

| jolokia.protocol
Expand Down
2 changes: 1 addition & 1 deletion 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.22
go 1.23

require (
github.com/Masterminds/semver v1.5.0
Expand Down
24 changes: 24 additions & 0 deletions helm/camel-k/crds/camel-k-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3930,6 +3930,7 @@ spec:
port:
description: To configure a different port exposed by the
container (default `8080`).
format: int32
type: integer
portName:
description: To configure a different port name for the port
Expand Down Expand Up @@ -3964,6 +3965,7 @@ spec:
servicePort:
description: To configure under which service port the container
port is to be exposed (default `80`).
format: int32
type: integer
servicePortName:
description: To configure under which service port name the
Expand Down Expand Up @@ -4457,6 +4459,7 @@ spec:
type: string
port:
description: The Jolokia endpoint port (default `8778`).
format: int32
type: integer
protocol:
description: The protocol to use, either `http` or `https`
Expand Down Expand Up @@ -6081,6 +6084,7 @@ spec:
port:
description: To configure a different port exposed by the
container (default `8080`).
format: int32
type: integer
portName:
description: To configure a different port name for the port
Expand Down Expand Up @@ -6115,6 +6119,7 @@ spec:
servicePort:
description: To configure under which service port the container
port is to be exposed (default `80`).
format: int32
type: integer
servicePortName:
description: To configure under which service port name the
Expand Down Expand Up @@ -6608,6 +6613,7 @@ spec:
type: string
port:
description: The Jolokia endpoint port (default `8778`).
format: int32
type: integer
protocol:
description: The protocol to use, either `http` or `https`
Expand Down Expand Up @@ -8135,6 +8141,7 @@ spec:
port:
description: To configure a different port exposed by the
container (default `8080`).
format: int32
type: integer
portName:
description: To configure a different port name for the port
Expand Down Expand Up @@ -8169,6 +8176,7 @@ spec:
servicePort:
description: To configure under which service port the container
port is to be exposed (default `80`).
format: int32
type: integer
servicePortName:
description: To configure under which service port name the
Expand Down Expand Up @@ -8662,6 +8670,7 @@ spec:
type: string
port:
description: The Jolokia endpoint port (default `8778`).
format: int32
type: integer
protocol:
description: The protocol to use, either `http` or `https`
Expand Down Expand Up @@ -10165,6 +10174,7 @@ spec:
port:
description: To configure a different port exposed by the
container (default `8080`).
format: int32
type: integer
portName:
description: To configure a different port name for the port
Expand Down Expand Up @@ -10199,6 +10209,7 @@ spec:
servicePort:
description: To configure under which service port the container
port is to be exposed (default `80`).
format: int32
type: integer
servicePortName:
description: To configure under which service port name the
Expand Down Expand Up @@ -10692,6 +10703,7 @@ spec:
type: string
port:
description: The Jolokia endpoint port (default `8778`).
format: int32
type: integer
protocol:
description: The protocol to use, either `http` or `https`
Expand Down Expand Up @@ -18236,6 +18248,7 @@ spec:
port:
description: To configure a different port exposed by the
container (default `8080`).
format: int32
type: integer
portName:
description: To configure a different port name for the port
Expand Down Expand Up @@ -18270,6 +18283,7 @@ spec:
servicePort:
description: To configure under which service port the container
port is to be exposed (default `80`).
format: int32
type: integer
servicePortName:
description: To configure under which service port name the
Expand Down Expand Up @@ -18763,6 +18777,7 @@ spec:
type: string
port:
description: The Jolokia endpoint port (default `8778`).
format: int32
type: integer
protocol:
description: The protocol to use, either `http` or `https`
Expand Down Expand Up @@ -20228,6 +20243,7 @@ spec:
port:
description: To configure a different port exposed by the
container (default `8080`).
format: int32
type: integer
portName:
description: To configure a different port name for the port
Expand Down Expand Up @@ -20262,6 +20278,7 @@ spec:
servicePort:
description: To configure under which service port the container
port is to be exposed (default `80`).
format: int32
type: integer
servicePortName:
description: To configure under which service port name the
Expand Down Expand Up @@ -20755,6 +20772,7 @@ spec:
type: string
port:
description: The Jolokia endpoint port (default `8778`).
format: int32
type: integer
protocol:
description: The protocol to use, either `http` or `https`
Expand Down Expand Up @@ -28373,6 +28391,7 @@ spec:
port:
description: To configure a different port exposed by
the container (default `8080`).
format: int32
type: integer
portName:
description: To configure a different port name for the
Expand Down Expand Up @@ -28407,6 +28426,7 @@ spec:
servicePort:
description: To configure under which service port the
container port is to be exposed (default `80`).
format: int32
type: integer
servicePortName:
description: To configure under which service port name
Expand Down Expand Up @@ -28901,6 +28921,7 @@ spec:
type: string
port:
description: The Jolokia endpoint port (default `8778`).
format: int32
type: integer
protocol:
description: The protocol to use, either `http` or `https`
Expand Down Expand Up @@ -39310,6 +39331,7 @@ spec:
port:
description: To configure a different port exposed by
the container (default `8080`).
format: int32
type: integer
portName:
description: To configure a different port name for the
Expand Down Expand Up @@ -39344,6 +39366,7 @@ spec:
servicePort:
description: To configure under which service port the
container port is to be exposed (default `80`).
format: int32
type: integer
servicePortName:
description: To configure under which service port name
Expand Down Expand Up @@ -39838,6 +39861,7 @@ spec:
type: string
port:
description: The Jolokia endpoint port (default `8778`).
format: int32
type: integer
protocol:
description: The protocol to use, either `http` or `https`
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/camel/v1/common_types_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (bc *BuildConfiguration) IsEmpty() bool {
}

// DecodeValueSource returns a ValueSource object from an input that respects the format configmap|secret:resource-name[/path].
func DecodeValueSource(input string, defaultKey string, errorMessage string) (ValueSource, error) {
func DecodeValueSource(input string, defaultKey string) (ValueSource, error) {
sub := make([]string, 0)
hits := PlainConfigSecretRegexp.FindAllStringSubmatch(input, -1)

Expand Down Expand Up @@ -262,7 +262,7 @@ func DecodeValueSource(input string, defaultKey string, errorMessage string) (Va
}
}

return ValueSource{}, fmt.Errorf(errorMessage)
return ValueSource{}, fmt.Errorf("could not decode %s", input)
}

// IsGeneratedFromKamelet determines is a source spec is derived from a Kamelet.
Expand Down
Loading