-
Notifications
You must be signed in to change notification settings - Fork 7
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
chore(assert): add experiment to assert if Recipe labels are set #144
Changes from all commits
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,50 @@ | ||
apiVersion: dope.mayadata.io/v1 | ||
kind: Recipe | ||
metadata: | ||
name: assert-absence-of-deprecated-daemonsets | ||
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. rename this |
||
namespace: d-testing | ||
labels: | ||
d-testing.dope.mayadata.io/inference: "true" | ||
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. remove this label, since inference targets the primary recipes & not the helper recipes. 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. add some specific labels e.g. labels:
assert-phase-is-set-in-label: true |
||
spec: | ||
tasks: | ||
- name: assert-daemonset-with-extensions-v1beta1 | ||
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. rename appropriately |
||
failFast: | ||
when: OnDiscoveryError | ||
ignoreError: AsWarning | ||
assert: | ||
state: | ||
kind: DaemonSet | ||
apiVersion: extensions/v1beta1 | ||
stateCheck: | ||
stateCheckOperator: ListCountEquals | ||
count: 0 | ||
--- | ||
apiVersion: dope.mayadata.io/v1 | ||
kind: Recipe | ||
metadata: | ||
name: assert-labels-set-after-reconciliation | ||
namespace: d-testing | ||
labels: | ||
d-testing.dope.mayadata.io/inference: "true" | ||
spec: | ||
eligible: | ||
checks: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: recipe.dope.mayadata.io/phase | ||
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. make the selection specific to the helper recipe |
||
operator: Exists | ||
when: ListCountEquals | ||
count: 1 | ||
resync: | ||
onNotEligibleResyncInSeconds: 5 | ||
tasks: | ||
- name: assert-label-is-set | ||
assert: | ||
state: | ||
kind: Recipe | ||
apiVersion: dope.mayadata.io/v1 | ||
metadata: | ||
name: assert-absence-of-deprecated-daemonsets | ||
namespace: d-testing | ||
status: | ||
phase: Completed |
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.
rename the file to
assert-recipe-phase-is-set-against-labels