You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/12/16 08:30:21 UTC

[GitHub] [couchdb-helm] lbruun opened a new issue, #103: Idempotent Helm chart install action?

lbruun opened a new issue, #103:
URL: https://github.com/apache/couchdb-helm/issues/103

   
   
   I wonder what stance is on **idempotency** of the CouchDB Helm chart install action?    It seems to be a debated issue in the Helm world, but one which the CouchDB Helm Chart needs to relate to.
   
   From what I can tell, most people treat Helm actions as something which doesn't belong in a CI/CD, for the reason that they cannot interpret if the given chart provides idempotency. Helm as such makes no promises and to my knowledge there's no best practice for Helm chart developers.
   
   Below is the presumably (?) the general way to make a helm 'install' action idempotent:
   
       helm upgrade --install couchdb couchdb/couchdb         \
         --version "<fixed-value>"                                    
   
   rather than 
   
       helm install couchdb/couchdb
   
   ## What is the problem?
   
   With the CouchDB helm chart and with the desire to have the Secret automatically created on first-time install, this will not work. What happens is that **the Secret will be updated with new values for every invocation**. This will of course create havoc.
   
   I don't know what the best solution is. CI/CD developers would want to put the helm action into their pipeline and as such they are looking (expecting?) for **idempotency**. At the very least, the CouchDB helm chart can document where it stands on this.
   
   ## Ideas for improvements on CouchDB helm chart
   
   In  terms of making sure the chart action is idempotent, I believe the only potential culprit is the Secret. The other Kubernetes objects are okay to be re-applied (by design). Some ideas on the Secret:  Look into the use of immutable Secrets introduced in Kubernetes 1.21 or maybe have a chart option `createSecretIfNotExists`. Or something.
   
   ## Workaround
   A workaround at the moment would be to do:
   
   ```bash
   #!/bin/bash
   if ! helm status -n $namespace couchdb &> /dev/null; then
     helm install couchdb/couchdb                           \
       --namespace $namespace                               \
       ...
   fi
   ```
   
   
   
   


-- 
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: notifications-unsubscribe@couchdb.apache.org.apache.org

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


[GitHub] [couchdb-helm] colearendt commented on issue #103: Idempotent Helm chart install action?

Posted by GitBox <gi...@apache.org>.
colearendt commented on issue #103:
URL: https://github.com/apache/couchdb-helm/issues/103#issuecomment-1354761517

   This is a bit related to #89, #74 , #92 


-- 
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: notifications-unsubscribe@couchdb.apache.org

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