apache / camel-k

Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers
https://camel.apache.org/camel-k
Apache License 2.0
868 stars 349 forks source link

Node affinity labels not being configured in the integration pod/deployment #5005

Closed lsergio closed 11 months ago

lsergio commented 11 months ago

What happened?

After creating an integration with node affinity labels configured at the Affinity Trait, the integration pod/deployment does not contain the affinity configuration and thus does not respect what is configured.

Steps to reproduce

  1. Create an integration using kubectl as below:

    
    apiVersion: camel.apache.org/v1
    kind: Integration
    metadata:
    name: test-affinity
    spec:
    sources:
    - name: main.groovy
    content: |-
      rest("/test")
          .get()
          .to("direct:start")
    
      from("direct:start").to("log:info")
    traits:
    affinity:
      nodeAffinityLabels:
        - "karpenter=false"
2. After the integration is deployed, check the deployment yaml. The affinity is not configured as expected.
The log output shows the created deployment for the integration above

### Relevant log output

```shell
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
  labels:
    camel.apache.org/generation: "1"
    camel.apache.org/integration: test-affinity
  name: test-affinity
  namespace: lsergio
spec:
  progressDeadlineSeconds: 60
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      camel.apache.org/integration: test-affinity
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        camel.apache.org/integration: test-affinity
    spec:
      containers:
      - args:
        - echo exec java -cp ./resources:/etc/camel/application.properties:/etc/camel/conf.d/_resources:/etc/camel/resources:/etc/camel/sources/main.groovy:dependencies/app/camel-k-integration-2.1.0.jar:dependencies/lib/boot/io.github.crac.org-crac-0.1.3.jar:dependencies/lib/boot/io.quarkus.quarkus-bootstrap-runner-3.2.6.Final.jar:dependencies/lib/boot/io.quarkus.quarkus-development-mode-spi-3.2.6.Final.jar:dependencies/lib/boot/io.quarkus.quarkus-vertx-latebound-mdc-provider-3.2.6.Final.jar:dependencies/lib/boot/io.smallrye.common.smallrye-common-io-2.1.0.jar:dependencies/lib/boot/jakarta.json.jakarta.json-api-2.1.2.jar:dependencies/lib/boot/org.eclipse.parsson.parsson-1.1.2.jar:dependencies/lib/boot/org.graalvm.sdk.graal-sdk-23.0.1.jar:dependencies/lib/boot/org.jboss.logging.jboss-logging-3.5.1.Final.jar:dependencies/lib/boot/org.jboss.logmanager.jboss-logmanager-embedded-1.1.1.jar:dependencies/lib/boot/org.wildfly.common.wildfly-common-1.5.4.Final-format-001.jar:dependencies/lib/main/com.aayushatharva.brotli4j.brotli4j-1.12.0.jar:dependencies/lib/main/com.aayushatharva.brotli4j.native-linux-x86_64-1.12.0.jar:dependencies/lib/main/com.aayushatharva.brotli4j.service-1.12.0.jar:dependencies/lib/main/com.fasterxml.jackson.core.jackson-annotations-2.15.2.jar:dependencies/lib/main/com.fasterxml.jackson.core.jackson-core-2.15.2.jar:dependencies/lib/main/com.fasterxml.jackson.core.jackson-databind-2.15.2.jar:dependencies/lib/main/com.fasterxml.jackson.dataformat.jackson-dataformat-yaml-2.15.2.jar:dependencies/lib/main/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.15.2.jar:dependencies/lib/main/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.15.2.jar:dependencies/lib/main/com.fasterxml.jackson.module.jackson-module-parameter-names-2.15.2.jar:dependencies/lib/main/com.github.mifmif.generex-1.0.2.jar:dependencies/lib/main/dk.brics.automaton.automaton-1.11-8.jar:dependencies/lib/main/io.fabric8.kubernetes-client-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-client-api-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-httpclient-vertx-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-admissionregistration-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-apiextensions-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-apps-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-autoscaling-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-batch-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-certificates-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-common-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-coordination-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-core-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-discovery-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-events-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-extensions-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-flowcontrol-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-gatewayapi-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-metrics-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-networking-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-node-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-policy-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-rbac-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-resource-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-scheduling-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-storageclass-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-client-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-client-api-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-clusterautoscaling-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-config-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-console-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-hive-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-installer-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-machine-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-machineconfig-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-miscellaneous-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-monitoring-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-operator-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-operatorhub-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-storageversionmigrator-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-tuned-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-whereabouts-6.7.2.jar:dependencies/lib/main/io.fabric8.zjsonpatch-0.3.0.jar:dependencies/lib/main/io.netty.netty-buffer-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-codec-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-codec-dns-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-codec-haproxy-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-codec-http-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-codec-http2-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-codec-socks-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-common-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-handler-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-handler-proxy-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-resolver-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-resolver-dns-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-transport-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-transport-native-unix-common-4.1.94.Final.jar:dependencies/lib/main/io.quarkiverse.groovy.quarkus-groovy-3.2.2.jar:dependencies/lib/main/io.quarkus.arc.arc-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-arc-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-core-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-credentials-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-fs-util-0.0.9.jar:dependencies/lib/main/io.quarkus.quarkus-jackson-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-jsonp-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-kubernetes-client-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-kubernetes-client-internal-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-logging-json-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-mutiny-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-netty-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-security-runtime-spi-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-smallrye-context-propagation-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-vertx-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-vertx-http-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-vertx-http-dev-console-runtime-spi-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.security.quarkus-security-2.0.2.Final.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-annotation-2.1.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-classloader-2.1.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-constraint-2.1.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-expression-2.1.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-function-2.1.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-os-2.1.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-vertx-context-2.1.0.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-3.3.2.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-common-3.3.2.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-core-3.3.2.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-source-yaml-3.3.2.jar:dependencies/lib/main/io.smallrye.reactive.mutiny-2.3.1.jar:dependencies/lib/main/io.smallrye.reactive.mutiny-smallrye-context-propagation-2.3.1.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-auth-common-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-bridge-common-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-core-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-runtime-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-uri-template-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-common-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.vertx-mutiny-generator-3.5.0.jar:dependencies/lib/main/io.smallrye.smallrye-context-propagation-2.1.0.jar:dependencies/lib/main/io.smallrye.smallrye-context-propagation-api-2.1.0.jar:dependencies/lib/main/io.smallrye.smallrye-context-propagation-storage-2.1.0.jar:dependencies/lib/main/io.smallrye.smallrye-fault-tolerance-vertx-6.2.6.jar:dependencies/lib/main/io.vertx.vertx-auth-common-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-bridge-common-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-codegen-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-core-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-uri-template-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-web-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-web-client-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-web-common-4.4.4.jar:dependencies/lib/main/jakarta.activation.jakarta.activation-api-2.1.2.jar:dependencies/lib/main/jakarta.annotation.jakarta.annotation-api-2.1.1.jar:dependencies/lib/main/jakarta.el.jakarta.el-api-5.0.1.jar:dependencies/lib/main/jakarta.enterprise.jakarta.enterprise.cdi-api-4.0.1.jar:dependencies/lib/main/jakarta.enterprise.jakarta.enterprise.lang-model-4.0.1.jar:dependencies/lib/main/jakarta.inject.jakarta.inject-api-2.0.1.jar:dependencies/lib/main/jakarta.interceptor.jakarta.interceptor-api-2.1.0.jar:dependencies/lib/main/jakarta.transaction.jakarta.transaction-api-2.0.1.jar:dependencies/lib/main/jakarta.xml.bind.jakarta.xml.bind-api-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-api-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-attachments-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-base-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-base-engine-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-bean-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-cloud-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-cluster-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-componentdsl-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-core-catalog-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-core-engine-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-core-languages-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-core-model-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-core-processor-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-core-reifier-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-direct-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-dsl-support-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-endpointdsl-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-endpointdsl-support-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-groovy-dsl-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-groovy-dsl-common-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-kubernetes-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-log-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-main-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-management-api-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-microprofile-config-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-platform-http-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-platform-http-vertx-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-rest-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-support-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-tooling-model-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-util-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-util-json-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-vertx-common-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-xml-jaxp-util-4.0.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-core-3.2.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-core-api-3.2.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-core-support-3.2.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-runtime-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-attachments-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-bean-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-core-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-core-cloud-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-direct-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-groovy-dsl-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-kubernetes-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-log-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-platform-http-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-rest-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-support-commons-logging-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-support-dsl-3.2.0.jar:dependencies/lib/main/org.apache.commons.commons-compress-1.23.0.jar:dependencies/lib/main/org.apache.groovy.groovy-4.0.13.jar:dependencies/lib/main/org.eclipse.angus.angus-activation-2.0.1.jar:dependencies/lib/main/org.eclipse.microprofile.config.microprofile-config-api-3.0.3.jar:dependencies/lib/main/org.eclipse.microprofile.context-propagation.microprofile-context-propagation-api-1.3.jar:dependencies/lib/main/org.jboss.logging.commons-logging-jboss-logging-1.0.0.Final.jar:dependencies/lib/main/org.jboss.logging.jboss-logging-annotations-2.2.1.Final.jar:dependencies/lib/main/org.jboss.slf4j.slf4j-jboss-logmanager-2.0.0.Final.jar:dependencies/lib/main/org.jboss.threads.jboss-threads-3.5.0.Final.jar:dependencies/lib/main/org.slf4j.slf4j-api-2.0.6.jar:dependencies/lib/main/org.snakeyaml.snakeyaml-engine-2.6.jar:dependencies/lib/main/org.yaml.snakeyaml-2.0.jar:dependencies/quarkus-app-dependencies.txt:dependencies/quarkus-run.jar:dependencies/quarkus/generated-bytecode.jar:dependencies/quarkus/quarkus-application.dat:dependencies/quarkus/transformed-bytecode.jar
          io.quarkus.bootstrap.runner.QuarkusEntryPoint && exec java -cp ./resources:/etc/camel/application.properties:/etc/camel/conf.d/_resources:/etc/camel/resources:/etc/camel/sources/main.groovy:dependencies/app/camel-k-integration-2.1.0.jar:dependencies/lib/boot/io.github.crac.org-crac-0.1.3.jar:dependencies/lib/boot/io.quarkus.quarkus-bootstrap-runner-3.2.6.Final.jar:dependencies/lib/boot/io.quarkus.quarkus-development-mode-spi-3.2.6.Final.jar:dependencies/lib/boot/io.quarkus.quarkus-vertx-latebound-mdc-provider-3.2.6.Final.jar:dependencies/lib/boot/io.smallrye.common.smallrye-common-io-2.1.0.jar:dependencies/lib/boot/jakarta.json.jakarta.json-api-2.1.2.jar:dependencies/lib/boot/org.eclipse.parsson.parsson-1.1.2.jar:dependencies/lib/boot/org.graalvm.sdk.graal-sdk-23.0.1.jar:dependencies/lib/boot/org.jboss.logging.jboss-logging-3.5.1.Final.jar:dependencies/lib/boot/org.jboss.logmanager.jboss-logmanager-embedded-1.1.1.jar:dependencies/lib/boot/org.wildfly.common.wildfly-common-1.5.4.Final-format-001.jar:dependencies/lib/main/com.aayushatharva.brotli4j.brotli4j-1.12.0.jar:dependencies/lib/main/com.aayushatharva.brotli4j.native-linux-x86_64-1.12.0.jar:dependencies/lib/main/com.aayushatharva.brotli4j.service-1.12.0.jar:dependencies/lib/main/com.fasterxml.jackson.core.jackson-annotations-2.15.2.jar:dependencies/lib/main/com.fasterxml.jackson.core.jackson-core-2.15.2.jar:dependencies/lib/main/com.fasterxml.jackson.core.jackson-databind-2.15.2.jar:dependencies/lib/main/com.fasterxml.jackson.dataformat.jackson-dataformat-yaml-2.15.2.jar:dependencies/lib/main/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.15.2.jar:dependencies/lib/main/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.15.2.jar:dependencies/lib/main/com.fasterxml.jackson.module.jackson-module-parameter-names-2.15.2.jar:dependencies/lib/main/com.github.mifmif.generex-1.0.2.jar:dependencies/lib/main/dk.brics.automaton.automaton-1.11-8.jar:dependencies/lib/main/io.fabric8.kubernetes-client-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-client-api-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-httpclient-vertx-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-admissionregistration-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-apiextensions-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-apps-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-autoscaling-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-batch-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-certificates-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-common-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-coordination-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-core-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-discovery-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-events-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-extensions-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-flowcontrol-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-gatewayapi-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-metrics-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-networking-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-node-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-policy-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-rbac-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-resource-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-scheduling-6.7.2.jar:dependencies/lib/main/io.fabric8.kubernetes-model-storageclass-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-client-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-client-api-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-clusterautoscaling-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-config-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-console-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-hive-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-installer-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-machine-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-machineconfig-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-miscellaneous-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-monitoring-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-operator-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-operatorhub-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-storageversionmigrator-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-tuned-6.7.2.jar:dependencies/lib/main/io.fabric8.openshift-model-whereabouts-6.7.2.jar:dependencies/lib/main/io.fabric8.zjsonpatch-0.3.0.jar:dependencies/lib/main/io.netty.netty-buffer-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-codec-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-codec-dns-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-codec-haproxy-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-codec-http-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-codec-http2-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-codec-socks-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-common-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-handler-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-handler-proxy-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-resolver-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-resolver-dns-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-transport-4.1.94.Final.jar:dependencies/lib/main/io.netty.netty-transport-native-unix-common-4.1.94.Final.jar:dependencies/lib/main/io.quarkiverse.groovy.quarkus-groovy-3.2.2.jar:dependencies/lib/main/io.quarkus.arc.arc-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-arc-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-core-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-credentials-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-fs-util-0.0.9.jar:dependencies/lib/main/io.quarkus.quarkus-jackson-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-jsonp-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-kubernetes-client-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-kubernetes-client-internal-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-logging-json-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-mutiny-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-netty-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-security-runtime-spi-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-smallrye-context-propagation-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-vertx-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-vertx-http-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.quarkus-vertx-http-dev-console-runtime-spi-3.2.6.Final.jar:dependencies/lib/main/io.quarkus.security.quarkus-security-2.0.2.Final.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-annotation-2.1.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-classloader-2.1.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-constraint-2.1.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-expression-2.1.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-function-2.1.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-os-2.1.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-vertx-context-2.1.0.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-3.3.2.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-common-3.3.2.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-core-3.3.2.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-source-yaml-3.3.2.jar:dependencies/lib/main/io.smallrye.reactive.mutiny-2.3.1.jar:dependencies/lib/main/io.smallrye.reactive.mutiny-smallrye-context-propagation-2.3.1.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-auth-common-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-bridge-common-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-core-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-runtime-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-uri-template-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-common-3.5.0.jar:dependencies/lib/main/io.smallrye.reactive.vertx-mutiny-generator-3.5.0.jar:dependencies/lib/main/io.smallrye.smallrye-context-propagation-2.1.0.jar:dependencies/lib/main/io.smallrye.smallrye-context-propagation-api-2.1.0.jar:dependencies/lib/main/io.smallrye.smallrye-context-propagation-storage-2.1.0.jar:dependencies/lib/main/io.smallrye.smallrye-fault-tolerance-vertx-6.2.6.jar:dependencies/lib/main/io.vertx.vertx-auth-common-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-bridge-common-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-codegen-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-core-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-uri-template-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-web-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-web-client-4.4.4.jar:dependencies/lib/main/io.vertx.vertx-web-common-4.4.4.jar:dependencies/lib/main/jakarta.activation.jakarta.activation-api-2.1.2.jar:dependencies/lib/main/jakarta.annotation.jakarta.annotation-api-2.1.1.jar:dependencies/lib/main/jakarta.el.jakarta.el-api-5.0.1.jar:dependencies/lib/main/jakarta.enterprise.jakarta.enterprise.cdi-api-4.0.1.jar:dependencies/lib/main/jakarta.enterprise.jakarta.enterprise.lang-model-4.0.1.jar:dependencies/lib/main/jakarta.inject.jakarta.inject-api-2.0.1.jar:dependencies/lib/main/jakarta.interceptor.jakarta.interceptor-api-2.1.0.jar:dependencies/lib/main/jakarta.transaction.jakarta.transaction-api-2.0.1.jar:dependencies/lib/main/jakarta.xml.bind.jakarta.xml.bind-api-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-api-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-attachments-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-base-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-base-engine-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-bean-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-cloud-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-cluster-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-componentdsl-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-core-catalog-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-core-engine-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-core-languages-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-core-model-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-core-processor-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-core-reifier-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-direct-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-dsl-support-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-endpointdsl-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-endpointdsl-support-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-groovy-dsl-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-groovy-dsl-common-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-kubernetes-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-log-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-main-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-management-api-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-microprofile-config-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-platform-http-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-platform-http-vertx-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-rest-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-support-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-tooling-model-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-util-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-util-json-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-vertx-common-4.0.0.jar:dependencies/lib/main/org.apache.camel.camel-xml-jaxp-util-4.0.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-core-3.2.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-core-api-3.2.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-core-support-3.2.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-runtime-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-attachments-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-bean-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-core-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-core-cloud-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-direct-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-groovy-dsl-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-kubernetes-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-log-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-platform-http-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-rest-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-support-commons-logging-3.2.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-support-dsl-3.2.0.jar:dependencies/lib/main/org.apache.commons.commons-compress-1.23.0.jar:dependencies/lib/main/org.apache.groovy.groovy-4.0.13.jar:dependencies/lib/main/org.eclipse.angus.angus-activation-2.0.1.jar:dependencies/lib/main/org.eclipse.microprofile.config.microprofile-config-api-3.0.3.jar:dependencies/lib/main/org.eclipse.microprofile.context-propagation.microprofile-context-propagation-api-1.3.jar:dependencies/lib/main/org.jboss.logging.commons-logging-jboss-logging-1.0.0.Final.jar:dependencies/lib/main/org.jboss.logging.jboss-logging-annotations-2.2.1.Final.jar:dependencies/lib/main/org.jboss.slf4j.slf4j-jboss-logmanager-2.0.0.Final.jar:dependencies/lib/main/org.jboss.threads.jboss-threads-3.5.0.Final.jar:dependencies/lib/main/org.slf4j.slf4j-api-2.0.6.jar:dependencies/lib/main/org.snakeyaml.snakeyaml-engine-2.6.jar:dependencies/lib/main/org.yaml.snakeyaml-2.0.jar:dependencies/quarkus-app-dependencies.txt:dependencies/quarkus-run.jar:dependencies/quarkus/generated-bytecode.jar:dependencies/quarkus/quarkus-application.dat:dependencies/quarkus/transformed-bytecode.jar
          io.quarkus.bootstrap.runner.QuarkusEntryPoint
        command:
        - /bin/sh
        - -c
        env:
        - name: CAMEL_K_DIGEST
          value: va8C1p410nhkxy39j7olb6MhVX5kjnIsOzOVuU6ff1a4
        - name: CAMEL_K_CONF
          value: /etc/camel/application.properties
        - name: CAMEL_K_CONF_D
          value: /etc/camel/conf.d
        - name: CAMEL_K_VERSION
          value: 2.1.0
        - name: CAMEL_K_OPERATOR_ID
          value: camel-k
        - name: CAMEL_K_INTEGRATION
          value: test-affinity
        - name: CAMEL_K_RUNTIME_VERSION
          value: 3.2.0
        - name: CAMEL_K_MOUNT_PATH_CONFIGMAPS
          value: /etc/camel/conf.d/_configmaps
        - name: CAMEL_K_MOUNT_PATH_SECRETS
          value: /etc/camel/conf.d/_secrets
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: QUARKUS_LOG_LEVEL
          value: INFO
        - name: QUARKUS_LOG_CONSOLE_JSON
          value: "false"
        - name: QUARKUS_CONSOLE_COLOR
          value: "true"
        image: gcr.io/registry-ipaas-testing/camel-k-kit-cm25ev9dvu0btboh6940@sha256:1fc8e3b9ce74f9e00819ba0bb67f7f20762e8b4597b4dea2431ef96dd9d74d10
        imagePullPolicy: IfNotPresent
        name: integration
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /etc/camel/sources/main.groovy
          name: i-source-000
          readOnly: true
          subPath: main.groovy
        - mountPath: /etc/camel/application.properties
          name: application-properties
          readOnly: true
          subPath: application.properties
        workingDir: /deployments
      dnsPolicy: ClusterFirst
      imagePullSecrets:
      - name: gcr-json-key
      restartPolicy: Always
      schedulerName: default-scheduler
      terminationGracePeriodSeconds: 30
      volumes:
      - configMap:
          defaultMode: 420
          items:
          - key: content
            path: main.groovy
          name: test-affinity-source-000
        name: i-source-000
      - configMap:
          defaultMode: 420
          items:
          - key: application.properties
            path: application.properties
          name: test-affinity-application-properties
        name: application-properties

Camel K version

2.1.0 and 2.2.0-nightly

lsergio commented 11 months ago

Just found out that if I enable the affinity trait explicitly it works:

  traits:
    affinity:
      enabled: true
      nodeAffinityLabels:
        - "karpenter=false"
lsergio commented 11 months ago

As the examples at https://camel.apache.org/camel-k/2.1.x/traits/affinity.html don't set the enabled property, I assume the default should be true, as it is for other traits.

squakez commented 11 months ago

The documentation states it clearly: it's disabled by default. Not all trait are enabled by default, so, always better have a look at the doc.

lsergio commented 11 months ago

Sorry @squakez. I missed that

squakez commented 11 months ago

@lsergio no problem, we're here to help :smiley: