-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chart] Add recreate strategy to deployments (#419)
* Add recreate strategy to deployments Co-authored-by: Roberto Santalla <[email protected]> * fix tests Co-authored-by: Roberto Santalla <[email protected]>
- Loading branch information
1 parent
5313cb2
commit 6ee6b4e
Showing
5 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
charts/newrelic-infrastructure/tests/controlplane_strategy_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
suite: test control plane strategy | ||
templates: | ||
- templates/controlplane/daemonset.yaml | ||
- templates/controlplane/scraper-configmap.yaml | ||
- templates/controlplane/agent-configmap.yaml | ||
- templates/secret.yaml | ||
tests: | ||
- it: DaemonSet defaults to global updateStrategy | ||
set: | ||
licenseKey: test | ||
cluster: test | ||
asserts: | ||
- equal: | ||
path: spec.updateStrategy | ||
value: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxUnavailable: 1 | ||
template: templates/controlplane/daemonset.yaml | ||
|
||
- it: DaemonSet updateStrategy can be overridden | ||
set: | ||
licenseKey: test | ||
cluster: test | ||
controlPlane: | ||
kind: Deployment | ||
asserts: | ||
- equal: | ||
path: spec.strategy | ||
value: | ||
type: Recreate | ||
template: templates/controlplane/daemonset.yaml | ||
- isNull: | ||
path: spec.updateStrategy | ||
template: templates/controlplane/daemonset.yaml | ||
|
||
- it: Deployment defaults to recreate | ||
set: | ||
licenseKey: test | ||
cluster: test | ||
controlPlane: | ||
kind: Deployment | ||
asserts: | ||
- equal: | ||
path: spec.strategy | ||
value: | ||
type: Recreate | ||
template: templates/controlplane/daemonset.yaml | ||
|
||
- it: Deployment strategy can be overridden | ||
set: | ||
licenseKey: test | ||
cluster: test | ||
strategy: | ||
type: Foobar | ||
controlPlane: | ||
kind: Deployment | ||
asserts: | ||
- equal: | ||
path: spec.strategy | ||
value: | ||
type: Foobar | ||
template: templates/controlplane/daemonset.yaml | ||
- isNull: | ||
path: spec.updateStrategy | ||
template: templates/controlplane/daemonset.yaml | ||
|
||
- it: Deployment strategy is not rendered on DaemonSet | ||
set: | ||
licenseKey: test | ||
cluster: test | ||
controlPlane: | ||
strategy: | ||
type: Foobar | ||
asserts: | ||
- isNull: | ||
path: spec.strategy | ||
template: templates/controlplane/daemonset.yaml | ||
|
||
- it: DaemonSet strategy is not rendered on Deployment | ||
set: | ||
licenseKey: test | ||
cluster: test | ||
controlPlane: | ||
kind: Deployment | ||
updateStrategy: | ||
type: Foobar | ||
asserts: | ||
- isNull: | ||
path: spec.updateStrategy | ||
template: templates/controlplane/daemonset.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters