Comments (5)
@mhd-robaii I think your issue is related to how the secret that is reference here was created:
Registry:
Address: eu.gcr.io
Insecure: true
Organization: iot-staging-3
Secret: camel-k-builder
If you have done so using a command like this:
kubectl create secret generic camel-k-builder --from-file=your-key.json
you will get the authorization error, because that is not the format that Spectrum expects.
I had the same issue and fixed it by creating the secret like below:
kubectl create secret docker-registry camel-k-builder \
--docker-server=gcr.io \
--docker-username=_json_key \
--docker-password="$(cat your-key.json)" \
[email protected]
where the secret type is docker-registry and not generic.
The username and email can be any one, they're not really used, and the server should be adjusted for your registry.
from camel-k.
Thanks Sergio
now it works perfectly, the problem was that I created the key as generic (same as the key for kaniko).
After I download key.json from google is to join all the lines in the json into one row. For this I replaced cat
with paste
kubectl create secret docker-registry camel-k-builder \
--docker-server=https://eu.gcr.io \
--docker-username=_json_key \
--docker-password="$(paste -s gcp.json)" \
[email protected]
from camel-k.
@mhd-robaii take a look at this issue I opened some time ago with the same problem: #4955
You will have to switch from Kaniko to other publish strategy
from camel-k.
Thanks Sergio, I would like to try Spectrum but I'm having trouble configuring it with gcp.
I followed the steps of the guide https://camel.apache.org/camel-k/next/installation/registry/gcr.html to create a new service-account and created the new secret.
kubectl describe IntegrationPlatform camel-k
Name: camel-k
Namespace: connectors
Labels: app=camel-k
Annotations: camel.apache.org/operator.id: camel-k
API Version: camel.apache.org/v1
Kind: IntegrationPlatform
Metadata:
Creation Timestamp: 2024-03-07T17:52:55Z
Generation: 1
Resource Version: 375770020
UID: d76b3b72
Spec:
Build:
Build Configuration:
Maven:
Settings:
Settings Security:
Publish Strategy: Spectrum
Registry:
Address: eu.gcr.io
Insecure: true
Organization: iot-staging-3
Secret: camel-k-builder
Kamelet:
Traits:
Status:
Build:
Publish Strategy Options:
Kaniko Persistent Volume Claim: camel-k
Base Image: eclipse-temurin:17
Build Configuration:
Order Strategy: sequential
Strategy: routine
Maven:
Cli Options:
-V
--no-transfer-progress
-Dstyle.color=never
Local Repository: /etc/maven/m2
Max Running Builds: 3
Publish Strategy: Spectrum
Registry:
Address: eu.gcr.io
Insecure: true
Organization: iot-staging-3
Secret: camel-k-builder
Runtime Version: 3.2.3
Timeout: 5m0s
Cluster: Kubernetes
Conditions:
Last Transition Time: 2024-03-07T17:52:57Z
Last Update Time: 2024-03-07T17:52:57Z
Message: integration platform created
Reason: IntegrationPlatformCreated
Status: True
Type: Created
Last Transition Time: 2024-03-07T17:52:57Z
Last Update Time: 2024-03-07T17:52:57Z
Message: registry available at eu.gcr.io
Reason: IntegrationPlatformRegistryAvailable
Status: True
Type: RegistryAvailable
Info:
Git Commit: c6a9348d8467f68800dabb7c845a411765fad8e3
Go OS: linux
Go Version: go1.21.0
Kamelet:
Repositories:
Uri: none
Observed Generation: 1
Phase: Ready
Version: 2.2.0
Events: <none>
with spectrum as pubblisher I can't publish images on gcp because it returns an UNAUTHORIZED error
Build kit-cnkvvag1vpvc73ep7grg failed: GET https://eu.gcr.io/v2/token?scope=repository%3Aiot-staging-3%2Fcamel-k-kit-cnkvvag1vpvc73ep7grg%3Apush%2Cpull&service=eu.gcr.io: UNAUTHORIZED: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication"
kamel install command that I used:
kamel install \
--olm=false \
--registry eu.gcr.io \
--organization iot-staging-3 \
--registry-insecure \
--registry-secret camel-k-builder \
--build-publish-strategy Spectrum \
--log-level=debug \
-n connectors
Any idea how to configure spectrum with gcp registry?
Thanks in advance.
from camel-k.
Fixed thanks.
from camel-k.
Related Issues (20)
- Helm release script overrides all index dates HOT 1
- Consistently support "cloudEventsType" property in Pipes source/sink
- Give the operator the possibility to build an Integration without running HOT 2
- ImagePullBackOff Error for pod build strategy and s2i publish strategy HOT 5
- Nightly release note still define ARM64 specific instructions
- Bring back Quarkus native test in PR HOT 2
- Set default containers resources
- maven-settings-offline-template.xml does not contain license
- TLS support of Knative HOT 1
- Cannot execute 'kamel install' to a GKE cluster HOT 1
- OIDC support HOT 1
- Deprecate `kamel install` and change default installation to kustomize/helm/olm? HOT 1
- Remove `STAGING_RUNTIME_REPO` variable from Makefile HOT 2
- Documentation links to old Camel K examples location
- Trait annotations saved on the IntegrationKit resource HOT 3
- Modeline container.port trait config set as String value HOT 1
- Pipe is waiting forever on Revision to become available
- Service/KService not created for vertx-websocket consumers HOT 1
- Add license header file check workflow on PR in CI HOT 1
- Installation tests are unstable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camel-k.