Commit Graph

114 Commits

Author SHA1 Message Date
Martin Hickey c3242d1be4
Merge pull request #5532 from mortent/WaitForDelete
fix(helm): Delete hooks should wait for resource to be removed from etcd before continuing
2019-06-21 17:03:32 +01:00
Morten Torkildsen cb2207c2fb fix(helm): Delete hooks should wait for resource to be removed from etcd before continuing
Signed-off-by: Morten Torkildsen <mortent@google.com>
2019-06-20 11:56:31 -07:00
Matt Farina 35b740af22
Adding Kinds to the capabilities apiversions lookup for templates
This will enable the detection of specific objects including CRDs
that may vary widely between kubernetes clusters

Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-06-04 14:49:52 -04:00
Morten Torkildsen 94adb5bbe0 fix(helm): Only validate new manifests
Signed-off-by: Morten Torkildsen <mortent@google.com>
2019-04-24 20:30:19 -07:00
Matthew Fisher 62edd09800
Merge pull request #5606 from xichengliudui/update-go-const
Using const() defines constants together (part:1)
2019-04-17 09:46:32 -07:00
xichengliudui 5edb79df4c Using const() defines constants together (part:1)
Signed-off-by: xichengliudui <1693291525@qq.com>

update pull request
Signed-off-by: xichengliudui <1693291525@qq.com>

update pull request
Signed-off-by: xichengliudui <1693291525@qq.com>
2019-04-11 11:44:48 -04:00
Morten Torkildsen b8e40a7c31 fix(helm): Wait for CRDs to reach established state for crd_install hook
Makes sure CRDs installed through the crd_install hook reaches the `established` state before the hook is considered complete.

Signed-off-by: Morten Torkildsen <mortent@google.com>
2019-03-30 10:31:37 -07:00
Mikhail Kirpichev 63ef73d416 fix(tiller): fixed a typo in tiller and unit test
There was a typo in a tiller error with "released named" message, I've changed it to "a release named". Also fix a unit-test for it.

Signed-off-by: Mikhail Kirpichev <mkirpic@gmail.com>
2019-03-18 19:01:58 +03:00
tuanvcw 268695813b Fix typos in various places (#5360)
Signed-off-by: Vu Cong Tuan <tuanvc@vn.fujitsu.com>
2019-02-26 07:41:50 -08:00
Miroslav Spousta 73a17eb599 Fix wording in error message (#5322)
Signed-off-by: Miroslav Spousta <qiq@ucw.cz>
2019-02-19 14:46:01 -08:00
lIuDuI 147dc225e2 Update func name (#5250)
* Update func name

Signed-off-by: xichengliudui <1693291525@qq.com>

* update pull request

Signed-off-by: xichengliudui <1693291525@qq.com>
2019-02-01 06:33:59 -08:00
Michelle Noorali 2b7221b5b7
Merge pull request #4088 from jgleonard/2751
#2715 add child NOTES.txt rendering
2019-01-16 12:16:11 -05:00
Morten Torkildsen 82d01cb312 fix(helm): Merge nested values correctly on upgrade (#4806)
Upgrading a release and override existing values doesn't work as expected for nested values. Maps should be merged recursively, but currently maps are treated just like values and replaced at the top level.

If the existing values are:
```yaml
resources:
  requests:
    cpu: 400m
  something: else
```
and an update is done with ```--set=resources.requests.cpu=500m```, it currently ends up as
```yaml
resources:
  requests:
    cpu: 500m
```
but it should have been
```yaml
resources:
  requests:
    cpu: 500m
  something: else
```

This PR updates the way override values are merged into the existing set of values to merge rather than replace maps.

Closes: #4792

Signed-off-by: Morten Torkildsen <mortent@google.com>
2018-11-12 12:32:21 +01:00
Jon Leonard a499cf3517
Merge branch 'master' into 2751 2018-11-01 15:02:17 -04:00
jgleonard 1518f961af fix(helm): add --render-subchart-notes flag to 'helm install' and 'helm upgrade'
When 'helm <install|upgrade> --render-subchart-notes ...' is run, this will include
the notes from the subchart when rendered via Tiller.

Closes #2751

Signed-off-by: jgleonard <jgleonard@gmail.com>
2018-11-01 14:57:01 -04:00
jgleonard ab9349c425 add child NOTES.txt rendering
Signed-off-by: jgleonard <jgleonard@gmail.com>
2018-11-01 14:56:46 -04:00
Adam Reese dbf84cd229
ref(*): kubernetes v1.12 support
Signed-off-by: Adam Reese <adam@reese.io>
2018-10-04 10:28:34 -07:00
Colin Panisset 12ace315ea Don't assume that the returned error from the storage driver isn't nil (#3625) (#4627)
Signed-off-by: Colin Panisset <colin.panisset@cevo.com.au>
2018-09-26 17:38:39 -07:00
Matthew Fisher 941b1f4d68
fix(release_server): handle the case when requested values is empty (#4604)
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2018-09-07 12:22:12 -07:00
Michelle Noorali 2d82b88282
Merge pull request #4364 from michelleN/fix-4337
fix(release_server): fix how we merge values
2018-08-07 17:13:31 -04:00
Michelle Noorali 3e0de0dae9 fix(release_server): fix how we merge values
resolves #4337
Merging maps inside of strings gets a bit tricky. When two
strings consisting of "{}" were being added together, this resulted in
"{}\n{}" instead of "{}" which is what we wanted. This led to YAML
parsing errors and showed up when the `--reuse-values` flag was used
when no overrides via `--set` were provided during install and/or
upgrade.
2018-08-07 16:23:17 -04:00
Matthew Fisher 2d77db11fa change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
mattjmcnaughton ddd1f48c40 Increase error message specificity for name reuse
If `helm upgrade` fails because a reused name is still in use, the error
message does not specify which name is still in use. Update the error
message.
2018-06-05 09:48:11 -04:00
Matt Butcher 0699ec4248
feat(tiller): support CRD installation (#3982)
This adds support for installing CRDs well before any other resource
kinds are installed.

This PR introduces a new hook, `crd-install`, that fires before
manifests are even validated. It is used to install a CRD before any
other part of a chart is installed.

Currently, this hook is _only implemented for install_. That means we
currently cannot add new CRDs during `helm upgrade`, nor can they
be rolled back. This is the safest configuration, as the update/rollback
cycle gets very challenging when CRDs are added and removed.
2018-05-11 12:09:38 -06:00
Michelle Noorali 72d54f356d
Merge pull request #3831 from michelleN/fix-3655
fix(pkg/tiller): saves all previous computed values on reuseValues
2018-04-04 18:20:13 -04:00
Michelle Noorali 9266731dc4 fix(pkg/tiller): reuseValues combines all prev val
Resolves #3655
We were seeing that when running helm upgrade with the reuse-values
flag enabled that you could end up in the position where overrides
a.k.a computed values from previous revisions were not being saved on
the updated revision. This left us in a weird position where some
computed values would disappear mysteriously in the abyss. That
happened because computed values from previous revisions weren't merged
with the new computed values every time the reuse-values flag was used.
This PR merges computed values from the previous revisions so you don't
end up in that kind of conundrum.
2018-04-04 16:05:51 -04:00
Alexey igrychev 1d4883bf3c Implement before-hook-creation delete policy
Existing helm.sh/hook-delete-policy annotation variables (hook-failed, hook-succeeded) do not allow to leave failed jobs for debugging without blocking the next job launching: every failed job must be deleted manually before the next related release is launching (installing, updating or rolling back).

New policy, before-hook-creation, removes the hook from previous release if there is one before the new hook is launched and can be used with another variable.
2018-03-21 18:13:53 +03:00
Johnny Bergström 5f1a21bc32 fix(tiller): Supersede multiple deployments (#3539)
* add test for rolling back from a FAILED deployment

* Update naming of release variables

Use same naming as the rest of the file.

* Update rollback test

- Add logging
- Verify other release names not changed

* fix(tiller): Supersede multiple deployments

There are cases when multiple revisions of a release has been
marked with DEPLOYED status. This makes sure any previous deployment
will be set to SUPERSEDED when doing rollbacks.

Closes #2941 #3513 #3275
2018-02-27 10:25:40 -08:00
xuhaigang 61623bfe2d feat(tiller/proto):Allow charts to specify k8s compatibility in semver field
Add an optional field kubeVersion to Chart.yaml that allows the chart
developer to specify a semver compliant version.

Closes #2708, #2706
2018-01-06 10:02:09 +08:00
Adam Reese a31e3b8fe1
ref(*): kubernetes v1.9 support (#3234) 2018-01-05 12:30:26 -08:00
Justin Scott 4a02a71f1e WIP feat(helm): add `template` command
This adds the functionality from the helm-template plugin to allow the
rendering of templates without Tiller.

Closes #2755
2017-08-28 18:04:56 -07:00
DockerZK 734b124577 feat(*) add key helm.sh/hook-delete-policy to hook annotation
When "helm.sh/hook-delete-policy: hook-succeeded" is provided in a hook's annotation, Tiller will automatically delete the hook after the hook is succeeded. When "helm.sh/hook-delete-policy: hook-failed" is provided in a hook's annotation, Tiller will automatically delete the hook after the hook is failed.

Closes #1769
2017-08-24 12:18:28 +08:00
Y.W 0f953403a2 give an uniform check for release process (#2565)
* give an uniform check for release process

* fixed as the review of adamreese: update the err message when releasename is empty and update the test units.

* fixed as the review of bacongobbler: add more detail information to return message. the regex rule is added to the return message.
2017-06-22 10:05:29 -06:00
Taylor Thomas 119fa6537c feat(tiller): Adds more logging
This builds on previous work and adds more logging to follow
the full process of installing, updating, deleting, and rolling back.
This also standardizes capitalization of logs and small formatting
fixes
2017-05-30 18:17:22 -07:00
fibonacci1729 2ae276ae39 ref(tiller): refactor tiller APIs into logical files
*ReleaseServer.InstallRelease -> tiller/release_install.go
*ReleaseServer.UpdateRelease -> tiller/release_update.go
2017-05-22 11:51:27 -06:00
fibonacci1729 a4d05fd2b2 ref(tiller): refactor tiller APIs into logical files
*ReleaseServer.UninstallRelease -> tiller/release_uninstall.go
*ReleaseServer.ListReleases -> tiller/release_list.go
2017-05-22 11:37:55 -06:00
fibonacci1729 b5c213d5dd ref(tiller): refactor tiller APIs into logical files
*ReleaseServer.RollbackRelease -> tiller/release_rollback.go
2017-05-22 10:09:13 -06:00
fibonacci1729 62c4b152fd ref(tiller): refactor tiller APIs into logical files
*ReleaseServer.GetReleaseContent -> tiller/release_content.go
*ReleaseServer.GetReleaseStatus -> tiller/release_status.go
2017-05-22 09:59:51 -06:00
fibonacci1729 3b3439f67d ref(tiller): breakout ReleaseServer APIs into logical files.
*ReleaseServer.RunReleaseTest -> tiller/release_testing.go
*ReleaseServer.GetVersion     -> tiller/release_version.go
2017-05-22 09:08:39 -06:00
Adam Reese 15254e4c5c feat(*): add generic logging interface (#2394)
Adds a generic logging interface to importable packages.
2017-05-19 11:43:04 -07:00
Michelle Noorali 488ca6fdd8 fix(*): return non-zero exit code on test failure
* resolves #2089
2017-05-15 21:42:44 -04:00
Maciej Kwiek 1c9ae5577d Basic Rudder Delete implementation
Extracted delete specific code from ReleaseServer to external function
which is called from both Local and Remote ReleaseModules.

Made getVersionSet function from tiller package exported.
2017-05-05 13:05:24 +02:00
Maciej Kwiek 5937e1a214 ReleaseServer.ReleaseModule has Status method
Both local and remote Release module implement release status check.
2017-05-05 13:05:24 +02:00
Dmitry Shulyak bd47b8444f Use rollback method on ReleaseModule interface 2017-05-05 13:04:02 +02:00
Dmitry Shulyak a883531f98 Implement upgrade for rudder 2017-05-05 13:04:02 +02:00
Maciej Kwiek c1fcaf09ce Experimental Rudder implementation
This change introduces the concept of Rudders - pluggable modules that
Tiller communicates with via grpc, which allow to decouple orchestration
logic from Tiller into separate service.

This commit consists of simple Rudder implementation which does exactly
the same thing as built in Tiller orchestrator - it creates all k8s
objects from provided manifest without orchestrating them.

--experimental-release flag is introduced to enable this behaviour.

This change allows to use the service and tiller outside of the cluster.
Following commits will add Rudder to helm deployment.
2017-05-05 13:02:20 +02:00
Maciej Kwiek ec92b76054 Release are locked to avoid parallel changes
Environment is supplied with release lock map which allows to lock a
release by name to make sure that update, rollback or uninstall aren't
running on one release at the same time.
2017-04-24 13:05:35 +02:00
Matt Butcher 573a8a190c
fix(tiller): ignore empty YAML documents during delete
Closes #2256
2017-04-12 16:23:39 -06:00
Adam Reese 0ab38a998c Merge pull request #2248 from adamreese/ref/kube-v1.6
ref(*): kubernetes v1.6
2017-04-11 18:49:35 -07:00
Matt Butcher d97086cbdd Merge pull request #2229 from technosophos/feat/chart-tiller-version
feat(tiller): support version constraint on chart
2017-04-11 17:14:59 -06:00