authorizationpolicy-workload-allow-get
Allow only HTTP GET requests to the api-gateway workload on port 8080.
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-get-only
namespace: default
annotations:
cenroq.io/displayName: "Allow GET Only"
cenroq.io/description: "Allow only HTTP GET requests to the api-gateway workload on port 8080."
spec:
selector:
matchLabels:
app: api-gateway
action: ALLOW
rules:
- to:
- operation:
methods:
- GET
ports:
- "8080"Save it as authorizationpolicy-workload-allow-get.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-get.yaml