-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: get rid of automated tests and cleanup
Signed-off-by: Mason Malone <[email protected]>
- Loading branch information
Showing
10 changed files
with
69 additions
and
63 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
15 changes: 15 additions & 0 deletions
15
examples/validating-admission-policies/argo-dangerous-interpolation-vap-binding.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,15 @@ | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: ValidatingAdmissionPolicyBinding | ||
metadata: | ||
name: "argo-dangerous-interpolation-vap-binding" | ||
spec: | ||
policyName: "argo-dangerous-interpolation-vap" | ||
# Reject workflows that match the VAP. | ||
# You could also set this to "Audit" to instead generate an audit event on a | ||
# match, which can be used to identify workflows that need to be fixed. | ||
validationActions: [Deny] | ||
matchResources: | ||
objectSelector: | ||
matchLabels: | ||
# Only match workflows with the "workflows.argoproj.io/vap" label. | ||
workflows.argoproj.io/vap: "true" |
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
31 changes: 31 additions & 0 deletions
31
examples/validating-admission-policies/rejected-workflow.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,31 @@ | ||
# This workflow contains a "container" template and "script" template that both | ||
# match the validating admission policy at | ||
# examples/validating-admission-policies/argo-dangerous-interpolation-vap.yaml. | ||
# | ||
# Attempting to submit it should give you the following: | ||
# $ kubectl create -f examples/validating-admission-policies/rejected-workflow.yaml | ||
# The workflows "rejected-workflow-fvj4h" is invalid: : ValidatingAdmissionPolicy 'argo-dangerous-interpolation-vap' with binding 'argo-dangerous-interpolation-vap-binding' denied request: Dangerous interpolation detected | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: rejected-workflow- | ||
labels: | ||
workflows.argoproj.io/vap: "true" | ||
spec: | ||
entrypoint: container-with-interpolation | ||
arguments: | ||
parameters: | ||
- name: message | ||
value: test | ||
templates: | ||
- name: container-with-interpolation | ||
container: | ||
image: argoproj/argosay:v2 | ||
args: | ||
- echo | ||
- "{{workflow.parameters.message}}" | ||
- name: script-with-interpolation | ||
script: | ||
image: argoproj/argosay:v2 | ||
command: [sh, -c] | ||
source: "{{workflow.parameters.message}}" |
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
12 changes: 0 additions & 12 deletions
12
test/e2e/manifests/plugins/argo-dangerous-interpolation-vap-binding.yaml
This file was deleted.
Oops, something went wrong.
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
18 changes: 0 additions & 18 deletions
18
test/e2e/testdata/vap/dangerous-interpolation-container.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.