Created
August 28, 2022 15:49
-
-
Save eyarz/9f918858110f7ded2a1bef080296ced7 to your computer and use it in GitHub Desktop.
crossplane_policy
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
apiVersion: v1 | |
policies: | |
- name: crossplane | |
isDefault: true | |
rules: | |
- identifier: CUSTOM_RULE_MANDATORY_PATCHSET | |
# This message will override the rule's `defaultMessageOnFailure` property | |
messageOnFailure: '' | |
- identifier: CUSTOM_RULE_MANDATORY_NAME | |
# This message will override the rule's `defaultMessageOnFailure` property | |
messageOnFailure: '' | |
- identifier: CUSTOM_RULE_MANDATORY_PROVIDERCONFIGREF_NAME | |
# This message will override the rule's `defaultMessageOnFailure` property | |
messageOnFailure: '' | |
customRules: | |
- identifier: CUSTOM_RULE_MANDATORY_PATCHSET | |
name: Ensure a patchSet exist [CUSTOM RULE] | |
defaultMessageOnFailure: Add `patchSet` to the `spec` section like so https://gist.github.com/Piotr1215/33b3c07787de601393c2b06adc165b51#file-composition-yaml-L7-L15 | |
schema: | |
if: | |
properties: | |
kind: | |
enum: | |
- Composition | |
then: | |
properties: | |
spec: | |
required: | |
- patchSets | |
required: | |
- spec | |
- identifier: CUSTOM_RULE_MANDATORY_NAME | |
name: Ensure a name exist for each base [CUSTOM RULE] | |
defaultMessageOnFailure: Add `name` to the `base` section like so https://gist.github.com/Piotr1215/33b3c07787de601393c2b06adc165b51#file-composition-yaml-L47 | |
schema: | |
if: | |
properties: | |
kind: | |
enum: | |
- Composition | |
then: | |
properties: | |
spec: | |
properties: | |
resources: | |
items: | |
properties: | |
name: | |
type: string | |
required: | |
- name | |
- identifier: CUSTOM_RULE_MANDATORY_PROVIDERCONFIGREF_NAME | |
name: Ensure a name exist for each providerConfigRef base [CUSTOM RULE] | |
defaultMessageOnFailure: Add `name` to the `providerConfigRef` in each section like so https://gist.github.com/Piotr1215/33b3c07787de601393c2b06adc165b51#file-composition-yaml-L79 | |
schema: | |
if: | |
properties: | |
kind: | |
enum: | |
- Composition | |
then: | |
properties: | |
spec: | |
properties: | |
resources: | |
items: | |
properties: | |
base: | |
properties: | |
spec: | |
properties: | |
providerConfigRef: | |
properties: | |
name: | |
type: string | |
required: | |
- name | |
required: | |
- providerConfigRef |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment