You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/11/01 13:19:25 UTC

[GitHub] [solr-operator] janhoy opened a new pull request, #485: Draft: Support for Projected Volume

janhoy opened a new pull request, #485:
URL: https://github.com/apache/solr-operator/pull/485

   This is my first attempt at a contribution to the operator, implementing #484. But I cannot get the debugger working in IDEA so I'm not sure where it goes wrong.
   
   Fixes #484 


-- 
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: issues-unsubscribe@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr-operator] HoustonPutman commented on pull request #485: Support for Projected Volume

Posted by GitBox <gi...@apache.org>.
HoustonPutman commented on PR #485:
URL: https://github.com/apache/solr-operator/pull/485#issuecomment-1298581924

   > Digging some more, I see that in the spec, `corev1.ProjectedVolumeSource` is alredy a child of `corev1.VolumeSource`
   
   Yeah it looks like that is the case! It sounds like you had a use case for it, so do you want to give it a try and see how it works?
   
   Looks like its there in the documentation, so this isn't a thing in the v1.20 Kube APIs (the version of the code dependency that we are using) that was removed in a later version.


-- 
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: issues-unsubscribe@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr-operator] HoustonPutman commented on pull request #485: Support for Projected Volume

Posted by GitBox <gi...@apache.org>.
HoustonPutman commented on PR #485:
URL: https://github.com/apache/solr-operator/pull/485#issuecomment-1298587121

   But your PR is quite close, you've done a good job!
   
   You would have had two steps left:
   - Actually set the projected volume on the pods in the controller (you have just created a CRD entry and test, the test fails because you aren't actually using the information from the CRD to set the Pod).
     - https://github.com/apache/solr-operator/blob/main/controllers/util/solr_util.go#L237
     - https://github.com/apache/solr-operator/blob/main/controllers/util/prometheus_exporter_util.go#L158
   - Run `make prepare` to do the code/config generation and auto format everything.


-- 
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: issues-unsubscribe@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr-operator] janhoy commented on pull request #485: Support for Projected Volume

Posted by GitBox <gi...@apache.org>.
janhoy commented on PR #485:
URL: https://github.com/apache/solr-operator/pull/485#issuecomment-1298597724

   I tested the yaml above and it actually works - I now have the `/var/run/secrets/tokens/sa-token` file in my pod! Closing this. Perhaps I'll add another PR to document how to mount a projected volume.


-- 
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: issues-unsubscribe@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr-operator] janhoy closed pull request #485: Support for Projected Volume

Posted by GitBox <gi...@apache.org>.
janhoy closed pull request #485: Support for Projected Volume
URL: https://github.com/apache/solr-operator/pull/485


-- 
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: issues-unsubscribe@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr-operator] janhoy commented on pull request #485: Support for Projected Volume

Posted by GitBox <gi...@apache.org>.
janhoy commented on PR #485:
URL: https://github.com/apache/solr-operator/pull/485#issuecomment-1298500481

   The test output is
   
   ```
   • Failure [1.304 seconds]
   SolrCloud controller - General
   /Users/janhoy/git/solr-operator/controllers/solrcloud_controller_test.go:35
     Solr Cloud with Projected Volume
     /Users/janhoy/git/solr-operator/controllers/solrcloud_controller_test.go:707
       has the correct resources [It]
       /Users/janhoy/git/solr-operator/controllers/solrcloud_controller_test.go:725
   
       Additional Volume from podOptions not loaded into pod properly.
       Expected
           <*v1.ProjectedVolumeSource | 0x0>: nil
       to equal
           <*v1.ProjectedVolumeSource | 0x106e1c780>: {
               Sources: [
                   {
                       Secret: nil,
                       DownwardAPI: nil,
                       ConfigMap: nil,
                       ServiceAccountToken: {
                           Audience: "My.Audience",
                           ExpirationSeconds: 300,
                           Path: "token",
                       },
                   },
               ],
               DefaultMode: nil,
           }
   
       /Users/janhoy/git/solr-operator/controllers/solrcloud_controller_test.go:736
   ```


-- 
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: issues-unsubscribe@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr-operator] janhoy commented on pull request #485: Support for Projected Volume

Posted by GitBox <gi...@apache.org>.
janhoy commented on PR #485:
URL: https://github.com/apache/solr-operator/pull/485#issuecomment-1298538512

   Digging some more, I see that in the spec, `corev1.ProjectedVolumeSource` is alredy a child of `corev1.VolumeSource`, so perhaps this already is supported by nesting `projected` inside `source` instead of the shortcut form documented in https://kubernetes.io/docs/concepts/storage/projected-volumes/#example-configuration-secret-downwardapi-configmap?
   
   ```yaml
   solr:
     podOptions:
       volumes:
         # Map service account JWT token onto a volume
         - name: sa-token-vol
           defaultContainerMount:
             mountPath: /var/run/secrets/tokens
             name: sa-token-vol
           source:
             projected:
               sources:
                 - serviceAccountToken:
                     path: sa-token
                     expirationSeconds: 86400
                     audience: myAudience
   ```


-- 
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: issues-unsubscribe@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org