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