Skip to content
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

Implement custom validation checks #16

Open
jkupferer opened this issue Aug 13, 2019 · 0 comments
Open

Implement custom validation checks #16

jkupferer opened this issue Aug 13, 2019 · 0 comments

Comments

@jkupferer
Copy link
Collaborator

Custom validation checks should process using jinja2 to validate check conditions:

spec:
  validation:
    customValidation:
    - name: destroy schedule must be no more than 14 days from creation
      check: spec.actionSchedule.destroy < timestamp(resource_claim.metadata.creationTimestamp).add('14d')
    - name: stop schedule must be no more than 8 hours from now
      check: spec.actionSchedule.stop < timestamp.utcnow.add('8h')
@jkupferer jkupferer changed the title Implement custom validation checks: Implement custom validation checks Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant