Uploaded image for project: 'Fuse Tooling'
  1. Fuse Tooling
  2. FUSETOOLS-3396

Unable to deploy Fuse Integration Project to OpenShift 4.x

    XMLWordPrintable

Details

    • Bug
    • Resolution: Can't Do
    • Major
    • 11.10.0
    • 11.9.0
    • Deployment
    • None
    • Hide
      1. create a new Fuse Integration Project ("SpringBoot on OpenShift" template, the latest Camel version)
      2. create a new connection in OpenShift Explorer
      3. create a new project on OpenShift - os-test
      4. open Maven Build launch configuration "Deploy ${project.name} on OpenShift"
      5. change VM argument 'kubernetes.master'
      6. run the build and wait until the end of the build
      7. check the deployment
      Show
      create a new Fuse Integration Project ("SpringBoot on OpenShift" template, the latest Camel version) create a new connection in OpenShift Explorer create a new project on OpenShift - os-test open Maven Build launch configuration "Deploy ${project.name} on OpenShift" change VM argument 'kubernetes.master' run the build and wait until the end of the build check the deployment
    • Workaround Exists
      • on commandline use `oc login`
      • remove all parameters from JRE tab of the launch configuration
      • Run the launch configuration
    • Undefined

    Description

      used VM args

      -Dkubernetes.master=https://api.<kubernetes.master>:6443
      -Dkubernetes.namespace=os-test
      -Dkubernetes.auth.basic.username=<username>
      -Dkubernetes.auth.basic.password=<password>
      -Dfabric8.mode=openshift
      -Dkubernetes.trust.certificates=true
      -Dfabric8.build.strategy=s2i
      -Dkubernetes.auth.tryServiceAccount=false
      -Dfabric8.generator.from=registry.access.redhat.com/fuse7/fuse-java-openshift
      -Dfabric8.generator.fromMode=docker
      -Dkubernetes.auth.tryKubeConfig=false
      

       

      INFO] F8: Running in OpenShift mode
      [INFO] F8: Using docker image name of namespace: os-test
      [INFO] F8: Running generator spring-boot
      [INFO] F8: spring-boot: Using Docker image registry.access.redhat.com/fuse7/fuse-java-openshift as base / builder
      [INFO] F8: using resource templates from /Users/djelinek/develop/workspaces/1218ga-manual/test/src/main/fabric8
      [INFO] F8: fmp-service: Adding a default service 'camel-ose-springboot-xml' with ports [8080]
      [INFO] F8: spring-boot-health-check: Adding readiness probe on port 8081, path='/health', scheme='HTTP', with initial delay 10 seconds
      [INFO] F8: spring-boot-health-check: Adding liveness probe on port 8081, path='/health', scheme='HTTP', with initial delay 180 seconds
      [INFO] F8: f8-service-discovery: Using first mentioned service port '8080' 
      [INFO] F8: fmp-revision-history: Adding revision history limit to 2
      [INFO] F8: f8-icon: Adding icon for deployment
      [INFO] F8: f8-icon: Adding icon for service
      [INFO] F8: validating /Users/djelinek/develop/workspaces/1218ga-manual/test/target/classes/META-INF/fabric8/openshift/camel-ose-springboot-xml-route.yml resource
      [INFO] F8: validating /Users/djelinek/develop/workspaces/1218ga-manual/test/target/classes/META-INF/fabric8/openshift/camel-ose-springboot-xml-deploymentconfig.yml resource
      [WARNING] F8: Invalid Resource : /Users/djelinek/develop/workspaces/1218ga-manual/test/target/classes/META-INF/fabric8/openshift/camel-ose-springboot-xml-deploymentconfig.yml
      [message=.spec.template.spec.containers[0].resources.limits.cpu: string found, object expected, violation type=type]
      [message=.spec.template.spec.containers[0].resources.requests.cpu: string found, object expected, violation type=type]
      [INFO] F8: validating /Users/djelinek/develop/workspaces/1218ga-manual/test/target/classes/META-INF/fabric8/kubernetes/camel-ose-springboot-xml-svc.yml resource
      [INFO] F8: validating /Users/djelinek/develop/workspaces/1218ga-manual/test/target/classes/META-INF/fabric8/kubernetes/camel-ose-springboot-xml-deployment.yml resource
      [WARNING] F8: Invalid Resource : /Users/djelinek/develop/workspaces/1218ga-manual/test/target/classes/META-INF/fabric8/kubernetes/camel-ose-springboot-xml-deployment.yml
      [message=.spec.template.spec.containers[0].resources.limits.cpu: string found, object expected, violation type=type]
      [message=.spec.template.spec.containers[0].resources.requests.cpu: string found, object expected, violation type=type]
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ camel-ose-springboot-xml ---
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 1 source file to /Users/djelinek/develop/workspaces/1218ga-manual/test/target/classes
      [INFO] 
      [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ camel-ose-springboot-xml ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /Users/djelinek/develop/workspaces/1218ga-manual/test/src/test/resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.6.0:testCompile (default-testCompile) @ camel-ose-springboot-xml ---
      [INFO] No sources to compile
      [INFO] 
      [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ camel-ose-springboot-xml ---
      [INFO] No tests to run.
      [INFO] 
      [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ camel-ose-springboot-xml ---
      [INFO] Building jar: /Users/djelinek/develop/workspaces/1218ga-manual/test/target/camel-ose-springboot-xml-1.0.0-SNAPSHOT.jar
      [INFO] 
      [INFO] --- spring-boot-maven-plugin:7.7.0.fuse-770012-redhat-00003:repackage (default) @ camel-ose-springboot-xml ---
      [INFO] 
      [INFO] --- fabric8-maven-plugin:7.7.0.fuse-770012-redhat-00003:build (default) @ camel-ose-springboot-xml ---
      [INFO] F8: Using OpenShift build with strategy S2I
      [WARNING] F8: Cannot access cluster for detecting mode: Failure executing: GET at: https://api.openshift4.cluster.adapters-crs-qe.com:6443/. Message: forbidden: User "system:anonymous" cannot get path "/". Received status: Status(apiVersion=v1, code=403, details=StatusDetails(causes=[], group=null, kind=null, name=null, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=forbidden: User "system:anonymous" cannot get path "/", metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=Forbidden, status=Failure, additionalProperties={}).
      [INFO] F8: Running generator spring-boot
      [INFO] F8: spring-boot: Using Docker image registry.access.redhat.com/fuse7/fuse-java-openshift as base / builder
      [WARNING] F8: Cannot access cluster for detecting mode: Failure executing: GET at: https://api.openshift4.cluster.adapters-crs-qe.com:6443/. Message: forbidden: User "system:anonymous" cannot get path "/". Received status: Status(apiVersion=v1, code=403, details=StatusDetails(causes=[], group=null, kind=null, name=null, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=forbidden: User "system:anonymous" cannot get path "/", metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=Forbidden, status=Failure, additionalProperties={}).
      [ERROR] F8: Failed to execute the build [io.fabric8.kubernetes.client.DefaultKubernetesClient cannot be cast to io.fabric8.openshift.client.OpenShiftClient]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  5.819 s
      [INFO] Finished at: 2021-01-20T20:53:24+01:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.jboss.redhat-fuse:fabric8-maven-plugin:7.7.0.fuse-770012-redhat-00003:build (default) on project camel-ose-springboot-xml: Failed to execute the build: io.fabric8.kubernetes.client.DefaultKubernetesClient cannot be cast to io.fabric8.openshift.client.OpenShiftClient -> [Help 1]
      [ERROR] 
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
      

      Attachments

        Issue Links

          Activity

            People

              apupier@redhat.com Aurélien Pupier
              djelinek Dominik Jelínek
              Dominik Jelínek Dominik Jelínek
              Aurélien Pupier
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: