Closed ghost closed 1 year ago
Should be fixed on #534 Will be available in next minor release.
@rohanKanojia to check if the provided reproducer works OK in master branch.
I can confirm that I can get the above project working with 1.2.0-SNAPSHOT
First Apply (Create):
mvn k8s:resource k8s:apply
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< com.quasifact:demo >-------------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- kubernetes-maven-plugin:1.2.0-SNAPSHOT:resource (default-cli) @ demo ---
[INFO] k8s: Generators:
[INFO] k8s: - quarkus
[INFO] k8s: - spring-boot
[INFO] k8s: Running generator spring-boot
[INFO] k8s: spring-boot: Using Docker image quay.io/jkube/jkube-java-binary-s2i:0.0.9 as base / builder
[INFO] k8s: spring-boot: Using fat jar packaging as the spring boot plugin is using `repackage` goal execution
[INFO] k8s: - wildfly-swarm
[INFO] k8s: - thorntail-v2
[INFO] k8s: - wildfly-jar
[INFO] k8s: - openliberty
[INFO] k8s: - karaf
[INFO] k8s: - vertx
[INFO] k8s: - micronaut
[INFO] k8s: - java-exec
[INFO] k8s: - webapp
[INFO] k8s: Enrichers:
[INFO] k8s: - jkube-metadata
[INFO] k8s: - jkube-name
[INFO] k8s: - jkube-controller
[INFO] k8s: - jkube-controller-from-configuration
[INFO] k8s: - jkube-service
[INFO] k8s: - jkube-namespace
[INFO] k8s: - jkube-image
[INFO] k8s: - jkube-portname
[INFO] k8s: - jkube-project-label
[INFO] k8s: - jkube-dependency
[INFO] k8s: - jkube-pod-annotations
[INFO] k8s: - jkube-git
[INFO] k8s: - jkube-maven-scm
[INFO] k8s: - jkube-serviceaccount
[INFO] k8s: - jkube-maven-issue-mgmt
[INFO] k8s: - jkube-debug
[INFO] k8s: - jkube-remove-build-annotations
[INFO] k8s: - jkube-volume-permission
[INFO] k8s: - jkube-configmap-file
[INFO] k8s: - jkube-secret-file
[INFO] k8s: - jkube-openshift-service-expose
[INFO] k8s: - jkube-openshift-route
[INFO] k8s: - jkube-openshift-deploymentconfig
[INFO] k8s: - jkube-openshift-project
[INFO] k8s: - jkube-ingress
[INFO] k8s: - jkube-healthcheck-quarkus
[INFO] k8s: - jkube-healthcheck-spring-boot
[INFO] k8s: - jkube-healthcheck-wildfly-swarm
[INFO] k8s: - jkube-healthcheck-thorntail-v2
[INFO] k8s: - jkube-healthcheck-wildfly-jar
[INFO] k8s: - jkube-healthcheck-karaf
[INFO] k8s: - jkube-healthcheck-vertx
[INFO] k8s: - jkube-healthcheck-docker
[INFO] k8s: - jkube-healthcheck-webapp
[INFO] k8s: - jkube-healthcheck-micronaut
[INFO] k8s: - jkube-prometheus
[INFO] k8s: - jkube-service-discovery
[INFO] k8s: - jkube-container-env-java-options
[INFO] k8s: - jkube-revision-history
[INFO] k8s: - jkube-docker-registry-secret
[INFO] k8s: - jkube-triggers-annotation
[INFO] k8s: - jkube-openshift-imageChangeTrigger
[INFO] k8s: Using resource templates from /home/rohaan/work/repos/jkube-testing-samples/demo/src/main/jkube
[INFO] k8s: jkube-controller: Adding a default Deployment
[INFO] k8s: jkube-service: Adding a default service 'demo' with ports [8080]
[INFO] k8s: jkube-portname: Adding default port name http for port 8080
[INFO] k8s: jkube-portname: Adding default port name prometheus for port 9779
[INFO] k8s: jkube-portname: Adding default port name jolokia for port 8778
[INFO] k8s: jkube-debug: Debugging not enabled. To enable try setting the jkube.debug.enabled maven or system property to 'true'
[INFO] k8s: jkube-openshift-service-expose: Adding Service label 'expose:true' on service demo so that it is exposed by the exposecontroller microservice. To disable use the maven argument: '-Dfabric8.profile=internal-microservice'
[INFO] k8s: jkube-healthcheck-spring-boot: Adding readiness probe on port 8080, path='/actuator/health', scheme='HTTP', with initial delay 10 seconds
[INFO] k8s: jkube-healthcheck-spring-boot: Adding liveness probe on port 8080, path='/actuator/health', scheme='HTTP', with initial delay 180 seconds
[INFO] k8s: jkube-prometheus: Adding prometheus.io annotations: prometheus.io/path=/metrics, prometheus.io/port=9779, prometheus.io/scrape=true
[INFO] k8s: jkube-service-discovery: Using first mentioned service port '8080'
[INFO] k8s: jkube-revision-history: Adding revision history limit to 2
[INFO] k8s: jkube-docker-registry-secret: Adding secrets resources from plugin configuration
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/quasifact-com-secret-secret.yml resource
[WARNING] Unknown keyword $module - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
[WARNING] Unknown keyword existingJavaType - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
[WARNING] Unknown keyword javaOmitEmpty - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
[WARNING] Unknown keyword serializer - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
[WARNING] Unknown keyword deserializer - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/demo-service.yml resource
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/demo-deployment.yml resource
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/demo.yml resource
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/exampletlsoption.yml resource
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/ingressroutes.traefik.containo.us-customerresourcedefinition resource
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/quasifacttlsoption.yml resource
[INFO]
[INFO] --- kubernetes-maven-plugin:1.2.0-SNAPSHOT:apply (default-cli) @ demo ---
[INFO] k8s: Using Kubernetes at https://192.168.39.234:8443/ in namespace default with manifest /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes.yml
[INFO] k8s: Using currentNamespace: default
[INFO] k8s: Creating a Secret from kubernetes.yml namespace default name quasifact-com-secret
[INFO] k8s: Created Secret: target/jkube/applyJson/default/secret-quasifact-com-secret-1.json
[INFO] k8s: Creating a Service from kubernetes.yml namespace default name demo
[INFO] k8s: Created Service: target/jkube/applyJson/default/service-demo-1.json
[INFO] k8s: Creating a Custom Resource Definition from kubernetes.yml name ingressroutes.traefik.containo.us
[INFO] k8s: Created Custom Resource Definition result: ingressroutes.traefik.containo.us
[INFO] k8s: Creating a Deployment from kubernetes.yml namespace default name demo
[INFO] k8s: Created Deployment: target/jkube/applyJson/default/deployment-demo.json
[INFO] k8s: Created Custom Resource: traefik.containo.us/v1alpha1#IngressRoute default/demo
[INFO] k8s: Created Custom Resource: traefik.containo.us/v1alpha1#TLSOption default/exampletlsoption
[INFO] k8s: Created Custom Resource: traefik.containo.us/v1alpha1#TLSOption default/quasifacttlsoption
[INFO] k8s: HINT: Use the command `kubectl get pods -w` to watch your pods start up
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.938 s
[INFO] Finished at: 2021-03-02T19:22:45+05:30
[INFO] ------------------------------------------------------------------------
Second apply( Update) :
demo : $ mvn k8s:resource k8s:apply
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< com.quasifact:demo >-------------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- kubernetes-maven-plugin:1.2.0-SNAPSHOT:resource (default-cli) @ demo ---
[INFO] k8s: Generators:
[INFO] k8s: - quarkus
[INFO] k8s: - spring-boot
[INFO] k8s: Running generator spring-boot
[INFO] k8s: spring-boot: Using Docker image quay.io/jkube/jkube-java-binary-s2i:0.0.9 as base / builder
[INFO] k8s: spring-boot: Using fat jar packaging as the spring boot plugin is using `repackage` goal execution
[INFO] k8s: - wildfly-swarm
[INFO] k8s: - thorntail-v2
[INFO] k8s: - wildfly-jar
[INFO] k8s: - openliberty
[INFO] k8s: - karaf
[INFO] k8s: - vertx
[INFO] k8s: - micronaut
[INFO] k8s: - java-exec
[INFO] k8s: - webapp
[INFO] k8s: Enrichers:
[INFO] k8s: - jkube-metadata
[INFO] k8s: - jkube-name
[INFO] k8s: - jkube-controller
[INFO] k8s: - jkube-controller-from-configuration
[INFO] k8s: - jkube-service
[INFO] k8s: - jkube-namespace
[INFO] k8s: - jkube-image
[INFO] k8s: - jkube-portname
[INFO] k8s: - jkube-project-label
[INFO] k8s: - jkube-dependency
[INFO] k8s: - jkube-pod-annotations
[INFO] k8s: - jkube-git
[INFO] k8s: - jkube-maven-scm
[INFO] k8s: - jkube-serviceaccount
[INFO] k8s: - jkube-maven-issue-mgmt
[INFO] k8s: - jkube-debug
[INFO] k8s: - jkube-remove-build-annotations
[INFO] k8s: - jkube-volume-permission
[INFO] k8s: - jkube-configmap-file
[INFO] k8s: - jkube-secret-file
[INFO] k8s: - jkube-openshift-service-expose
[INFO] k8s: - jkube-openshift-route
[INFO] k8s: - jkube-openshift-deploymentconfig
[INFO] k8s: - jkube-openshift-project
[INFO] k8s: - jkube-ingress
[INFO] k8s: - jkube-healthcheck-quarkus
[INFO] k8s: - jkube-healthcheck-spring-boot
[INFO] k8s: - jkube-healthcheck-wildfly-swarm
[INFO] k8s: - jkube-healthcheck-thorntail-v2
[INFO] k8s: - jkube-healthcheck-wildfly-jar
[INFO] k8s: - jkube-healthcheck-karaf
[INFO] k8s: - jkube-healthcheck-vertx
[INFO] k8s: - jkube-healthcheck-docker
[INFO] k8s: - jkube-healthcheck-webapp
[INFO] k8s: - jkube-healthcheck-micronaut
[INFO] k8s: - jkube-prometheus
[INFO] k8s: - jkube-service-discovery
[INFO] k8s: - jkube-container-env-java-options
[INFO] k8s: - jkube-revision-history
[INFO] k8s: - jkube-docker-registry-secret
[INFO] k8s: - jkube-triggers-annotation
[INFO] k8s: - jkube-openshift-imageChangeTrigger
[INFO] k8s: Using resource templates from /home/rohaan/work/repos/jkube-testing-samples/demo/src/main/jkube
[INFO] k8s: jkube-controller: Adding a default Deployment
[INFO] k8s: jkube-service: Adding a default service 'demo' with ports [8080]
[INFO] k8s: jkube-portname: Adding default port name http for port 8080
[INFO] k8s: jkube-portname: Adding default port name prometheus for port 9779
[INFO] k8s: jkube-portname: Adding default port name jolokia for port 8778
[INFO] k8s: jkube-debug: Debugging not enabled. To enable try setting the jkube.debug.enabled maven or system property to 'true'
[INFO] k8s: jkube-openshift-service-expose: Adding Service label 'expose:true' on service demo so that it is exposed by the exposecontroller microservice. To disable use the maven argument: '-Dfabric8.profile=internal-microservice'
[INFO] k8s: jkube-healthcheck-spring-boot: Adding readiness probe on port 8080, path='/actuator/health', scheme='HTTP', with initial delay 10 seconds
[INFO] k8s: jkube-healthcheck-spring-boot: Adding liveness probe on port 8080, path='/actuator/health', scheme='HTTP', with initial delay 180 seconds
[INFO] k8s: jkube-prometheus: Adding prometheus.io annotations: prometheus.io/path=/metrics, prometheus.io/port=9779, prometheus.io/scrape=true
[INFO] k8s: jkube-service-discovery: Using first mentioned service port '8080'
[INFO] k8s: jkube-revision-history: Adding revision history limit to 2
[INFO] k8s: jkube-docker-registry-secret: Adding secrets resources from plugin configuration
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/quasifact-com-secret-secret.yml resource
[WARNING] Unknown keyword $module - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
[WARNING] Unknown keyword existingJavaType - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
[WARNING] Unknown keyword javaOmitEmpty - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
[WARNING] Unknown keyword serializer - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
[WARNING] Unknown keyword deserializer - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/demo-service.yml resource
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/demo-deployment.yml resource
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/demo.yml resource
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/exampletlsoption.yml resource
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/ingressroutes.traefik.containo.us-customerresourcedefinition resource
[INFO] k8s: validating /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes/quasifacttlsoption.yml resource
[INFO]
[INFO] --- kubernetes-maven-plugin:1.2.0-SNAPSHOT:apply (default-cli) @ demo ---
[INFO] k8s: Using Kubernetes at https://192.168.39.234:8443/ in namespace default with manifest /home/rohaan/work/repos/jkube-testing-samples/demo/target/classes/META-INF/jkube/kubernetes.yml
[INFO] k8s: Using currentNamespace: default
[INFO] k8s: Updating Secret from kubernetes.yml
[INFO] k8s: Updated Secret: target/jkube/applyJson/default/secret-quasifact-com-secret-2.json
[INFO] k8s: Updating Service from kubernetes.yml
[INFO] k8s: Updated Service: target/jkube/applyJson/default/service-demo-2.json
[INFO] k8s: Updating CustomResourceDefinition from kubernetes.yml
[INFO] k8s: Updated CustomResourceDefinition: target/jkube/applyJson/default/customresourcedefinition-ingressroutes.traefik.containo.us-1.json
[INFO] k8s: Updating Deployment from kubernetes.yml
[INFO] k8s: Updated Deployment: target/jkube/applyJson/default/deployment-demo-1.json
[INFO] k8s: Updated Custom Resource: traefik.containo.us/v1alpha1#IngressRoute default/demo
[INFO] k8s: Updated Custom Resource: traefik.containo.us/v1alpha1#TLSOption default/exampletlsoption
[INFO] k8s: Updated Custom Resource: traefik.containo.us/v1alpha1#TLSOption default/quasifacttlsoption
[INFO] k8s: HINT: Use the command `kubectl get pods -w` to watch your pods start up
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.474 s
[INFO] Finished at: 2021-03-02T19:23:05+05:30
[INFO] ------------------------------------------------------------------------
demo : $ kubectl get ingressroute
NAME AGE
demo 72s
Closing as the reproducer project was working on v1.2-SNAPSHOT and the reporting user no longer exists. Please open a new issue for any other similar error.
Description
I have a springboot project that is using a IngressRoute (traefik CRD). With the help from @rohanKanojia it is now possible to deploy to kubernetes barebone cluster. However, when re-applying (mvn k8s:apply) it fails:
StackOverFlow Conversation: https://stackoverflow.com/questions/65984438
Info
Eclipse JKube version : 1.0.2
Maven version (
mvn -v
) : Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00) Maven home: /usr/local/Cellar/maven/3.6.0/libexec Java version: 11.0.2, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home Default locale: en_DK, platform encoding: US-ASCII OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"Kubernetes / Red Hat OpenShift setup and version : kubectl version Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.1", GitCommit:"c4d752765b3bbac2237bf87cf0b1c2e307844666", GitTreeState:"clean", BuildDate:"2020-12-18T12:00:47Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
If it's a bug, how to reproduce : mvn k8s:apply
run it twice
If it's a feature request, what is your use case :
Sample Reproducer Project : [GitHub Clone URL] git@bitbucket.org:emercos/demo.git