Commit Graph

10 Commits

Author SHA1 Message Date
Sean Eagan 68747d0815 Use helm 3 CLI as backend
Helm 3 breaking changes (likely non-exhaustive):

- crd-install hook removed and replaced with crds directory in
  chart where all CRDs defined in it will be installed before
  any rendering of the chart
- test-failure hook annotation value removed, and test-success
  deprecated. Use test instead
- `--force` no longer handles recreating resources which
  cannot be updated due to e.g. immutability [0]
- `--recreate-pods` removed, use declarative approach instead [1]

[0]: https://github.com/helm/helm/issues/7082
[1]: https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments

Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: I20ff40ba55197de3d37e5fd647e7d2524a53248f
2021-10-04 21:40:26 -05:00
Thiago Brito 1e5d781fe9 Fixing Armada waits for Evicted pods undefinetly
In the occasion of a pod being evicted due to low resource availability,
armada keeps waiting for the Evicted pod to be ready. This commit
removes that behavior since Kubernetes will spun up a new pod.

Story: 2008645
Task: 41906
Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: I7263eebe357b0952375d538555536dc9f7cceff4
2021-03-22 16:45:08 -03:00
HUGHES, ALEXANDER (ah8742) b787c418e3 Standardize Armada code with YAPF
From recently merged document updates in [0] there is a desire to
standardize the Airship project python codebase.  This is the effort
to do so for the Armada project.

[0] https://review.opendev.org/#/c/671291/

Change-Id: I4fe916d6e330618ea3a1fccfa4bdfdfabb9ffcb2
2019-07-31 10:16:15 -05:00
Sean Eagan 5ffa12fabe [v2 docs] Overhaul wait API
See the v1-v2 migration guide updates in this commit for details.

Change-Id: I6a8a69f8392e8065eda039597278c7dfe593a4fd
2019-05-13 16:52:44 +00:00
Sean Eagan c838b2def0 Exclude generated objects from wait logic
This excludes the following generated objects from wait logic:

1. cronjob-generated jobs: these are not directly part of the release,
   so better not to wait on them. if there is a desire to wait on initial
   cronjob success, we can add a separate "type: cronjob" wait for this
   for that purpose.
2. job-generated pods: for the purposes of waiting on jobs, one should
   ensure their configuration includes a "type: job" wait. Once
   controller-based waits are included by default we can also consider
   excluding controller-owned pods from the "type: pod" wait, as those
   will be handled by the controller-based waits then.

Change-Id: Ibf56c6fef9ef72b62da0b066c92c5f29ee4ecb5f
2019-03-04 16:04:33 -06:00
Michael Beaver 7f26bbcd59 Fix pep8 errors
This addresses the pep8 errors that are causing gate failures

Change-Id: Id92dbbf527af1953026f17ddb3f2d79f0a635284
2019-02-14 20:52:38 -06:00
Drew Walters 1a28e6b72f wait: Remove test pods from wait
When waiting on resources that share labels with existing test pods,
an upgrade can fail due to a wait operation on the existing test pods.
This change skips wait operations on test resources by filtering them
using Helm hooks.

Change-Id: I465d3429216457ea8d088064cafa74b2b0d9b8cb
2018-11-06 21:58:54 +00:00
Sean Eagan 9fad5cff0a Add chart API to wait on k8s resource types/labels
This adds a `wait.resources` key to chart documents which allows
waiting on a list of k8s type+labels configurations to wait on.
Initially supported types are pods, jobs, deployments, daemonsets, and
statefulsets. The behavior for controller types is similar to that of
`kubectl rollout status`.

If `wait.resources` is omitted, it waits on pods and jobs (if any exist)
as before.

The existing `wait.labels` key still have the same behavior, but if
`wait.resources` is also included, the labels are added to each resource
wait in that array. Thus they serve to specify base labels that apply
to all resources in the release, so as to not have to duplicate them.
This may also be useful later for example to use them as labels to wait
for when deleting a chart.

Controller types additionaly have a `min_ready` field which
represents the minimum amount of pods of the controller which must
be ready in order for the controller to be considered ready. The value
can either be an integer or a percent string e.g. "80%", similar to e.g.
`maxUnavailable` in k8s. Default is "100%".

This also wraps up moving the rest of the wait code into its own module.

Change-Id: If72881af0c74e8f765bbb57ac5ffc8d709cd3c16
2018-10-05 16:48:32 -05:00
Tim Heyer a22d2d0bb0 Implement native tiller timeout support
-Update tiller.py and armada.py to support native tiller timeout
-Update documentation with the new yaml timeout keyword
-Update tiller version to 2.4.2
-Create tests for timeout ability, as well as structure for further test development
-Fix gRPC message size bug
2017-06-27 15:46:30 -05:00
Tim Heyer 9ed13f388e Implement wait for timeout feature and unit test
-Wait for all charts to deploy before exiting
-Add wait flag and custom timeout flag
2017-06-22 16:02:25 -05:00