orange-cloudfoundry / helm-kubectl-boshrelease

https://orange-cloudfoundry.github.io/helm-kubectl-boshrelease/
Apache License 2.0
6 stars 1 forks source link

helm install action should offer granular / faithfull flags wrt to helm cli #24

Open poblin-orange opened 3 years ago

poblin-orange commented 3 years ago

As of v35, the helm kubectl bosh release takes opiniated choices for helm chart installation (eg: --atomic). An additionnal debug propery is present, combining native helm install/upgrade flag, but cant be used in production. More faithfull mapping of helm install cli will help portability to non bosh hosting.

eg set of interesting properties wich could be added:

  --atomic                       if set, upgrade process rolls back changes made in case of failed upgrade. The --wait flag will be set automatically if --atomic is used
  --cleanup-on-fail              allow deletion of new resources created in this upgrade when upgrade fails
  --create-namespace             if --install is set, create the release namespace if not present
  --disable-openapi-validation   if set, the upgrade process will not validate rendered templates against the Kubernetes OpenAPI Schema
  --dry-run                      simulate an upgrade
  --force                        force resource updates through a replacement strategy
  --no-hooks                     disable pre/post upgrade hooks
  --post-renderer postrenderer   the path to an executable to be used for post rendering. If it exists in $PATH, the binary will be used, otherwise it will try to look for the executable at the given path (default exec)
  --render-subchart-notes        if set, render subchart notes along with the parent
  --reset-values                 when upgrading, reset the values to the ones built into the chart
  --reuse-values                 when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored
  --set-file stringArray         set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
  --skip-crds                    if set, no CRDs will be installed when an upgrade is performed with install flag enabled. By default, CRDs are installed if not already present, when an upgrade is performed with install flag enabled
  --timeout duration             time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s)
  --verify                       verify the package before using it
  --wait                         if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as successful. It will wait for as long as --timeout
obeyler commented 3 years ago

the choise to set --atomic --cleanup-on-fail to install chart was taken to keep the install "clean" by default. the flag -debug=true remove this two flag to let the developper see what was wrong during install.

we can add more options to map exactly the flag of helm cli by adding a option flag (as I did for kubectl) in this case I propose to set by default this flag to --atomic --cleanup-on-fail to keep compatibility and allow to every option proposed by helm cli

o-orand commented 3 years ago

This feature partially supports #5. We need to ensure when we override update helm cmd by test, it still compliant with bosh delete

gberche-orange commented 3 years ago

Status during backlog review: