Commit Graph

88 Commits

Author SHA1 Message Date
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
Adam Reese 85c41ef11a ref(*): kubernetes v1.6
Rebase on kubernetes v1.6
2017-04-11 15:42:23 -07:00
Sushil Kumar 000bf9fd1a Added release-name to helm delete error
Fixes https://github.com/kubernetes/helm/issues/2251
In case a user tries to delete a non-existent release,
the error message displayed was missing release-name.
2017-04-11 09:41:07 -07:00
Matt Butcher e4e0e32064
feat(tiller): support version constraint on chart
This provides the Chart.yaml field `tillerVersion`, which is a semver
range. It allows users to choose to constrain a chart to a specific
version.

The reason for this is that we keep introducing new template functions,
but we have no way of saying "this chart will only work with Tiller
newer than...".

The check on version is _only_ done on Tiller. The client does not check
at all, since it does not do any template expansion on its own.
2017-04-06 17:01:09 -06:00
Matt Butcher 9665db7d16 Merge pull request #2157 from jchauncey/hook-weights
feat(hooks): Adds weighted hooks
2017-04-03 14:34:04 -06:00
Matt Butcher daa39c2689
feat(helm): add --reuse-values flag to upgrade
This makes it possible to re-use the existing values on an upgrade,
merging in any new values set by `-f` or `--set`.

Closes #1876
2017-04-03 13:54:45 -06:00
Jonathan Chauncey 05d0fcb774 feat(hooks): Adds weighted hooks
closes #2136
* Adds new annotation `helm.sh/hookWeight`
* Sorts executing hooks of similar kind in ascending order
* There is no upper or lower bounds on the weights
2017-03-24 11:31:48 -04:00
Adam Reese d4061b5b60 fix(tiller): enforce release name length on uninstall
If a selector is created from invalid values it will return nil.

Which is EVERYTHING!!!

closes: #2115
2017-03-15 14:10:44 -07:00
Dmitry Monakhov 33ace505cc install: Return more user-friendly response on eexists
Most newcomers hit helm's 'feature' there deleted instalations are not really deleted.
Use-case
# helm install  --name gitlab-ce-1 ./stable/gitlab-ce
# helm delete gitlab-ce-1
# helm list
# helm install  --name gitlab-ce-1 ./stable/gitlab-ce
Error: a release named "gitlab-ce-1" already exists

There is a lot duplicated bugs in bugzilla which simply explains that packages
should be deleted with --pure flag. But such bugs appeared again and again
because this behavior is not obvious.

Let's help user to figure out what happens ASAP.
2017-03-02 04:40:02 +03:00
Michelle Noorali 6a062e45b7 featt(*): add support for test-failure hook
resolves #1927
2017-02-14 08:12:30 -08:00
Vaughn Dice 4a57b01a47
feat(helm): add cleanup flag to test command 2017-02-13 15:02:49 -07:00
Matt Butcher 5618afe3d4 Merge pull request #1922 from larryrensing/feat/list-namespaces
feat(*): add --namespace flag to 'helm list'
2017-02-13 11:14:50 -07:00
Adam Reese ae9691910d ref(kube): code style cleanup 2017-02-10 12:43:29 -08:00
Adam Reese 4cdb2ac538 feat(kube): support thirdpartyresources 2017-02-10 11:22:42 -08:00
Larry Rensing 294d18d567 Merge remote-tracking branch 'upstream/master' into feat/list-namespaces 2017-02-09 12:17:20 -06:00
Larry Rensing 8cb931925e Merge remote-tracking branch 'upstream/master' into feat/list-namespaces 2017-02-09 12:00:37 -06:00
Vaughn Dice 140caa081b
feat(cmd/helm/status): add last test suite run to status output 2017-02-08 09:54:25 -07:00
Larry Rensing 3a380923f4 feat(*): add --namespace flag to 'helm list'
Users can now specify a namespace filter for 'helm list'.  Only the
releases within the specified namespace will be shown.  For example,
'helm list --namespace foo' will only show releases for the 'foo'
namespace.  Also added a namespace field to the table view.

Closes #1563
2017-02-07 10:20:28 -06:00
Michelle Noorali 4896ea7cf5 chore(pkg/tiller): add logs on RunReleaseTesting 2017-02-07 10:24:26 -05:00
Michelle Noorali e95a0570ad chore(pkg/releasetesting): add test_suite tests
* and comments
2017-02-02 11:57:11 -05:00
Michelle Noorali e132191275 ref(pkg/): refactor helm test logic
pulled logic out in pkg/releasetesting
2017-02-01 10:55:58 -05:00
Michelle Noorali 58c05f87d7 feat(*): stream helm test messages to client 2017-01-31 20:57:28 -05:00
Michelle Noorali d46d63a8f7 feat(*): add helm test command mvp
* This is a simple mvp which processes a test definition with the
hook annotation for test when you run `helm test [release]`
* helm client cmd, proto def, tiller logic
2017-01-31 20:57:27 -05:00
Matt Butcher 756cb970bd
feat(tiller): record a message for each lifecycle step
This adds a simple description for each lifecycle step on a release
object.

Closes #1661
2017-01-31 16:26:35 -07:00
Taylor Thomas 7ef9bb6f71 feat(*): Add --wait flag
Adds `--wait` flag to helm that waits for all pods to reach a ready
state, PVCs to be bound, and services to have IP addresses

Closes #1805
2017-01-19 18:10:28 -08:00
Matt Butcher 9652651ba9 Merge pull request #1814 from technosophos/feat/1569-reset-values
feat(helm): add --reset-values flag to 'helm upgrade'
2017-01-19 10:18:43 -07:00
José Armesto 0059d5a3df Logging real name of the failing hook 2017-01-11 17:15:41 +01:00