authorizationpolicy-workload-allow-same-namespace
Allow requests to the public workload only from the same namespace.
A reference manifest to copy and adapt, not a rule cenroq enforces for you. It carries no severity, belongs to no bundle, and nothing on your cluster changes until you apply it yourself.
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
name: allow-same-namespace
namespace: default
annotations:
cenroq.io/displayName: "Allow Same Namespace"
cenroq.io/description: "Allow requests to the public workload only from the same namespace."
spec:
selector:
matchLabels:
app: public
action: ALLOW
rules:
- from:
- source:
namespaces:
- defaultSave it as authorizationpolicy-workload-allow-same-namespace.yaml — the commands below assume that name.
This is a manifest, not an admission policy, so there is nothing for kubeapt validate to check it against. Adapt the selectors and namespace first, then:
$ kubectl apply -f ./authorizationpolicy-workload-allow-same-namespace.yaml