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

Add custom rule example- verify key doesn't exist #66

Closed
adifayer opened this issue Jul 27, 2022 · 2 comments · Fixed by #69
Closed

Add custom rule example- verify key doesn't exist #66

adifayer opened this issue Jul 27, 2022 · 2 comments · Fixed by #69
Assignees

Comments

@adifayer
Copy link
Contributor

DOD
Add an example of a custom rule that verifies a certain key-value is not used within a manifest

Example:

  properties:
    kind:
      enum:
        - Deployment
        - Pod
        - DaemonSet
        - StatefulSet
        - ReplicaSet
        - CronJob
        - Job
then:
  properties:
    spec:
      properties:
        template:
          properties:
            containers:
              type: array
              items:
                not:
                type: object
                properties:
                  env:
                  type: array
                required:
                - env```
@hadar-co
Copy link

@adifay I dont understand the example you put here - is it supposed to be the schema of such a rule?

@adifayer
Copy link
Contributor Author

adifayer commented Aug 1, 2022

@hadar-co exactly

@hadar-co hadar-co linked a pull request Aug 1, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants