You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Roberto Camelk <be...@gmail.com> on 2021/12/09 19:14:28 UTC
Camel-k operator fails on building
I installed camel-k in my "default" namespace in minikube. This is my scripts:
read -p 'Dockerhub organization: ' dockerorganization
read -p 'Dockerhub user name: ' dockeruser
read -sp 'Dockerhub user password: ' dockerpassword
kubectl \
-n camel \
create secret docker-registry camel-k-registry-secret \
--docker-username $dockeruser \
--docker-password "$dockerpassword"
kamel install \
--force \
--build-publish-strategy=Spectrum \
--olm=false \
-n default \
--operator-resources requests.cpu=100m \
--operator-resources limits.cpu=200m \
--operator-resources requests.memory=256Mi \
--operator-resources limits.memory=1024Mi \
--registry docker.io \
--organization $dockerorganization \
--registry-secret camel-k-registry-secret \
--wait
Bu when I try to run my integration, the build fails with:
{"level":"info","ts":1639077040.119277,"logger":"camel-k.builder","msg":"base
image: adoptopenjdk/openjdk11:slim"}
{"level":"info","ts":1639077040.1192799,"logger":"camel-k.builder","msg":"resolved
base image: adoptopenjdk/openjdk11:slim"}
{"level":"error","ts":1639077040.1429865,"logger":"camel-k.controller.build","msg":"Build
kit-c6p503epuevc73829220 failed: secrets \"camel-k-registry-secret\"
not found","request-namespace":"default","request-name":"kit-c6p503epuevc73829220","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-c6p503epuevc73829220"}
{"level":"info","ts":1639077040.2197232,"logger":"camel-k.controller.build","msg":"state
transition","request-namespace":"default","request-name":"kit-c6p503epuevc73829220","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-c6p503epuevc73829220","phase-from":"Running","phase-to":"Failed"}
{"level":"info","ts":1639077040.2216291,"logger":"camel-k.controller.build","msg":"Reconciling
Build","request-namespace":"default","request-name":"kit-c6p503epuevc73829220"}
{"level":"info","ts":1639077040.2217255,"logger":"camel-k.controller.build","msg":"Invoking
action error-recovery","request-namespace":"default","request-name":"kit-c6p503epuevc73829220","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-c6p503epuevc73829220"}
{"level":"info","ts":1639077040.2217386,"logger":"camel-k.controller.build","msg":"Recovery
attempt (5/5)","request-namespace":"default","request-name":"kit-c6p503epuevc73829220","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-c6p503epuevc73829220"}
Re: Camel-k operator fails on building
Posted by Roberto Camelk <be...@gmail.com>.
Yes, I found the problem. Thanks and sorry....
On Thu, Dec 9, 2021 at 4:38 PM Antonin Stefanutti
<an...@stefanutti.fr.invalid> wrote:
>
> The build fails because it cannot find the specified registry Secret.
>
> It seems you created the Secret in the `camel` namespace, while the operator and the build run in the `default` namespace.
>
> > On 9 Dec 2021, at 20:14, Roberto Camelk <be...@gmail.com> wrote:
> >
> > I installed camel-k in my "default" namespace in minikube. This is my scripts:
> >
> > read -p 'Dockerhub organization: ' dockerorganization
> > read -p 'Dockerhub user name: ' dockeruser
> > read -sp 'Dockerhub user password: ' dockerpassword
> >
> > kubectl \
> > -n camel \
> > create secret docker-registry camel-k-registry-secret \
> > --docker-username $dockeruser \
> > --docker-password "$dockerpassword"
> >
> > kamel install \
> > --force \
> > --build-publish-strategy=Spectrum \
> > --olm=false \
> > -n default \
> > --operator-resources requests.cpu=100m \
> > --operator-resources limits.cpu=200m \
> > --operator-resources requests.memory=256Mi \
> > --operator-resources limits.memory=1024Mi \
> > --registry docker.io \
> > --organization $dockerorganization \
> > --registry-secret camel-k-registry-secret \
> > --wait
> >
> > Bu when I try to run my integration, the build fails with:
> >
> > {"level":"info","ts":1639077040.119277,"logger":"camel-k.builder","msg":"base
> > image: adoptopenjdk/openjdk11:slim"}
> > {"level":"info","ts":1639077040.1192799,"logger":"camel-k.builder","msg":"resolved
> > base image: adoptopenjdk/openjdk11:slim"}
> > {"level":"error","ts":1639077040.1429865,"logger":"camel-k.controller.build","msg":"Build
> > kit-c6p503epuevc73829220 failed: secrets \"camel-k-registry-secret\"
> > not found","request-namespace":"default","request-name":"kit-c6p503epuevc73829220","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-c6p503epuevc73829220"}
> > {"level":"info","ts":1639077040.2197232,"logger":"camel-k.controller.build","msg":"state
> > transition","request-namespace":"default","request-name":"kit-c6p503epuevc73829220","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-c6p503epuevc73829220","phase-from":"Running","phase-to":"Failed"}
> > {"level":"info","ts":1639077040.2216291,"logger":"camel-k.controller.build","msg":"Reconciling
> > Build","request-namespace":"default","request-name":"kit-c6p503epuevc73829220"}
> > {"level":"info","ts":1639077040.2217255,"logger":"camel-k.controller.build","msg":"Invoking
> > action error-recovery","request-namespace":"default","request-name":"kit-c6p503epuevc73829220","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-c6p503epuevc73829220"}
> > {"level":"info","ts":1639077040.2217386,"logger":"camel-k.controller.build","msg":"Recovery
> > attempt (5/5)","request-namespace":"default","request-name":"kit-c6p503epuevc73829220","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-c6p503epuevc73829220"}
>
Re: Camel-k operator fails on building
Posted by Antonin Stefanutti <an...@stefanutti.fr.INVALID>.
The build fails because it cannot find the specified registry Secret.
It seems you created the Secret in the `camel` namespace, while the operator and the build run in the `default` namespace.
> On 9 Dec 2021, at 20:14, Roberto Camelk <be...@gmail.com> wrote:
>
> I installed camel-k in my "default" namespace in minikube. This is my scripts:
>
> read -p 'Dockerhub organization: ' dockerorganization
> read -p 'Dockerhub user name: ' dockeruser
> read -sp 'Dockerhub user password: ' dockerpassword
>
> kubectl \
> -n camel \
> create secret docker-registry camel-k-registry-secret \
> --docker-username $dockeruser \
> --docker-password "$dockerpassword"
>
> kamel install \
> --force \
> --build-publish-strategy=Spectrum \
> --olm=false \
> -n default \
> --operator-resources requests.cpu=100m \
> --operator-resources limits.cpu=200m \
> --operator-resources requests.memory=256Mi \
> --operator-resources limits.memory=1024Mi \
> --registry docker.io \
> --organization $dockerorganization \
> --registry-secret camel-k-registry-secret \
> --wait
>
> Bu when I try to run my integration, the build fails with:
>
> {"level":"info","ts":1639077040.119277,"logger":"camel-k.builder","msg":"base
> image: adoptopenjdk/openjdk11:slim"}
> {"level":"info","ts":1639077040.1192799,"logger":"camel-k.builder","msg":"resolved
> base image: adoptopenjdk/openjdk11:slim"}
> {"level":"error","ts":1639077040.1429865,"logger":"camel-k.controller.build","msg":"Build
> kit-c6p503epuevc73829220 failed: secrets \"camel-k-registry-secret\"
> not found","request-namespace":"default","request-name":"kit-c6p503epuevc73829220","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-c6p503epuevc73829220"}
> {"level":"info","ts":1639077040.2197232,"logger":"camel-k.controller.build","msg":"state
> transition","request-namespace":"default","request-name":"kit-c6p503epuevc73829220","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-c6p503epuevc73829220","phase-from":"Running","phase-to":"Failed"}
> {"level":"info","ts":1639077040.2216291,"logger":"camel-k.controller.build","msg":"Reconciling
> Build","request-namespace":"default","request-name":"kit-c6p503epuevc73829220"}
> {"level":"info","ts":1639077040.2217255,"logger":"camel-k.controller.build","msg":"Invoking
> action error-recovery","request-namespace":"default","request-name":"kit-c6p503epuevc73829220","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-c6p503epuevc73829220"}
> {"level":"info","ts":1639077040.2217386,"logger":"camel-k.controller.build","msg":"Recovery
> attempt (5/5)","request-namespace":"default","request-name":"kit-c6p503epuevc73829220","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-c6p503epuevc73829220"}