You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "lsergio (via GitHub)" <gi...@apache.org> on 2023/12/21 12:02:28 UTC

[I] Ability to configure pull-secret trait when installing camel-k [camel-k]

lsergio opened a new issue, #5003:
URL: https://github.com/apache/camel-k/issues/5003

   ### Requirement
   
   When installing Camel K we currenly use a GCR private repository to store the docker images.
   To be able to push to this repo, we specify `--registry-secret gcr-json-key` during installation.
   But after installing, we still need to edit the IntegrationPlatform and add the trait:
   ```
   traits:
     pull-secret:
       secretName: gcr-json-key
   
   ```
   It would be nice to configure this traits with a cli parameter.
   
   ### Problem
   
   The problem is not unsolvable, as we can edit the IP. It would help our installation pipelines.  
   
   ### Proposal
   
   We could either use the same value provided for `--registry-secret` or create a new parameter to configure the trait.
   
   ### Open questions
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Ability to configure pull-secret trait when installing camel-k [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #5003:
URL: https://github.com/apache/camel-k/issues/5003#issuecomment-1866324768

   I am not sure to understand. This should be the behavior that already exists, see [1]. If it's not working, maybe it's a bug when trying to pull secret, but in theory, it should work ootb without having to set the trait.
   
   [1] https://github.com/apache/camel-k/blob/d518d63c61262bfee05a8e628b7d3f6a86acdcfb/pkg/cmd/install.go#L471


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Ability to configure pull-secret trait when installing camel-k [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #5003:
URL: https://github.com/apache/camel-k/issues/5003#issuecomment-1866549927

   Then there is something failing as that should be the default behavior, ie, the user should not provide the trait configuration if the ITP is configured with the pull secret. Also looking at the code, it seems it is the way the trait works:
   https://github.com/apache/camel-k/blob/d518d63c61262bfee05a8e628b7d3f6a86acdcfb/pkg/trait/pull_secret.go#L58-L71
   Please, verify that your IntegrationPlatform is properly reconciled and the secret is provided in the status.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Ability to configure pull-secret trait when installing camel-k [camel-k]

Posted by "lsergio (via GitHub)" <gi...@apache.org>.
lsergio closed issue #5003: Ability to configure pull-secret trait when installing camel-k
URL: https://github.com/apache/camel-k/issues/5003


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Ability to configure pull-secret trait when installing camel-k [camel-k]

Posted by "lsergio (via GitHub)" <gi...@apache.org>.
lsergio commented on issue #5003:
URL: https://github.com/apache/camel-k/issues/5003#issuecomment-1866436941

   This is how my IntegrationPlatform is set up after installation:
   ```
   apiVersion: camel.apache.org/v1
   kind: IntegrationPlatform
   metadata:
     annotations:
       camel.apache.org/operator.id: camel-k
     creationTimestamp: "2023-12-21T13:57:29Z"
     generation: 2
     labels:
       app: camel-k
     name: camel-k
     namespace: lsergio
     resourceVersion: "5630715"
     uid: 5d97140d-72b1-4f4d-9ce4-cb145f7b9a6e
   spec:
     build:
       buildConfiguration: {}
       maven:
         settings:
           configMapKeyRef:
             key: settings.xml
             name: camel-k-maven-settings
         settingsSecurity: {}
       registry:
         address: gcr.io
         organization: my-project-id
         secret: gcr-json-key <-- the secret is correcly set here
       runtimeVersion: 3.2.0
     kamelet: {}
     traits: {} <-- but the traits are empty
   ```
   And then I add:
   ```
   traits:
     pull-secret:
       secretName: gcr-json-key
   ```
   to make it work.
   
   It has been happening at least since 1.2.x, but I thought that was intentional 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Ability to configure pull-secret trait when installing camel-k [camel-k]

Posted by "lsergio (via GitHub)" <gi...@apache.org>.
lsergio commented on issue #5003:
URL: https://github.com/apache/camel-k/issues/5003#issuecomment-1866660051

   Providing more detail to why this has happened. With 1.2.x and Kaniko we had to use different secret formats for pushing and pulling the image from GCR. Thus when I didn't configure the trait, pulling would fail with bad credentials.
   With spectrum and 2.1.0 I can use the same secret for both pulling and pushing, but I haven't realized that and kept configuring the trait.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Ability to configure pull-secret trait when installing camel-k [camel-k]

Posted by "lsergio (via GitHub)" <gi...@apache.org>.
lsergio commented on issue #5003:
URL: https://github.com/apache/camel-k/issues/5003#issuecomment-1866651416

   You're right. After uninstalling and reinstalling everything from scratch I got it to work without editing the ITP.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Ability to configure pull-secret trait when installing camel-k [camel-k]

Posted by "lsergio (via GitHub)" <gi...@apache.org>.
lsergio commented on issue #5003:
URL: https://github.com/apache/camel-k/issues/5003#issuecomment-1866133278

   I can also contribute and work on this if the suggestion is approved.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Ability to configure pull-secret trait when installing camel-k [camel-k]

Posted by "lsergio (via GitHub)" <gi...@apache.org>.
lsergio commented on issue #5003:
URL: https://github.com/apache/camel-k/issues/5003#issuecomment-1866439413

   If I don't add the trait, the integration fails to download the image from the private repo.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org