From fd71612794070c0d6fe24da7fd0039a72034eb6a Mon Sep 17 00:00:00 2001 From: shivkumar dudhani Date: Fri, 7 Feb 2020 12:03:53 -0800 Subject: [PATCH] update examples --- documentation/writing-policies-generate.md | 8 ++++---- documentation/writing-policies-validate.md | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/documentation/writing-policies-generate.md b/documentation/writing-policies-generate.md index b8882590b1..de0da450ff 100644 --- a/documentation/writing-policies-generate.md +++ b/documentation/writing-policies-generate.md @@ -68,10 +68,10 @@ spec: namespace: "{{request.object.metadata.name}}" # namespace that triggers this rule data: spec: - podSelector: - matchLabels: {} - matchExpressions: [] - policyTypes: [] + # select all pods in the namespace + podSelector: {} + policyTypes: + - Ingress metadata: labels: policyname: "default" diff --git a/documentation/writing-policies-validate.md b/documentation/writing-policies-validate.md index 339bc0292f..b155aacb19 100644 --- a/documentation/writing-policies-validate.md +++ b/documentation/writing-policies-validate.md @@ -134,17 +134,17 @@ spec : - Deployment # Name is optional and can use wildcards name: "*" - # Selector is optional - selector: validate: pattern: spec: - ^(containers): - resources: - requests: - memory: "$(<=./../../limits/memory)" - limits: - memory: "2048Mi" + template: + spec: + ^(containers): + resources: + requests: + memory: "$(<=./../../limits/memory)" + limits: + memory: "2048Mi" ```` ### Logical OR across validation patterns