k8s_gateway_api/exp/policy.rs
1use crate::*;
2
3/// PolicyTargetReference identifies an API object to apply policy to. This
4/// should be used as part of Policy resources that can target Gateway API
5/// resources. For more information on how this policy attachment model works,
6/// and a sample Policy resource, refer to the policy attachment documentation
7/// for Gateway API.
8#[derive(
9 Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema,
10)]
11pub struct PolicyTargetReference {
12 /// Group is the group of the target resource.
13 pub group: Group,
14
15 /// Kind is kind of the target resource.
16 pub kind: Kind,
17
18 /// Name is the name of the target resource.
19 pub name: ObjectName,
20
21 /// Namespace is the namespace of the referent. When unspecified, the local
22 /// namespace is inferred. Even when policy targets a resource in a
23 /// different namespace, it MUST only apply to traffic originating from the
24 /// same namespace as the policy.
25 pub namespace: Option<Namespace>,
26}