Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    robinroos
    @robinroos
    1 H: being inferred as the home directory
    2 Setting Windows env var for kube config file lopcation with surrounding double quotes
    Fine, so now I have a new error which I will look at tomorrow. Chances are the designated OpenShift base image is unavailable in my organization.
    [ERROR] Failed to execute goal org.eclipse.jkube:openshift-maven-plugin:1.0.1:build (default-cli) on project spring-boot: Failed to execute the build: Unable to build the image using the OpenShift build service: OpenShift Build spring-boot-s2i-1 failed: Failed: GenericBuildFailed -> [Help 1]
    Thanks for your help getting this far - greatly appreciated!
    robinroos
    @robinroos
    FTR, the following environment variables probably mean that openshift-maven-plugin was CORRECT to look for .kube/config within H:\
    HOMEDRIVE=H:
    HOMEPATH=\
    Marc Nuri
    @manusa
    Good to hear, yes those variables are used to determine the path for your kube config, so they were definitely breaking your setup.
    Regarding the new error the build log (hopefully shown before the error) should shed some light. You can also check the logs of the build Pod using your OpenShift web console.
    robinroos
    @robinroos
    Thank you Marc. I also need to check whether my account actually has permission to PUSH to OpenShift. Any ideas how I can establish that within OpenShift 4.3 itself?
    Marc Nuri
    @manusa
    I'm no OpenShift expert. You'll probably need to deal with RBAC authorizations.
    In general I think you should be able to build/push images within your namespace
    (project)
    robinroos
    @robinroos
    This seems to be the first sign of trouble:
    [INFO] oc: Successfully pushed image-registry.openshift-image-registry.svc:5000/cacheui/spring-boot:1.0.1
    [INFO] oc: Warning: Push failed, retrying in 5s ...
    robinroos
    @robinroos
    Then, a few lines later in the logs:
    [INFO] oc: panic: d.nx != 0
    followed by what looks like a heap dump of some sort.
    Marc Nuri
    @manusa
    Have you checked the logs in the pod used to perform the build?
    it should be named something like spring-boot-s2i-1-build
    Maybe the log is clearer there
    but it really seems a problem with your cluster
    Marc Nuri
    @manusa
    Hello everyone!
    Today we'll be hosting Eclipse's J4K virtual booth from 11 am to 1pm (EDT)
    https://www.crowdcast.io/e/j4kbooth_eclipse/4
    Please join us for the latest news about the project and to get live responses to any questions you may have
    Rohan Kumar
    @rohanKanojia
    Thanks for sharing! Looking forward to joining it :-)
    Rafael de Andrade Sousa
    @rafaelsousa
    Hi @all, I have the following maven config :
    <configuration>
                        <namespace>cassandra</namespace>
                        <imagePullPolicy>never</imagePullPolicy>
                        <images>
                            <image>
                                <name>pm/service-task</name>
                                <alias>service-task</alias>
                                <build>
                                    <from>openjdk:11</from>
                                    <assembly>
    ...
    </configuration>
    However, when running mvn k8s:build k8s:resource
    spec:
          containers:
          - env:
            - name: KUBERNETES_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: HOSTNAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            image: pm/service-task:latest
            imagePullPolicy: IfNotPresent
    The imagePullPolicy remains IfNotPresent.
    What am I doing wroing here?
    Thank you!
    You want to configure the pull policy for the enricher (not image)
    The XML configuration element is <pullPolicy>
    You can either use the property jkube.enricher.jkube-controller.pullPolicy
    Or:
    <configuration>
      <enricher>
        <config>
          <jkube-controller>
            <pullPolicy>Never</pullPolicy>
          </jkube-controller>
        </config>
      </enricher
    </configuration>
    Rafael de Andrade Sousa
    @rafaelsousa

    You can either use the property jkube.enricher.jkube-controller.pullPolicy

    Passed through command line?

    Thanks, it worked! However the outcome I was expecting didn't happen.
    I wanted the kubernetes deployment do not pull the image from a remote registry, since the image is already local
    Rafael de Andrade Sousa
    @rafaelsousa
    rsousa@tardis:~/Code/personalmanager/service-plannedtask$ docker image ls
    REPOSITORY                            TAG                   IMAGE ID            CREATED             SIZE
    pm/service-task                       latest                bed1bd90616c        2 minutes ago       675MB
    image.png
    (image is very small, :D)
    Marc Nuri
    @manusa

    Passed through command line?

    Maven properties:

    <properties>
      <jkube.enricher.jkube-controller.pullPolicy>Never</jkube.enricher.jkube-controller.pullPolicy>
    </properties>

    Or command line: mvn ... -Djkube.enricher.jkube-controller.pullPolicy=Never

    Rafael de Andrade Sousa
    @rafaelsousa
    Alright :) thank you
    Marc Nuri
    @manusa
    Regarding your problem, the default (IfNotPresent) should work as expected
    Are you sure that your cluster's registry has that image available?
    Rafael de Andrade Sousa
    @rafaelsousa
    the cluster registry is different from the docker registry?
    Marc Nuri
    @manusa
    Well, the cluster has an internal docker registry
    So if you are building your image in your machine, the docker registry in your machine is not the same as the one in the cluster
    if you are using Minikube you can use the remote/cluster Docker daemon by invoking $ eval $(minikube docker-env)
    Rafael de Andrade Sousa
    @rafaelsousa
    ❌ Exiting due to ENV_MULTINODE_CONFLICT: The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/
    rsousa@tardis:~/Software$