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

Promote Integration/IntegrationKit kustomization patch file #5456

Open
squakez opened this issue May 6, 2024 · 0 comments
Open

Promote Integration/IntegrationKit kustomization patch file #5456

squakez opened this issue May 6, 2024 · 0 comments
Labels
area/cli Kamel CLI good first issue Does not require full understanding of the codebase kind/feature New feature or request

Comments

@squakez
Copy link
Contributor

squakez commented May 6, 2024

Right now, the kamel promote is returning the entire export of Integration/IntegrationKit required to port an Integration from one namespace to another such as:

$ kamel promote test --to test -o yaml
apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
  creationTimestamp: null
  labels:
    camel.apache.org/created.by.kind: Integration
    camel.apache.org/created.by.name: test
    camel.apache.org/created.by.namespace: default
    camel.apache.org/created.by.version: "976076"
    camel.apache.org/kit.layout: fast-jar
    camel.apache.org/kit.priority: "1000"
    camel.apache.org/kit.type: external
    camel.apache.org/runtime.provider: quarkus
    camel.apache.org/runtime.version: 3.8.1
  name: kit-cos8u5qmns6c73bp7ig0
  namespace: test
spec:
  dependencies:
  - camel:core
  - camel:timer
  - mvn:org.apache.camel.k:camel-k-runtime
  - mvn:org.apache.camel.quarkus:camel-quarkus-yaml-dsl
  image: 10.100.107.57/default/camel-k-kit-cos8u5qmns6c73bp7ig0@sha256:74b334ae0bad16f3f0b99c66311e87814c4881df4d2c2312f4f314638fb332d5
  traits: {}
status: {}
---
apiVersion: camel.apache.org/v1
kind: Integration
metadata:
  creationTimestamp: null
  name: test
  namespace: test
spec:
  flows:
  - from:
      parameters:
        period: "1000"
      steps:
      - setBody:
          simple: Hello Camel from ${routeId}
      - log: ${body}
      uri: timer:yaml
  integrationKit:
    kind: IntegrationKit
    name: kit-cos8u5qmns6c73bp7ig0
    namespace: test
  traits: {}
status: {}

We may introduce a further option (ie --patch) which would lead to the generation of a Kustomize based patch file just containing the differences between the original Integration and the patched one. This would turn very useful in the context of a gitops (as described in https://camel.apache.org/blog/2023/07/camel-k-gitops/).

@squakez squakez added kind/feature New feature or request area/cli Kamel CLI good first issue Does not require full understanding of the codebase labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Kamel CLI good first issue Does not require full understanding of the codebase kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant