Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm v2.17.0 for werf #61

Open
wants to merge 25 commits into
base: release-2.17
Choose a base branch
from
Open

Helm v2.17.0 for werf #61

wants to merge 25 commits into from

Conversation

distorhead
Copy link
Member

No description provided.

distorhead and others added 21 commits November 5, 2020 21:21
Extend `kube.Client` implementation of `environment.KubeClient` interface with ResourcesWaiter object.

ResourcesWaiter interface defines `WaitForResources` and `WatchUntilReady` methods and allows to redefine default waiting behaviour in custom helm builds. For example, to add logging of resources statuses, errors, pod's logs while waiting.

Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
Cannot use go module converted from glide due to error: kubernetes/kubernetes#79384.

Update k8s.io go deps to 1.16.0.
Write 3-way-merge and 2-way-merge patches to annotations:

```
debug.werf.io/repair-patch
debug.werf.io/repair-patch-errors
```

Repair patch is a 3-way-merge kubectl-apply-like patch between current live resource state and desired chart state. User should apply this patch manually when live resource state is out of sync with the chart configuration resource state.

A warning message will be written to the screen during deploy process when repair patch is not empty.
…pair patches

 - Create two-pass patch as follows: current object => apply 2 way merge helm patch => create 3 way merge first stage repair patch => apply first stage repair patch => create actual repair patch.
 - Filter out unnecessary fields during patch creation (such as volumeClaimTemplates, empty container/env values).
 - Normalize numeric limits and (100Gi, 1000m, etc.).
 - Manually cut out repair patch fields: $setElementsOrder, $retainKeys, spec.strategy.rollingUpdate=null.
 - Validate chart templates, write log warnings, add object annotation `debug.werf.io/validation-messages`.
 - Improved repair-patch creation to filter out invalid non-existing fields described in the chart template.
The problem occurs when the following conditions are met:
* A chart does not contain Chart.yaml file.
* There is an invalid sub chart that does not pass validation.
distorhead added a commit to werf/werf that referenced this pull request Nov 6, 2020
errPending on upgrade could occur when some deploy has been interrupted by a signal.

In this case helm leave release in inconsistent state which could not be healed by automatical redeploy.

Werf uses own distributed release locking by release name using Kubernetes configmap annotations to synchronize multiple deploy processes. Werf implementation supports interrupting of werf-deploy process by some signal.
[v2.17.0][helm for werf] Remove errPending on upgrade
[v2.17.0][helm for werf] Do not parse values with strict yaml parser to allow usage of yaml-anchors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants