-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix plan marked as completed when template was broken #519
Changes from 17 commits
20f99e9
eab2d88
2fa64db
3cfaa83
9dc6ee1
3ff8eed
b81af54
f8b283b
ae9d911
d439a28
85a943e
3771018
7647a2d
38dc006
cf14577
e5b8c8b
5d18d77
22629e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: kudo.k8s.io/v1alpha1 | ||
kind: PlanExecution | ||
metadata: | ||
labels: | ||
instance: invalid1 | ||
operator-version: invalid-v1 | ||
ownerReferences: | ||
- apiVersion: kudo.k8s.io/v1alpha1 | ||
blockOwnerDeletion: true | ||
controller: true | ||
kind: Instance | ||
name: invalid1 | ||
status: | ||
name: deploy | ||
state: ERROR | ||
phases: | ||
- name: invalid-phase | ||
state: ERROR |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
apiVersion: kudo.k8s.io/v1alpha1 | ||
kind: Operator | ||
metadata: | ||
labels: | ||
controller-tools.k8s.io: "1.0" | ||
name: invalid | ||
--- | ||
apiVersion: kudo.k8s.io/v1alpha1 | ||
kind: OperatorVersion | ||
metadata: | ||
labels: | ||
controller-tools.k8s.io: "1.0" | ||
name: invalid-v1 | ||
spec: | ||
version: "1.0.0" | ||
connectionString: "" | ||
operator: | ||
name: Toy | ||
kind: Operator | ||
templates: | ||
serial.yaml: | | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: serial-{{ .StepName }} | ||
spec: | ||
template: | ||
metadata: | ||
name: "{{ .StepName }}-serial-{{ .StepNumber }}" | ||
spec: | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: bb | ||
image: busybox:latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These pods are (currently) being created against envtest so no actual containers are able to be created. If there's not a way to write this test without requiring containers to start, I'll setup a KIND environment to run our tests like we do for the operator tests (either, a separate suite or just run everything in KIND). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, this shouldn't render at all, I see :) |
||
imagePullPolicy: IfNotPresent | ||
command: | ||
- /bin/sh | ||
- -c | ||
- "sleep {{ .Params.NonExisting }}" | ||
tasks: | ||
invalid-task: | ||
resources: | ||
- serial.yaml | ||
parameters: | ||
- name: Sleep | ||
description: "how long to have the container sleep for before returning" | ||
required: true | ||
displayName: "Sleep Time" | ||
plans: | ||
deploy: | ||
strategy: serial | ||
phases: | ||
- name: invalid-phase | ||
strategy: serial | ||
steps: | ||
- name: invalid-step | ||
tasks: | ||
- invalid-task | ||
--- | ||
apiVersion: kudo.k8s.io/v1alpha1 | ||
kind: Instance | ||
metadata: | ||
labels: | ||
controller-tools.k8s.io: "1.0" | ||
operator: invalid | ||
name: invalid1 | ||
spec: | ||
operatorVersion: | ||
name: invalid-v1 | ||
type: OperatorVersions | ||
# Add fields here | ||
parameters: | ||
Sleep: "30" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to update the API object here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/kudobuilder/kudo/blob/master/pkg/controller/planexecution/planexecution_controller.go#L252