-
Notifications
You must be signed in to change notification settings - Fork 894
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: controller panic with ephemeral containers with bad resource qty (…
…#1055) Signed-off-by: Jesse Suen <[email protected]>
- Loading branch information
Showing
5 changed files
with
89 additions
and
4 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
36 changes: 36 additions & 0 deletions
36
test/e2e/expectedfailures/malformed-rollout-ephemeral.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,36 @@ | ||
# This example reproduces a cornercase bug where there are multiple errors in the rollout causing a panic: | ||
# 1. duplicated name in the ephemeralContainer | ||
# 2. invalid resource request in ephemeral container | ||
# See: https://github.com/argoproj/argo-rollouts/issues/1045 | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Rollout | ||
#apiVersion: apps/v1 | ||
#kind: Deployment | ||
metadata: | ||
name: malformed-rollout-ephemeral | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: malformed-rollout-ephemeral | ||
template: | ||
metadata: | ||
labels: | ||
app: malformed-rollout-ephemeral | ||
spec: | ||
containers: | ||
- name: malformed-rollout-ephemeral | ||
image: argoproj/rollouts-demo:blue | ||
resources: | ||
requests: | ||
memory: invalid # invalid | ||
# NOTE: kubernetes drops the ephemeral containers list completely when one fails to unmarshal | ||
# (e.g. when one has an invalid resource quantity). So for better or worse, this rollout will | ||
# become healthy. | ||
ephemeralContainers: | ||
- name: malformed-rollout-ephemeral # duplicated name | ||
image: argoproj/rollouts-demo:blue | ||
resources: | ||
requests: | ||
memory: invalid # invalid | ||
strategy: | ||
canary: {} |
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