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/03/02 19:25:18 UTC

[GitHub] [solr-operator] janhoy opened a new issue #410: Support ArgoCD for the CRDs

janhoy opened a new issue #410:
URL: https://github.com/apache/solr-operator/issues/410


   When deploying Solr-Operator in [ArgoCD](https://argo-cd.readthedocs.io/en/stable/) using its Helm chart, you may get this error message:
   > reason: CustomResourceDefinition.apiextensions.k8s.io "solrclouds.solr.apache.org" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
   
   This is since ArgoCD uses `kubectl apply` by default, which then overflows some buffer. Explanation here: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/#replace-resource-instead-of-applying-changes
   
   The same does not happen during normal `helm install` since Helm uses another method of installing CRDs.
   
   This is not a bug in solr-operator, but there seems to be a very simple workaround, by adding this annotation to all our CRDs:
   
   ```yaml
   metadata:
     annotations:
       argocd.argoproj.io/sync-options: Replace=true
   ```
   
   This will tell Argo to use `kubectl replace` instead of apply, circumventing this limitation.


-- 
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 issue #410: Support ArgoCD for the CRDs

Posted by GitBox <gi...@apache.org>.
janhoy commented on issue #410:
URL: https://github.com/apache/solr-operator/issues/410#issuecomment-1057803676


   I tried this for an umbrella chart we use, manually adding this annotation to all four CRDs. And it solved the issue, so I think this is the way to go.
   
   If you manually "refresh" SolrCloud application inside ArgoCD, then it will not respect this annotation, you have to explicitly tick a checkbox. Perhaps we should add a tiny documentation in solr-operator about the CRDs being large and some tools (like Argo) may display an error. I suppose this github issue will now also be searchable :) 


-- 
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 issue #410: Support ArgoCD for the CRDs

Posted by GitBox <gi...@apache.org>.
HoustonPutman commented on issue #410:
URL: https://github.com/apache/solr-operator/issues/410#issuecomment-1058246435


   I imagine ArgoCD may also fix the "refresh" functionality, because that definitely seems like a bug.
   
   Think this is a great idea!


-- 
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 issue #410: Support ArgoCD for the CRDs

Posted by GitBox <gi...@apache.org>.
janhoy commented on issue #410:
URL: https://github.com/apache/solr-operator/issues/410#issuecomment-1057306381


   Note, I have not tried this, so not sure whether it will work on CRD resources. The solr-operator chart has the huge `crds/crds.yaml` file, not sure whether Argo applies it in one go or iterates one resource at a time, respecting the `sync-options` per-resource  or per-file. It would be interesting to test though.


-- 
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] thelabdude commented on issue #410: Support ArgoCD for the CRDs

Posted by GitBox <gi...@apache.org>.
thelabdude commented on issue #410:
URL: https://github.com/apache/solr-operator/issues/410#issuecomment-1057299455


   Nice find @janhoy ! others have hit this as well, would be good to include


-- 
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 closed issue #410: Support ArgoCD for the CRDs

Posted by GitBox <gi...@apache.org>.
HoustonPutman closed issue #410:
URL: https://github.com/apache/solr-operator/issues/410


   


-- 
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 issue #410: Support ArgoCD for the CRDs

Posted by GitBox <gi...@apache.org>.
HoustonPutman commented on issue #410:
URL: https://github.com/apache/solr-operator/issues/410#issuecomment-1058249104


   Also these files are autogenerated, and it looks like controller-gen does not support adding annotations to the generated CRDs yet... https://github.com/kubernetes-sigs/controller-tools/issues/656 
   
   I'm sure we can find a workaround until controller-gen supports it natively.


-- 
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