Skip to content

Commit

Permalink
Merge branch 'main' into lgarciaac
Browse files Browse the repository at this point in the history
* main: (21 commits)
  chore: nightly automatic updates
  Fix wrong Kamelet sample content (apache#5255)
  chore: nightly automatic updates
  chore: nightly automatic updates
  chore: nightly automatic updates
  Add Kamelet v1alpha1 sample (apache#5254)
  chore(ci): Upgrade kind action to 2.0.4
  chore: nightly automatic updates
  Install operator image according to the target architecture
  chore: nightly automatic updates
  chore(e2e): Do not run fast setup locally
  chore(e2e): Use a shared context in E2E tests
  chore(e2e): Improve Integration logs waiting for container created
  chore(e2e): Use UpdatePlatform func as it is more stable
  chore(e2e): Use new context instance for each E2E test
  chore(e2e): Add option to set base image and runtime version in E2E tests
  chore: propagate capabilities to Kit
  chore(ci): Upgrade setup-kubectl action
  chore: nightly automatic updates
  Azure Key Vault Trait: Support Azure Identity as authentication method (apache#5244)
  ...
  • Loading branch information
lgarciaaco committed Mar 19, 2024
2 parents 311be30 + b61b3d7 commit 99a345b
Show file tree
Hide file tree
Showing 145 changed files with 4,354 additions and 4,317 deletions.
2 changes: 1 addition & 1 deletion .github/actions/kamel-config-cluster-kind/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
steps:
- id: install-cluster
name: Install Cluster
uses: container-tools/[email protected].3
uses: container-tools/[email protected].4
if: ${{ env.CLUSTER_KIND_CONFIGURED != 'true' }}
with:
version: v0.19.0
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/kamel-prepare-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ runs:
# Install a version of kubectl for generic access to cluster
#
- id: install-kubectl
uses: azure/setup-kubectl@v3
uses: azure/setup-kubectl@v4
if: ${{ env.KAMEL_PREPARE_ENV != 'true' }}
with:
version: 'v1.27.4'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
-p "${{ github.event.inputs.skip-problematic }}" \
-q "${{ github.event.inputs.log-level }}" \
-t "${{ github.event.inputs.test-filters }}"
- name: Smoke tests
- name: Common tests
uses: ./.github/actions/e2e-common
with:
cluster-config-data: ${{ secrets.E2E_CLUSTER_CONFIG }}
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

**Closed issues:**

- XSD might be wrong [\#5250](https://github.com/apache/camel-k/issues/5250)
- Update buil/Dokerfile to use go 1.21 [\#5231](https://github.com/apache/camel-k/issues/5231)
- Error java.lang.ClassNotFoundException: io.quarkus.bootstrap.runner.QuarkusEntryPoint [\#5225](https://github.com/apache/camel-k/issues/5225)
- Deployment Trait maxUnavailable and maxSurge default values differ from documentation and do not support % values [\#5223](https://github.com/apache/camel-k/issues/5223)
Expand All @@ -14,19 +15,22 @@
- Builder property failure when using non xml tag characters [\#5195](https://github.com/apache/camel-k/issues/5195)
- Error configuring property: camel.component.test\[00001\]port\[80\]tcp.addr because cannot find component with name test\[00001\]port\[80\]tcp. [\#5179](https://github.com/apache/camel-k/issues/5179)
- Get environment variable value is empty in properties file [\#5178](https://github.com/apache/camel-k/issues/5178)
- Install operator image according to the target architecture [\#5169](https://github.com/apache/camel-k/issues/5169)
- Debug Integrations failing [\#5161](https://github.com/apache/camel-k/issues/5161)
- Multiple crons at the same Integration do not run as expected [\#5158](https://github.com/apache/camel-k/issues/5158)
- Kamel delete KameletBinding only removes integration resource [\#5156](https://github.com/apache/camel-k/issues/5156)
- Performance regression due to configmap/secrets whole cluster watch [\#5143](https://github.com/apache/camel-k/issues/5143)
- Running integrations fail when the used registry has a port other than default 80 [\#5141](https://github.com/apache/camel-k/issues/5141)
- camel-jackson configure configure "autoDiscoverObjectMapper" property for non-spring boot application [\#5140](https://github.com/apache/camel-k/issues/5140)
- Update github actions to a version that use node 20 [\#5130](https://github.com/apache/camel-k/issues/5130)
- Integrations remain in Initialization loop when referenced config map has owner references [\#5114](https://github.com/apache/camel-k/issues/5114)
- Externally built Integrations are deployed without a command in Camel-K 2.2.0 [\#5112](https://github.com/apache/camel-k/issues/5112)
- Coverage report wrong percentage [\#5108](https://github.com/apache/camel-k/issues/5108)
- Add possibility to configure annotation for the builder pods [\#5106](https://github.com/apache/camel-k/issues/5106)
- Include the operator node-selector in the helm chart [\#5103](https://github.com/apache/camel-k/issues/5103)
- TestCreateCatalog fail when DEFAULT\_RUNTIME\_VERSION=3.6.0-SNAPSHOT [\#5099](https://github.com/apache/camel-k/issues/5099)
- Remove secondary IntegrationPlatform in favor of using IntegrationProfile settings [\#5097](https://github.com/apache/camel-k/issues/5097)
- Basic example fails on Docker Desktop MacOS [\#5095](https://github.com/apache/camel-k/issues/5095)
- Quartz builds failing to start when using native builds [\#5088](https://github.com/apache/camel-k/issues/5088)
- Ability to set different resources for jvm and native containers when both are used in the same Integration [\#5065](https://github.com/apache/camel-k/issues/5065)
- Don't run dependabot on forked repos [\#5063](https://github.com/apache/camel-k/issues/5063)
Expand All @@ -43,13 +47,16 @@
- Data type Kamelet hardcoded [\#5014](https://github.com/apache/camel-k/issues/5014)
- Quarkus buildMode should sort JVM before Native execution [\#5001](https://github.com/apache/camel-k/issues/5001)
- Failing to build native integration [\#5000](https://github.com/apache/camel-k/issues/5000)
- Azure Key Vault Trait: Support Azure Identity as authentication method [\#4983](https://github.com/apache/camel-k/issues/4983)
- Move handling of IntegrationPlatformResource to a separate operator [\#4948](https://github.com/apache/camel-k/issues/4948)
- Use generated trait [\#4811](https://github.com/apache/camel-k/issues/4811)
- Upgrade to Go 1.21 [\#4795](https://github.com/apache/camel-k/issues/4795)
- Pointer to an external schema/CRD [\#4788](https://github.com/apache/camel-k/issues/4788)
- Pipe using simple language expressions causing failure [\#4777](https://github.com/apache/camel-k/issues/4777)
- 1st Integration after Camel K runtime version update failing [\#4776](https://github.com/apache/camel-k/issues/4776)
- Provide alternative publishing strategy via pipeline [\#4747](https://github.com/apache/camel-k/issues/4747)
- Quarkus native checks failure [\#4723](https://github.com/apache/camel-k/issues/4723)
- Build waiting condition [\#4542](https://github.com/apache/camel-k/issues/4542)
- Add DataTypeRegistry as bean in Camel context [\#3845](https://github.com/apache/camel-k/issues/3845)
- Remove duplication of the default platform creation [\#3433](https://github.com/apache/camel-k/issues/3433)
- Use `go:embed` instead of vfsgen for embedded resources handling [\#3384](https://github.com/apache/camel-k/issues/3384)
Expand All @@ -58,13 +65,21 @@

**Merged pull requests:**

- Fix wrong Kamelet sample content [\#5255](https://github.com/apache/camel-k/pull/5255) ([claudio4j](https://github.com/claudio4j))
- Add Kamelet v1alpha1 sample [\#5254](https://github.com/apache/camel-k/pull/5254) ([claudio4j](https://github.com/claudio4j))
- chore\(ci\): Upgrade kind action to 2.0.4 [\#5249](https://github.com/apache/camel-k/pull/5249) ([gansheer](https://github.com/gansheer))
- chore: propagate capabilities to Kit [\#5247](https://github.com/apache/camel-k/pull/5247) ([squakez](https://github.com/squakez))
- Azure Key Vault Trait: Support Azure Identity as authentication method [\#5244](https://github.com/apache/camel-k/pull/5244) ([oscerd](https://github.com/oscerd))
- chore\(ci\): Upgrade setup-kubectl action [\#5243](https://github.com/apache/camel-k/pull/5243) ([gansheer](https://github.com/gansheer))
- chore\(e2e\): Fix smoke tests [\#5240](https://github.com/apache/camel-k/pull/5240) ([christophd](https://github.com/christophd))
- chore\(e2e\): Separate common-it E2E tests, so they run more efficient [\#5239](https://github.com/apache/camel-k/pull/5239) ([christophd](https://github.com/christophd))
- fix\(cmd\): delete KameletBinding until they exists [\#5237](https://github.com/apache/camel-k/pull/5237) ([squakez](https://github.com/squakez))
- fix\(ctrl\): message digest change [\#5236](https://github.com/apache/camel-k/pull/5236) ([squakez](https://github.com/squakez))
- fix\(build\): Upgrade container image to golang 1.21 [\#5235](https://github.com/apache/camel-k/pull/5235) ([gansheer](https://github.com/gansheer))
- \[Regression\] fix\(quarkus\): don't override application.properties [\#5234](https://github.com/apache/camel-k/pull/5234) ([squakez](https://github.com/squakez))
- fix\(trait\): revert persisted status [\#5233](https://github.com/apache/camel-k/pull/5233) ([squakez](https://github.com/squakez))
- chore\(deps\): bump github.com/prometheus/common from 0.48.0 to 0.50.0 [\#5232](https://github.com/apache/camel-k/pull/5232) ([dependabot[bot]](https://github.com/apps/dependabot))
- fix\(traits\): use Comparable matches [\#5230](https://github.com/apache/camel-k/pull/5230) ([squakez](https://github.com/squakez))
- fix\(trait\): Add documentation and test on multiple sources [\#5229](https://github.com/apache/camel-k/pull/5229) ([gansheer](https://github.com/gansheer))
- chore\(deps\): bump github.com/cloudevents/sdk-go/v2 from 2.13.0 to 2.15.2 [\#5228](https://github.com/apache/camel-k/pull/5228) ([dependabot[bot]](https://github.com/apps/dependabot))
- chore\(lint\): Update golangci-lint version to 1.55 [\#5227](https://github.com/apache/camel-k/pull/5227) ([christophd](https://github.com/christophd))
Expand All @@ -78,6 +93,7 @@
- chore\(deps\): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 [\#5208](https://github.com/apache/camel-k/pull/5208) ([dependabot[bot]](https://github.com/apps/dependabot))
- fix\(e2e\): stricter pipe test check [\#5202](https://github.com/apache/camel-k/pull/5202) ([squakez](https://github.com/squakez))
- fix\(trait\): deprecate operator inspecting secrets [\#5201](https://github.com/apache/camel-k/pull/5201) ([squakez](https://github.com/squakez))
- Install operator image according to the target architecture [\#5200](https://github.com/apache/camel-k/pull/5200) ([tdiesler](https://github.com/tdiesler))
- fix\(trait\): catalog to drive dependencies [\#5199](https://github.com/apache/camel-k/pull/5199) ([squakez](https://github.com/squakez))
- fix\(quarkus\): build time properties into file [\#5198](https://github.com/apache/camel-k/pull/5198) ([squakez](https://github.com/squakez))
- chore\(deps\): bump github.com/prometheus/client\_golang from 1.18.0 to 1.19.0 [\#5193](https://github.com/apache/camel-k/pull/5193) ([dependabot[bot]](https://github.com/apps/dependabot))
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image:https://github.com/apache/camel-k/workflows/kubernetes/badge.svg["Kubernet
image:https://github.com/apache/camel-k/workflows/knative/badge.svg["Knative", link="https://github.com/apache/camel-k/actions/workflows/knative.yml"]
image:https://github.com/apache/camel-k/actions/workflows/nightly-release.yml/badge.svg["Nightly releases", link="https://github.com/apache/camel-k/actions/workflows/nightly-release.yml"]
image:https://github.com/apache/camel-k/actions/workflows/nightly-native-test.yml/badge.svg["Quarkus native", link="https://github.com/apache/camel-k/actions/workflows/nightly-native-test.yml"]
image:https://img.shields.io/badge/Coverage-36.9%25-yellow.svg["Go coverage", link="https://github.com/apache/camel-k/actions/workflows/nightly-coverage.yml"]
image:https://img.shields.io/badge/Coverage-37.2%25-yellow.svg["Go coverage", link="https://github.com/apache/camel-k/actions/workflows/nightly-coverage.yml"]
image:https://img.shields.io/badge/zulip-join_chat-brightgreen.svg["Chat on Zulip", link="https://camel.zulipchat.com"]

Apache Camel K is a lightweight integration framework built from **Apache Camel** that runs natively on Kubernetes and is specifically designed for serverless and microservice architectures. Users of `Camel K` can instantly run integration code written in Camel DSL on their preferred **Cloud** provider.
Expand Down
9 changes: 8 additions & 1 deletion addons/vault/azure/azure_key_vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
//
// To enable the automatic context reload on secrets updates you should define
// the following trait options:
// -t azure-key-vault.enabled=true -t azure-key-vault.tenant-id="tenant-id" -t azure-key-vault.client-id="client-id" -t azure-key-vault.client-secret="client-secret" -t azure-key-vault.vault-name="vault-name" -t azure-key-vault.context-reload-enabled="true" -t azure-key-vault.refresh-enabled="true" -t azure-key-vault.refresh-period="30000" -t azure-key-vault.secrets="test*" -t azure-key-vault.eventhub-connection-string="connection-string" -t azure-key-vault.blob-account-name="account-name" -t azure-key-vault.blob-container-name="container-name" -t azure-key-vault.blob-access-key="account-name"
// -t azure-key-vault.enabled=true -t azure-key-vault.tenant-id="tenant-id" -t azure-key-vault.client-id="client-id" -t azure-key-vault.client-secret="client-secret" -t azure-key-vault.vault-name="vault-name" -t azure-key-vault.context-reload-enabled="true" -t azure-key-vault.refresh-enabled="true" -t azure-key-vault.refresh-period="30000" -t azure-key-vault.secrets="test*" -t azure-key-vault.eventhub-connection-string="connection-string" -t azure-key-vault.blob-account-name="account-name" -t azure-key-vault.blob-container-name="container-name" -t azure-key-vault.blob-access-key="account-name" -t azure-key-vault.azure-identity-enabled="true"
//
// +camel-k:trait=azure-key-vault.
type Trait struct {
Expand All @@ -63,6 +63,8 @@ type Trait struct {
ContextReloadEnabled *bool `property:"context-reload-enabled" json:"contextReloadEnabled,omitempty"`
// Define if we want to use the Refresh Feature for secrets
RefreshEnabled *bool `property:"refresh-enabled" json:"refreshEnabled,omitempty"`
// Whether the Azure Identity Authentication should be used or not
AzureIdentityEnabled *bool `property:"azure-identity-enabled" json:"azureIdentityEnabled,omitempty"`
// If Refresh is enabled, this defines the interval to check the refresh event
RefreshPeriod string `property:"refresh-period" json:"refreshPeriod,omitempty"`
// If Refresh is enabled, the regular expression representing the secrets we want to track
Expand Down Expand Up @@ -107,6 +109,10 @@ func (t *azureKeyVaultTrait) Configure(environment *trait.Environment) (bool, *t
t.RefreshEnabled = pointer.Bool(false)
}

if t.AzureIdentityEnabled == nil {
t.AzureIdentityEnabled = pointer.Bool(false)
}

return true, nil, nil
}

Expand Down Expand Up @@ -143,6 +149,7 @@ func (t *azureKeyVaultTrait) Apply(environment *trait.Environment) error {
environment.ApplicationProperties["camel.vault.azure.clientId"] = t.ClientID
environment.ApplicationProperties["camel.vault.azure.vaultName"] = t.VaultName
environment.ApplicationProperties["camel.vault.azure.refreshEnabled"] = strconv.FormatBool(*t.RefreshEnabled)
environment.ApplicationProperties["camel.vault.azure.azureIdentityEnabled"] = strconv.FormatBool(*t.AzureIdentityEnabled)
environment.ApplicationProperties["camel.main.context-reload-enabled"] = strconv.FormatBool(*t.ContextReloadEnabled)
environment.ApplicationProperties["camel.vault.azure.refreshPeriod"] = t.RefreshPeriod
if t.Secrets != "" {
Expand Down
49 changes: 49 additions & 0 deletions addons/vault/azure/azure_key_vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,55 @@ func TestAzureKeyVaultTraitApplyWithSecretAndRefresh(t *testing.T) {
assert.True(t, true, e.ApplicationProperties["camel.vault.azure.refreshEnabled"])
}

func TestAzureKeyVaultTraitAzureIdentityEnabledApplyWithSecretAndRefresh(t *testing.T) {
e := createEnvironment(t, camel.QuarkusCatalog, &corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Namespace: "test",
Name: "my-secret1",
},
Data: map[string][]byte{
"azure-client-secret": []byte("my-secret-key"),
},
}, &corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Namespace: "test",
Name: "my-secret2",
},
Data: map[string][]byte{
"azure-storage-blob-key": []byte("my-access-key"),
},
})
azure := NewAzureKeyVaultTrait()
secrets, _ := azure.(*azureKeyVaultTrait)
secrets.Enabled = pointer.Bool(true)
secrets.TenantID = "tenant-id"
secrets.ClientID = "client-id"
secrets.ClientSecret = "secret:my-secret1/azure-client-secret"
secrets.VaultName = "my-vault"
secrets.RefreshEnabled = pointer.Bool(true)
secrets.AzureIdentityEnabled = pointer.Bool(true)
secrets.BlobAccessKey = "secret:my-secret2/azure-storage-blob-key"
secrets.BlobAccountName = "camel-k"
secrets.BlobContainerName = "camel-k-container"
ok, condition, err := secrets.Configure(e)
require.NoError(t, err)
assert.True(t, ok)
assert.Nil(t, condition)

err = secrets.Apply(e)
require.NoError(t, err)

assert.Equal(t, "client-id", e.ApplicationProperties["camel.vault.azure.clientId"])
assert.Equal(t, "my-secret-key", e.ApplicationProperties["camel.vault.azure.clientSecret"])
assert.Equal(t, "tenant-id", e.ApplicationProperties["camel.vault.azure.tenantId"])
assert.Equal(t, "my-vault", e.ApplicationProperties["camel.vault.azure.vaultName"])
assert.Equal(t, "camel-k", e.ApplicationProperties["camel.vault.azure.blobAccountName"])
assert.Equal(t, "camel-k-container", e.ApplicationProperties["camel.vault.azure.blobContainerName"])
assert.Equal(t, "my-access-key", e.ApplicationProperties["camel.vault.azure.blobAccessKey"])
assert.True(t, true, e.ApplicationProperties["camel.vault.azure.refreshEnabled"])
assert.True(t, true, e.ApplicationProperties["camel.vault.azure.azureIdentityEnabled"])
}

func createEnvironment(t *testing.T, catalogGen func() (*camel.RuntimeCatalog, error), objects ...runtime.Object) *trait.Environment {
t.Helper()

Expand Down
2 changes: 1 addition & 1 deletion badge.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

![Coverage](https://img.shields.io/badge/Coverage-36.9%25-yellow)
![Coverage](https://img.shields.io/badge/Coverage-37.2%25-yellow)
4 changes: 3 additions & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

FROM eclipse-temurin:17-jdk as base

ARG IMAGE_ARCH

ARG MAVEN_DEFAULT_VERSION="3.8.6"
ARG MAVEN_HOME="/usr/share/maven"
ARG MAVEN_DIST_URL="https://archive.apache.org/dist/maven/maven-3/${MAVEN_DEFAULT_VERSION}/binaries/apache-maven-${MAVEN_DEFAULT_VERSION}-bin.zip"
Expand Down Expand Up @@ -59,7 +61,7 @@ RUN chgrp -R 0 ${MVN_REPO} \

USER 1001:0

ADD build/_output/bin/kamel /usr/local/bin/kamel
ADD build/_output/bin/kamel-${IMAGE_ARCH} /usr/local/bin/kamel

FROM golang:1.21 as go

Expand Down
2 changes: 1 addition & 1 deletion coverage
Original file line number Diff line number Diff line change
@@ -1 +1 @@
36.9
37.2
Loading

0 comments on commit 99a345b

Please sign in to comment.